Changes from branches/3.0/wp-content/themes/twentyten/functions.php at r15391 to trunk/wp-content/themes/twentyten/functions.php at r17478
- File:
-
- 1 edited
-
trunk/wp-content/themes/twentyten/functions.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyten/functions.php
r15391 r17478 78 78 add_editor_style(); 79 79 80 // Post Format support. You can also use the legacy "gallery" or "asides" (note the plural) categories. 81 add_theme_support( 'post-formats', array( 'aside', 'gallery' ) ); 82 80 83 // This theme uses post thumbnails 81 84 add_theme_support( 'post-thumbnails' ); … … 102 105 103 106 // Your changeable header business starts here 104 define( 'HEADER_TEXTCOLOR', '' ); 107 if ( ! defined( 'HEADER_TEXTCOLOR' ) ) 108 define( 'HEADER_TEXTCOLOR', '' ); 109 105 110 // No CSS, just IMG call. The %s is a placeholder for the theme template directory URI. 106 define( 'HEADER_IMAGE', '%s/images/headers/path.jpg' ); 111 if ( ! defined( 'HEADER_IMAGE' ) ) 112 define( 'HEADER_IMAGE', '%s/images/headers/path.jpg' ); 107 113 108 114 // The height and width of your custom header. You can hook into the theme's own filters to change these values. … … 117 123 118 124 // Don't support text inside the header image. 119 define( 'NO_HEADER_TEXT', true ); 125 if ( ! defined( 'NO_HEADER_TEXT' ) ) 126 define( 'NO_HEADER_TEXT', true ); 120 127 121 128 // Add a way for the custom header to be styled in the admin panel that controls … … 276 283 * Remove inline styles printed when the gallery shortcode is used. 277 284 * 278 * Galleries are styled by the theme in Twenty Ten's style.css. 279 * 280 * @since Twenty Ten 1.0 285 * Galleries are styled by the theme in Twenty Ten's style.css. This is just 286 * a simple filter call that tells WordPress to not use the default styles. 287 * 288 * @since Twenty Ten 1.2 289 */ 290 add_filter( 'use_default_gallery_style', '__return_false' ); 291 292 /** 293 * Deprecated way to remove inline styles printed when the gallery shortcode is used. 294 * 295 * This function is no longer needed or used. Use the use_default_gallery_style 296 * filter instead, as seen above. 297 * 298 * @since Twenty Ten 1.0 299 * @deprecated Deprecated in Twenty Ten 1.2 for WordPress 3.1 300 * 281 301 * @return string The gallery style filter, with the styles themselves removed. 282 302 */ … … 284 304 return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css ); 285 305 } 286 add_filter( 'gallery_style', 'twentyten_remove_gallery_css' ); 306 // Backwards compatibility with WordPress 3.0. 307 if ( version_compare( $GLOBALS['wp_version'], '3.1', '<' ) ) 308 add_filter( 'gallery_style', 'twentyten_remove_gallery_css' ); 287 309 288 310 if ( ! function_exists( 'twentyten_comment' ) ) : … … 309 331 </div><!-- .comment-author .vcard --> 310 332 <?php if ( $comment->comment_approved == '0' ) : ?> 311 <em ><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em>333 <em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em> 312 334 <br /> 313 335 <?php endif; ?> … … 333 355 ?> 334 356 <li class="post pingback"> 335 <p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'twentyten'), ' ' ); ?></p>357 <p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' ); ?></p> 336 358 <?php 337 359 break; … … 425 447 * function tied to the widgets_init action hook. 426 448 * 449 * This function uses a filter (show_recent_comments_widget_style) new in WordPress 3.1 450 * to remove the default style. Using Twenty Ten 1.2 in WordPress 3.0 will show the styles, 451 * but they won't have any effect on the widget in default Twenty Ten styling. 452 * 427 453 * @since Twenty Ten 1.0 428 454 */ 429 455 function twentyten_remove_recent_comments_style() { 430 global $wp_widget_factory; 431 remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) ); 456 add_filter( 'show_recent_comments_widget_style', '__return_false' ); 432 457 } 433 458 add_action( 'widgets_init', 'twentyten_remove_recent_comments_style' ); … … 435 460 if ( ! function_exists( 'twentyten_posted_on' ) ) : 436 461 /** 437 * Prints HTML with meta information for the current post —date/time and author.462 * Prints HTML with meta information for the current post-date/time and author. 438 463 * 439 464 * @since Twenty Ten 1.0
Note: See TracChangeset
for help on using the changeset viewer.