WordPress.org

Make WordPress Core

Changeset 7850


Ignore:
Timestamp:
04/29/2008 04:08:19 PM (10 years ago)
Author:
ryan
Message:

widget_title filters from jhodgdon. fixes #6684

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/widgets.php

    r7849 r7850  
    382382    $options = get_option( 'widget_pages' );
    383383
    384     $title = empty( $options['title'] ) ? __( 'Pages' ) : $options['title'];
     384    $title = empty( $options['title'] ) ? __( 'Pages' ) : apply_filters('widget_title', $options['title']);
    385385    $sortby = empty( $options['sortby'] ) ? 'menu_order' : $options['sortby'];
    386386    $exclude = empty( $options['exclude'] ) ? '' : $options['exclude'];
     
    475475    $c = $options['count'] ? '1' : '0';
    476476    $d = $options['dropdown'] ? '1' : '0';
    477     $title = empty($options['title']) ? __('Archives') : $options['title'];
     477    $title = empty($options['title']) ? __('Archives') : apply_filters('widget_title', $options['title']);
    478478
    479479    echo $before_widget;
     
    523523    extract($args);
    524524    $options = get_option('widget_meta');
    525     $title = empty($options['title']) ? __('Meta') : $options['title'];
     525    $title = empty($options['title']) ? __('Meta') : apply_filters('widget_title', $options['title']);
    526526?>
    527527        <?php echo $before_widget; ?>
     
    557557    extract($args);
    558558    $options = get_option('widget_calendar');
    559     $title = $options['title'];
     559    $title = apply_filters('widget_title', $options['title']);
    560560    if ( empty($title) )
    561561        $title = '&nbsp;';
     
    594594        return;
    595595
    596     $title = $options[$number]['title'];
     596    $title = apply_filters('widget_title', $options[$number]['title']);
    597597    $text = apply_filters( 'widget_text', $options[$number]['text'] );
    598598?>
     
    706706    $d = $options[$number]['dropdown'] ? '1' : '0';
    707707
    708     $title = empty($options[$number]['title']) ? __('Categories') : $options[$number]['title'];
     708    $title = empty($options[$number]['title']) ? __('Categories') : apply_filters('widget_title', $options[$number]['title']);
    709709
    710710    echo $before_widget;
     
    891891    extract($args);
    892892    $options = get_option('widget_recent_entries');
    893     $title = empty($options['title']) ? __('Recent Posts') : $options['title'];
     893    $title = empty($options['title']) ? __('Recent Posts') : apply_filters('widget_title', $options['title']);
    894894    if ( !$number = (int) $options['number'] )
    895895        $number = 10;
     
    956956    extract($args, EXTR_SKIP);
    957957    $options = get_option('widget_recent_comments');
    958     $title = empty($options['title']) ? __('Recent Comments') : $options['title'];
     958    $title = empty($options['title']) ? __('Recent Comments') : apply_filters('widget_title', $options['title']);
    959959    if ( !$number = (int) $options['number'] )
    960960        $number = 5;
     
    10621062    if ( empty($title) )
    10631063        $title = __('Unknown Feed');
     1064    $title = apply_filters('widget_title', $title );
    10641065    $url = clean_url(strip_tags($url));
    10651066    if ( file_exists(dirname(__FILE__) . '/rss.png') )
     
    13541355    extract($args);
    13551356    $options = get_option('widget_tag_cloud');
    1356     $title = empty($options['title']) ? __('Tags') : $options['title'];
     1357    $title = empty($options['title']) ? __('Tags') : apply_filters('widget_title', $options['title']);
    13571358
    13581359    echo $before_widget;
Note: See TracChangeset for help on using the changeset viewer.