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 | |
/** | |
* Include metabox only on children of Parent | |
* @author Jon Brown | |
* @link | |
* | |
* @param bool $display | |
* @param array $meta_box | |
* @return bool display metabox |
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
/** | |
* jb_load_stylesheet add cssfx class to stylesheet() | |
*/ | |
remove_action( 'genesis_meta', 'genesis_load_stylesheet' ); | |
add_action( 'genesis_meta', 'jb_load_stylesheet_cssfx' ); | |
function jb_load_stylesheet_cssfx() { | |
echo '<link rel="stylesheet" href="'.get_bloginfo( 'stylesheet_url' ).'" type="text/css" media="screen" class="cssfx"/>'."\n"; | |
wp_enqueue_script('jb_cssfx', CHILD_URL.'/lib/js/cssfx.min.js', array('jquery'), TRUE); | |
} |
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
add_action( 'wp_before_admin_bar_render', 'jb_admin_bar_items' ); | |
/** | |
* Customize Admin Bar Items (add Plugins) | |
*/ | |
function jb_admin_bar_items() { | |
global $wp_admin_bar; | |
if ( current_user_can( 'activate_plugins' ) ) | |
$wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'plugins', 'title' => __('Plugins'), 'href' => admin_url('plugins.php') ) ); | |
} |
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 | |
// Modifiy WP-Rotator | |
remove_action('wp_rotator', 'wp_rotator'); | |
add_action('wp_rotator', 'custom_rotator'); | |
/* Custom Rotator */ | |
function custom_rotator() { | |
echo custom_rotator_markup(); | |
} |
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
if ( ! function_exists( 'wp_new_user_notification' ) ) : | |
function wp_new_user_notification( $user_id, $plaintext_pass = '' ) { | |
return | |
} | |
endif; |
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 | |
// Remove obnoxious giant Synthesis admin notice for inactive plugins and themes | |
if (method_exists('Synthesis_Software_Monitor','inactive_plugin_notifications')) | |
remove_action( 'admin_notices', array( 'Synthesis_Software_Monitor', 'inactive_plugin_notifications' ) ); |
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: Damn Vulnerable WordPress Plugin | |
* Description: Intentionally vulnerable plugin for plugin author education | |
* Version: 0.1 | |
* Plugin URI: http://make.wordpress.org/plugins/2013/04/09/intentionally-vulnerable-plugin/ | |
* Author: Jon Cave | |
* Author URI: http://joncave.co.uk | |
* License: GPLv2+ | |
* | |
* DO NOT RUN THIS PLUGIN ON AN INTERNET ACCESSIBLE SITE |
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
# replace databasename, name, fullname, password, [email protected], http://domain.com, display_name | |
# make sure user_id number 99 isn't already in use, if it is change it in all 3 lines. | |
INSERT INTO `#databasename#`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('99', '#user_login#', MD5('#user_pass#'), '#user_nicename#', '#[email protected]#', '#http://domain.com#', '2013-01-01 00:00:00', '', '0', '#display_name#'); | |
INSERT INTO `#databasename#`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '99', 'wp_capabilities', 'a:1:{s:13:"administrator";b:1;}'); | |
INSERT INTO `#databasename#`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '99', 'wp_user_level', '10'); |
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
/** | |
* Jon Brown's Local WordPress configuration file | |
* | |
* @Author Jon Brown <http://wanderingjon.com> | |
* @Version 3.0 | |
* @Author URI http://www.jbrownstudios.com | |
* @Atributuon Mark Jaquith <http://markjaquith.wordpress.com/2011/06/24/wordpress-local-dev-tips/> | |
* @License GPLv2 | |
*/ |
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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = array( |
OlderNewer