This file contains hidden or 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
| # Will produce command line prompts like | |
| # directory(branch) $ | |
| # in git repositories and like | |
| # directory $ | |
| # elsewhere. | |
| # If there are unstaged changes in the repository, there will be an asterisk next to the branch name: | |
| # directory(branch*) $ | |
| parse_git_branch() { | |
| hasmod="" |
This file contains hidden or 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
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteRule ^(wp-admin/.*)$ /wp/$1 [L] | |
| RewriteRule ^(wp-[^/]+\.php)$ /wp/$1 [L] | |
| RewriteRule ^xmlrpc\.php$ /wp/xmlrpc.php [L] | |
| RewriteRule ^(wp-includes/.*)$ /wp/$1 [L] | |
| </IfModule> | |
| # BEGIN WordPress |
This file contains hidden or 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 | |
| abstract class JPB_Options { | |
| /** | |
| * The database option name value. Must be declared in extending classes. | |
| * @var string | |
| */ | |
| protected $_option_name = null; |
This file contains hidden or 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 JPB_User_Caps { | |
| /** | |
| * An array of all protected roles | |
| * @var array | |
| */ | |
| protected $protectedRoles = array( | |
| 'webmaster', |
This file contains hidden or 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: Disable plugins when doing local dev | |
| Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify | |
| Version: 0.1 | |
| License: GPL version 2 or any later version | |
| Author: Mark Jaquith | |
| Author URI: http://coveredwebservices.com/ | |
| */ |
This file contains hidden or 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
| // Define a JSON data-structure that will look and perform like the real deal | |
| // What is common to every post? Lets examine the details: | |
| var forumData = { // Defining the object structure | |
| "Posts" : [ // array of Posts | |
| // single post item in the array | |
| { | |
| // definition of properties | |
| "id" : "1", | |
| "user" : "Melvin", | |
| "title" : "Yes, I beleive you have my stapler...", |
This file contains hidden or 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: TinyMCE Advanced Multisite Fixer | |
| * Description: Forces TinyMCE Advanced to use site options for its settings when it's network activated. | |
| * Version: 0.1 | |
| * Author: John P. Bloch | |
| * Author URI: http://www.johnpbloch.com/ | |
| */ |
This file contains hidden or 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 | |
| namespace JPB; | |
| function wp_insert_post_data( $data, $postarr ){ | |
| if($data['foo'] !== 'bar' || $data['baz'] !== 'bat'){ | |
| wp_redirect( add_query_arg( array( 'post' => $data['ID'], 'action' => 'edit', 'message' => 11 ), admin_url( 'post.php' ) ) ); | |
| exit; | |
| } | |
| return $data; |
This file contains hidden or 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: Query Thief | |
| * Description: Hijacking the main WordPress query and loop for fun and profit | |
| * Version: 0.1 | |
| */ | |
| // I namespace everything now that PHP 5.2.4 is the minimum requirement. :D | |
| namespace JPB; |
NewerOlder