Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Plugin Upgrade Class | |
if ( !class_exists( 'PluginUpgrade' ) ) | |
{ | |
class PluginUpgrade | |
{ | |
private $plugin_url = false; | |
private $remote_url = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('WYSIWYG_META_BOX_ID', 'my-editor'); | |
define('WYSIWYG_EDITOR_ID', 'myeditor'); //Important for CSS that this is different | |
define('WYSIWYG_META_KEY', 'extra-content'); | |
add_action('admin_init', 'wysiwyg_register_meta_box'); | |
function wysiwyg_register_meta_box(){ | |
add_meta_box(WYSIWYG_META_BOX_ID, __('WYSIWYG Meta Box', 'wysiwyg'), 'wysiwyg_render_meta_box', 'post'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Mobile First Responsive Images | |
Description: Serve up smaller images to smaller screens. | |
Version: 0.1.1 | |
Author: Matt Wiebe | |
Author URI: http://somadesign.ca/ | |
*/ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Moderation Buddy | |
Description: A friendly assistent to make sure you don't get behind on your comment moderation tasks. | |
Version: 0.1 | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ | |
class CWS_Moderation_Buddy_Plugin { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'genesis_post_content', 'child_add_pinterest_link', 15 ); | |
/** | |
* Add pinterest link after post. | |
* | |
* Conditionally limited to single post. Remove the first conditional | |
* to make it show up on archive pages too. | |
* | |
* @since 1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Possibly amend the loop. | |
* | |
* Specify the conditions under which the grid loop should be used. | |
* | |
* @author Bill Erickson | |
* @author Gary Jones | |
* @link http://code.garyjones.co.uk/genesis-grid-loop-advanced/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Post_Taxonomy_Columns_And_Filter { | |
/** | |
* Constructor | |
*/ | |
function Post_Taxonomy_Columns_And_Filter() { | |
add_filter( 'manage_edit-mycustomposttype_columns', array( $this, 'manage_mycustomposttype_columns' ) ); | |
add_action( 'manage_mycustomposttype_posts_custom_column', array( $this, 'show_mycustomposttype_columns' ) ); |
OlderNewer