Changes from trunk/wp-content/themes/twentyten/functions.php at r17478 to branches/3.0/wp-content/themes/twentyten/functions.php at r15391
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/wp-content/themes/twentyten/functions.php
r17478 r15391 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 83 80 // This theme uses post thumbnails 84 81 add_theme_support( 'post-thumbnails' ); … … 105 102 106 103 // Your changeable header business starts here 107 if ( ! defined( 'HEADER_TEXTCOLOR' ) ) 108 define( 'HEADER_TEXTCOLOR', '' ); 109 104 define( 'HEADER_TEXTCOLOR', '' ); 110 105 // No CSS, just IMG call. The %s is a placeholder for the theme template directory URI. 111 if ( ! defined( 'HEADER_IMAGE' ) ) 112 define( 'HEADER_IMAGE', '%s/images/headers/path.jpg' ); 106 define( 'HEADER_IMAGE', '%s/images/headers/path.jpg' ); 113 107 114 108 // The height and width of your custom header. You can hook into the theme's own filters to change these values. … … 123 117 124 118 // Don't support text inside the header image. 125 if ( ! defined( 'NO_HEADER_TEXT' ) ) 126 define( 'NO_HEADER_TEXT', true ); 119 define( 'NO_HEADER_TEXT', true ); 127 120 128 121 // Add a way for the custom header to be styled in the admin panel that controls … … 283 276 * Remove inline styles printed when the gallery shortcode is used. 284 277 * 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 * 278 * Galleries are styled by the theme in Twenty Ten's style.css. 279 * 280 * @since Twenty Ten 1.0 301 281 * @return string The gallery style filter, with the styles themselves removed. 302 282 */ … … 304 284 return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css ); 305 285 } 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' ); 286 add_filter( 'gallery_style', 'twentyten_remove_gallery_css' ); 309 287 310 288 if ( ! function_exists( 'twentyten_comment' ) ) : … … 331 309 </div><!-- .comment-author .vcard --> 332 310 <?php if ( $comment->comment_approved == '0' ) : ?> 333 <em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em>311 <em><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em> 334 312 <br /> 335 313 <?php endif; ?> … … 355 333 ?> 356 334 <li class="post pingback"> 357 <p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'twentyten'), ' ' ); ?></p>335 <p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __('(Edit)', 'twentyten'), ' ' ); ?></p> 358 336 <?php 359 337 break; … … 447 425 * function tied to the widgets_init action hook. 448 426 * 449 * This function uses a filter (show_recent_comments_widget_style) new in WordPress 3.1450 * 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 *453 427 * @since Twenty Ten 1.0 454 428 */ 455 429 function twentyten_remove_recent_comments_style() { 456 add_filter( 'show_recent_comments_widget_style', '__return_false' ); 430 global $wp_widget_factory; 431 remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) ); 457 432 } 458 433 add_action( 'widgets_init', 'twentyten_remove_recent_comments_style' ); … … 460 435 if ( ! function_exists( 'twentyten_posted_on' ) ) : 461 436 /** 462 * Prints HTML with meta information for the current post -date/time and author.437 * Prints HTML with meta information for the current post—date/time and author. 463 438 * 464 439 * @since Twenty Ten 1.0
Note: See TracChangeset
for help on using the changeset viewer.