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
Verifying my Blockstack ID is secured with the address 1KecTY34FUtg2epggbdZ7H6BLZG5Wf2qFU https://explorer.blockstack.org/address/1KecTY34FUtg2epggbdZ7H6BLZG5Wf2qFU |
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 ( ! function_exists( 'ucc_post_format_feedwordpress_syndicated_post' ) ) { | |
function ucc_post_format_feedwordpress_syndicated_post ( $data ) { | |
$feed = $data['meta']['syndication_feed']; | |
// Adjust stripos contents as needed. | |
if ( stripos( 'delicious.com', $feed ) !== false ) { | |
$data['tax_input']['post_format'] = 'post-format-link'; | |
} elseif ( stripos( 'tumblr.com', $feed ) !== false ) { |
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 ( ! function_exists( 'ucc_ozh_ta_insert_tweets_post' ) ) { | |
function ucc_ozh_ta_insert_tweets_post( $data ) { | |
// Replace values of [tax_input][category] and [post_type] with appropriate values. | |
$data['tax_input']['category'] = '1,2'; | |
$data['post_type'] = 'tweet'; | |
return $data; | |
} } | |
add_filter( 'ozh_ta_insert_tweets_post' , 'ucc_ozh_ta_insert_tweets_post' ); |
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 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, |
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 ( !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 ); |
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 ( ! 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>'; |
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 ( ! 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 ) ); |
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 | |
// 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; |
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 | |
// 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"; |
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 ( ! function_exists( 'ucc_add_cpts_to_pre_get_posts' ) ) { | |
function ucc_add_cpts_to_pre_get_posts( $query ) { | |
if ( $query->is_main_query() && ! is_post_type_archive() && ! is_singular() && ! is_404() ) { | |
$my_post_type = get_query_var( 'post_type' ); | |
if ( empty( $my_post_type ) ) { | |
$args = array( | |
'exclude_from_search' => false, | |
'public' => true, |
NewerOlder