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 | |
/** | |
* Location: functions.php | |
* | |
*/ | |
// comment out as necessary | |
// use for styling 'format-{type}' class generated from post_class() in the loop | |
if ( function_exists( 'add_theme_support' ) ) { | |
add_theme_support('post-formats', |
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 | |
/** | |
* Location: functions.php | |
* | |
*/ | |
// drop in functions.php | |
if ( function_exists( 'add_theme_support' ) ) { | |
add_theme_support( 'post-thumbnails' ); | |
add_theme_support( 'post-thumbnails', array('post', 'movie')); // include array of post_types (including registered ones) |
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 | |
/** | |
* Adding shortcodes to the post-editing section: functions.php | |
* http://net.tutsplus.com/tutorials/wordpress/wordpress-shortcodes-the-right-way/ | |
* | |
**/ | |
/** |
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 email_members($post_ID) { | |
global $wpdb; | |
// fetch the list of users registered | |
foreach( $wpdb->get_results("SELECT user_email FROM $wpdb->users;") as $key => $object) { | |
$user_emails[] = $object->user_email; | |
} | |
$users = implode(',', $user_emails); |
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 objectSize(the_object) { | |
/* function to validate the existence of each key in the object to get the number of valid keys. */ | |
var object_size = 0; | |
for (key in the_object){ | |
if (the_object.hasOwnProperty(key)) { | |
object_size++; | |
} | |
} | |
return object_size; | |
} |
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
update wp_options set option_value = replace(option_value,'string_to_find','string_to_replace'); | |
update wp_posts set guid = replace(guid,'string_to_find','string_to_replace'); |
NewerOlder