Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/wp-content/themes/twentyten/functions.php

    r17478 r15391  
    7878    add_editor_style();
    7979
    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 
    8380    // This theme uses post thumbnails
    8481    add_theme_support( 'post-thumbnails' );
     
    105102
    106103    // Your changeable header business starts here
    107     if ( ! defined( 'HEADER_TEXTCOLOR' ) )
    108         define( 'HEADER_TEXTCOLOR', '' );
    109 
     104    define( 'HEADER_TEXTCOLOR', '' );
    110105    // 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' );
    113107
    114108    // The height and width of your custom header. You can hook into the theme's own filters to change these values.
     
    123117
    124118    // 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 );
    127120
    128121    // Add a way for the custom header to be styled in the admin panel that controls
     
    283276 * Remove inline styles printed when the gallery shortcode is used.
    284277 *
    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
    301281 * @return string The gallery style filter, with the styles themselves removed.
    302282 */
     
    304284    return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css );
    305285}
    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' );
     286add_filter( 'gallery_style', 'twentyten_remove_gallery_css' );
    309287
    310288if ( ! function_exists( 'twentyten_comment' ) ) :
     
    331309        </div><!-- .comment-author .vcard -->
    332310        <?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>
    334312            <br />
    335313        <?php endif; ?>
     
    355333    ?>
    356334    <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>
    358336    <?php
    359337            break;
     
    447425 * function tied to the widgets_init action hook.
    448426 *
    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  *
    453427 * @since Twenty Ten 1.0
    454428 */
    455429function 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' ) );
    457432}
    458433add_action( 'widgets_init', 'twentyten_remove_recent_comments_style' );
     
    460435if ( ! function_exists( 'twentyten_posted_on' ) ) :
    461436/**
    462  * Prints HTML with meta information for the current post-date/time and author.
     437 * Prints HTML with meta information for the current postdate/time and author.
    463438 *
    464439 * @since Twenty Ten 1.0
Note: See TracChangeset for help on using the changeset viewer.