Skip to content

Instantly share code, notes, and snippets.

View BAProductions's full-sized avatar
💭
Making Test Build With Imported Repo

DJABHipHop BAProductions

💭
Making Test Build With Imported Repo
View GitHub Profile
@vvakame
vvakame / AppPickActionProvider.java
Created December 11, 2011 13:18
Android ActionProvider sample.
package net.vvakame.sapmle;
import java.util.List;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.util.Log;
import android.view.ActionProvider;
import android.view.Menu;
@maxxscho
maxxscho / style.css
Created April 19, 2012 07:34
Wordpress Default CSS Styles
/* !-------- WORDPRESS CLASSES ------------------- */
/*------------------------------------------------------------ *\
\*------------------------------------------------------------ */
/* !-- WP WYSIWYG Editor Styles -- */
.entry-content img {
margin: 0 0 1.5em 0;
}
.alignleft, img.alignleft {
margin-right: 1.5em;
@isGabe
isGabe / custom-menu-links-widget.php
Created October 12, 2012 23:50
WordPress Plugin - Custom Menu widget with link descriptions #snippet #WordPress
@EvgheniAnachii
EvgheniAnachii / content-link.php
Created November 20, 2012 18:41
next project
@lgedeon
lgedeon / Dashboard Widget
Created December 20, 2012 14:47
Dashboard Widget
function wp_dashboard_setup() {
wp_add_dashboard_widget( 'plugin_analytics_link', 'Analytics Link', array($this, 'wp_add_dashboard_widget_callback' ), array($this, 'wp_add_dashboard_widget_control_callback' ) );
}
function wp_add_dashboard_widget_callback() {
if ( !$widget_options = get_option( 'dashboard_widget_options' ) )
$widget_options = array();
if ( !isset($widget_options['plugin_analytics_link']) )
$widget_options['plugin_analytics_link'] = array( 'label' => '', 'link' => '' );
@bvdr
bvdr / wp_function.php
Last active November 18, 2024 16:14
Wordpress snippets
<?php
////////////////////////////////////////
////// Javascript files register in functions.php
///////////////////////////////////////
function my_script_init() {
if (!is_admin()) {
wp_register_script('jscookies', get_bloginfo('stylesheet_directory').'/js/jquery.cookie.js', array('jquery'));
wp_enqueue_script('jscookies');
}
}
@isGabe
isGabe / widgets.php
Created June 17, 2013 20:25
Basic WordPress Widget Code #snippet #WordPress
<?php
/*
* Basic WordPress Widget Code
* Save to: /wp-content/theme/widgets.php
* in functions.php or appropriate place: if ($wp_version >= 2.8) require_once(TEMPLATEPATH.'/widgets.php');
*
*/
class MyWidgetName extends WP_Widget
{
<?php
/*
Plugin Name: Gallery Metabox
Plugin URI: http://wordpress.org/extend/plugins/gallery-metabox/
Description: Displays all the post's attached images on the Edit screen
Author: Bill Erickson
Version: 1.5.1
Author URI: http://www.billerickson.net
*/
@zeropointdevelopment
zeropointdevelopment / code-snippet-1.php
Last active November 18, 2024 16:14
[WordPress] Code from our blog post Customising the JetPack Infinite Scroll Footer - http://www.limecanvas.com/customising-the-jetpack-infinite-scroll-footer/
/**
* The Infinite Blog Footer
*
* @uses self::get_settings, self::set_last_post_time, self::archive_supports_infinity, __, wp_get_theme, get_current_theme, apply_filters, home_url, esc_attr, get_bloginfo, bloginfo
* @return string or null
*/
function footer() {
// Bail if theme requested footer not show
if ( false == self::get_settings()->footer )
return;
@mrazzari
mrazzari / multisite_delete_revisions.php
Last active November 9, 2024 00:45
WP - Multisite delete revisions
<pre><?php
// WordPress Multisite - Delete all revisions from all posts in a netword.
// Quick hack by @mrazzari, 2014.
// For context see this thread started by Kitchin at the forums:
// http://wordpress.org/support/topic/deleting-post-revisions-do-not-use-the-abc-join-code-you-see-everywhere
// HOWTO
// This snippet is meant to be called as a standalone script.
// Like http://example.com/tmp/multisite_delete_revisions.php