I hereby claim:
- I am jmdodd on github.
- I am jmdodd (https://keybase.io/jmdodd) on keybase.
- I have a public key whose fingerprint is 3700 3C68 F60E 8294 0A34 FBF3 D0AC 9489 3A6B A29A
To claim this, I am signing this object:
Verifying my Blockstack ID is secured with the address 1KecTY34FUtg2epggbdZ7H6BLZG5Wf2qFU https://explorer.blockstack.org/address/1KecTY34FUtg2epggbdZ7H6BLZG5Wf2qFU |
I hereby claim:
To claim this, I am signing this object:
<?php | |
function ucc_get_calendar( $post_types = '', $initial = true, $echo = true ) { | |
global $wpdb, $m, $monthnum, $year, $wp_locale, $posts; | |
// Set and verify post types to fetch | |
if ( empty( $post_types ) || !is_array( $post_types ) ) { | |
$args = array( | |
'public' => true, | |
'_builtin' => false, |
if ( !function_exists( 'ucc_oembed_twitter_lang' ) ) { | |
function ucc_oembed_twitter_lang( $provider, $url, $args ) { | |
if ( 'twitter.com' == parse_url( $url, PHP_URL_HOST ) ) { | |
if ( defined( 'WPLANG' ) ) | |
$lang = strtolower( WPLANG ); | |
if ( empty( $lang ) ) | |
$lang = 'en'; | |
$args['lang'] = $lang; | |
$provider = add_query_arg( 'lang', urlencode( $lang ), $provider ); |
<?php | |
if ( ! function_exists( 'ucc_profile_field_datebox_year_range' ) ) { | |
function ucc_profile_field_datebox_year_range( $html, $type, $day, $month, $year, $field_id, $date ) { | |
if ( 'year' == $type ) { | |
$current_year = date( 'Y' ); | |
$past_year = $current_year - 3; | |
$future_year = $current_year + 3; | |
$html = ''; | |
$html .= '<option value=""' . selected( $year, '', false ) . '>----</option>'; |
<?php | |
if ( ! function_exists( 'ucc_set_user_to_spammer' ) ) { | |
function ucc_set_user_to_spammer( $userid, $role ) { | |
global $wpdb; | |
$userid = abs( intval( $userid ) ); | |
$wp_roles = new WP_Roles; | |
if ( $wp_roles->is_role( $role ) && ( $role == 'suspended' ) ) { | |
$wpdb->update( $wpdb->users, array( 'user_status' => 1 ), array( 'ID' => $userid ) ); |
<?php | |
// Example usage: ucc_bp_locate_template( 'template/index.php', true, true, __FILE__ ). | |
if ( ! function_exists( 'ucc_bp_locate_template' ) ) { | |
function ucc_bp_locate_template( $template_names, $load = false, $require_once = true, $file = '' ) { | |
$located = ''; | |
foreach ( (array) $template_names as $template_name ) { | |
if ( ! $template_name ) | |
continue; |
<?php | |
// You will need to replace the in_category( 'twit' ) conditional with one that fits your own setup. | |
if ( ! function_exists( 'ucc_twitter_oembed_the_content' ) ) { | |
function ucc_twitter_oembed_the_content( $content ) { | |
global $post; | |
$screen_name = 'YOUR_SCREEN_NAME_HERE'; | |
if ( in_category( 'twit' ) ) { | |
$tweet_url = "http://twitter.com/#!/{$screen_name}/status/" . get_post_meta( $post->ID, 'ozh_ta_id', true ); | |
$content = "\n[embed]{$tweet_url}[/embed]\n"; |
<?php | |
if ( ! function_exists( 'ucc_include_custom_post_types' ) ) { | |
function ucc_include_custom_post_types( $query ) { | |
// Don't break admin or preview pages. This is also a good place to exclude feed with ! is_feed() if desired. | |
if ( ! is_preview() && ! is_admin() && ! is_singular() ) { | |
$args = array( | |
'public' => true , | |
'_builtin' => false | |
); |
<?php | |
if ( ! function_exists( 'ucc_request_filter' ) ) { | |
function ucc_request_filter( $query ) { | |
// Preview does not like having post_type set; feed is my personal preference. | |
if ( empty( $query['preview'] ) && empty( $query['feed'] ) ) { | |
$my_post_type = $query['post_type']; | |
if ( empty( $my_post_type ) ) { | |
$query['post_type'] = 'any'; | |
} |