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_nav_menu_css_class' ) ) { | |
function ucc_nav_menu_css_class( $classes, $item, $args ) { | |
$class = sanitize_title( $item->title ); | |
$classes[] = 'menu-item-' . $class; | |
return $classes; | |
} } | |
add_filter( 'nav_menu_css_class', 'ucc_nav_menu_css_class', 10, 3 ); |
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( '__return_empty_string' ) ) { | |
function __return_empty_string() { | |
return ''; | |
} } | |
add_filter( 'the_generator', '__return_empty_string' ); | |
?> |
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 | |
// Based on http://svn.automattic.com/wordpress/trunk/wp-admin/includes/dashboard.php | |
if ( ! function_exists( 'ucc_right_now_content_table_end' ) ) { | |
function ucc_right_now_content_table_end() { | |
$args = array( | |
'public' => true , | |
'_builtin' => false | |
); | |
$output = 'object'; |
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_filter' ) ) { | |
function ucc_ozh_ta_insert_tweets_post_filter( $postarr ) { | |
$offset = get_option( 'gmt_offset' ) * 3600; | |
$date = date( 'Y-m-d H:i:s', strtotime( $postarr['post_date'] . ' UTC' ) + $offset ); | |
$postarr['post_date'] = $date; | |
return $postarr; | |
} } |
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_upload_dir_wp31' ) ) { | |
function ucc_upload_dir_wp31( $uploads ) { | |
// Set these options in Network Admin > Sites > Edit > Settings > Upload Path and Upload Url Path. | |
$upload_path = get_option( 'upload_path' ); // Example: /home/username/public_html/wp-content/blogs.dir/2/files | |
$upload_url_path = get_option( 'upload_url_path' ); // Example: http://sub.domain.com/wp-content/blogs.dir/2/files | |
$uploads['baseurl'] = $upload_url_path; | |
$uploads['url'] = $upload_url_path . $uploads[ 'subdir' ]; |
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_upload_dir_wp30' ) ) { | |
function ucc_upload_dir_wp30( $uploads ) { | |
// Set these options in Super Admin > Sites > Edit > Upload Path and Upload Url Path. | |
$upload_path = get_option( 'upload_path' ); // Example: /home/username/public_html/wp-content/blogs.dir/2/files | |
$fileupload_url = get_option( 'fileupload_url' ); // Example: http://sub.domain.com/wp-content/blogs.dir/2/files | |
$uploads['baseurl'] = $fileupload_url; | |
$uploads['url'] = $fileupload_url . $uploads[ 'subdir' ]; |
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 | |
$postarr['tax_input']['post_format'] = 'post-format-aside'; | |
$postarr['tax_input']['post_format'] = 'post-format-chat'; | |
$postarr['tax_input']['post_format'] = 'post-format-gallery'; | |
$postarr['tax_input']['post_format'] = 'post-format-link'; | |
$postarr['tax_input']['post_format'] = 'post-format-image'; | |
$postarr['tax_input']['post_format'] = 'post-format-quote'; | |
$postarr['tax_input']['post_format'] = 'post-format-status'; | |
$postarr['tax_input']['post_format'] = 'post-format-video'; |
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_theme_support( 'post-formats', array( 'aside', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video', 'audio' ) ); | |
if ( ! function_exists( 'ucc_hybrid_entry_title' ) ) { | |
function ucc_hybrid_entry_title( $title ) { | |
global $post; | |
// Get rid of title on Status (tweets). | |
if ( has_post_format( 'status' ) ) { |
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_fix_image_add_caption_shortcode' ) ) { | |
function ucc_fix_image_add_caption_shortcode( $shcode, $html ) { | |
$shcode = str_replace( array( '>', '<', '"', ''' ), | |
array( '>', '<', '"', "'" ), | |
$shcode ); | |
return( $shcode ); | |
} } |
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_remove_curly_quotes' ) ) { | |
function ucc_remove_curly_quotes( $content ) { | |
$content = str_replace( array( '“', '”', '“', '”', '“', '”' ), '"', $content ); | |
$content = str_replace( array( '‘', '’', '‘', '’', '‘', '’' ), "'", $content ); | |
return $content; | |
} } | |
add_filter( 'content_save_pre', 'ucc_remove_curly_quotes' ); |
OlderNewer