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 | |
/* | |
* Use Taxonomy Images filter to get all speakers | |
* associated with the current post. | |
*/ | |
$speakers = apply_filters( 'taxonomy-images-get-the-terms', '', array( | |
'taxonomy' => 'category', | |
) ); |
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 | |
// secure hashing of passwords using bcrypt, needs PHP 5.3+ | |
// see http://codahale.com/how-to-safely-store-a-password/ | |
// salt for bcrypt needs to be 22 base64 characters (but just [./0-9A-Za-z]), see http://php.net/crypt | |
// just an example; please use something more secure/random than sha1(microtime) :) | |
$salt = substr(str_replace('+', '.', base64_encode(sha1(microtime(true), true))), 0, 22); | |
// 2a is the bcrypt algorithm selector, see http://php.net/crypt |
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
-moz-user-select: none; | |
-khtml-user-select: none; | |
-webkit-user-select: none; | |
user-select: none; |
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: Mfields Github Shortcode | |
Plugin URI: null | |
Description: Display recent commits from a Github repository. | |
Version: 0.1 | |
Author: Michael Fields | |
Author URI: http://wordpress.mfields.org/ | |
License: GPLv2 or later |
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 | |
if ( ! have_posts() ) { | |
/** | |
* @todo Some kinda 404 stuff here... | |
*/ | |
} | |
/* | |
* Loop for Sticky Posts. | |
*/ |
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( 'load-edit.php', 'myplugin_setup_edit_screen' ); | |
function myplugin_setup_edit_screen() { | |
$screen = get_current_screen(); | |
if ( 'my_post_type' != $screen->post_type ) { | |
return; | |
} | |
add_action( 'admin_print_styles', 'myplugin_edit_screen_css' ); |
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 | |
function mytheme_get_background_color() { | |
$color = get_background_color(); | |
if ( ! ctype_xdigit( $color ) ) | |
return 'transparent'; | |
if ( ! in_array( strlen( $color ), array( 3, 6 ) ) ) | |
return 'transparent'; | |
return '#' . $color; | |
} |
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
if ( defined('WP_USE_THEMES') && WP_USE_THEMES ) : | |
$template = false; | |
if ( is_404() && $template = get_404_template() ) : | |
elseif ( is_search() && $template = get_search_template() ) : | |
elseif ( is_tax() && $template = get_taxonomy_template() ) : | |
elseif ( is_front_page() && $template = get_front_page_template() ) : | |
elseif ( is_home() && $template = get_home_template() ) : | |
elseif ( is_attachment() && $template = get_attachment_template() ) : | |
remove_filter('the_content', 'prepend_attachment'); | |
elseif ( is_single() && $template = get_single_template() ) : |
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: sudfglkusdfglksdfkghj | |
*/ | |
function sudfglkusdfglksdfkghj( $content ) { | |
global $wp_version; | |
$version = '3.3-beta4'; | |
if ( $wp_version == $version ) |
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
function is_rgb( $x ) { | |
if ( is_int( $x ) ) | |
$x = strval( $x ); | |
if ( ! is_string( $x ) ) | |
return false; | |
$x = preg_replace( '/\s*/', '', $x ); | |
$x = strtolower( $x ); | |
$x = trim( $x ); |