Make WordPress Core


Ignore:
Timestamp:
05/10/2009 09:14:37 AM (16 years ago)
Author:
azaozz
Message:

Add filters for default widgets calling template functions, props Denis-de-Bernardy, fixes #9780

File:
1 edited

Legend:

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

    r11228 r11254  
    3030            $sortby = 'menu_order, post_title';
    3131
    32         $out = wp_list_pages( array('title_li' => '', 'echo' => 0, 'sort_column' => $sortby, 'exclude' => $exclude) );
     32        $out = wp_list_pages( apply_filters('widget_pages_args', array('title_li' => '', 'echo' => 0, 'sort_column' => $sortby, 'exclude' => $exclude) ) );
    3333
    3434        if ( !empty( $out ) ) {
     
    213213        if ( $d ) {
    214214?>
    215         <select name="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'> <option value=""><?php echo esc_attr(__('Select Month')); ?></option> <?php wp_get_archives("type=monthly&format=option&show_post_count=$c"); ?> </select>
     215        <select name="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'> <option value=""><?php echo esc_attr(__('Select Month')); ?></option> <?php wp_get_archives(apply_filters('widget_archives_dropdown_args', array('type' => 'monthly', 'format' => 'option', 'show_post_count' => $c))); ?> </select>
    216216<?php
    217217        } else {
    218218?>
    219219        <ul>
    220         <?php wp_get_archives("type=monthly&show_post_count=$c"); ?>
     220        <?php wp_get_archives(apply_filters('widget_archives_args', array('type' => 'monthly', 'show_post_count' => $c))); ?>
    221221        </ul>
    222222<?php
     
    427427        if ( $d ) {
    428428            $cat_args['show_option_none'] = __('Select Category');
    429             wp_dropdown_categories($cat_args);
     429            wp_dropdown_categories(apply_filters('widget_categories_dropdown_args', $cat_args));
    430430?>
    431431
     
    448448<?php
    449449        $cat_args['title_li'] = '';
    450         wp_list_categories($cat_args);
     450        wp_list_categories(apply_filters('widget_categories_args', $cat_args));
    451451?>
    452452        </ul>
     
    981981            echo $before_title . $title . $after_title;
    982982        echo '<div>';
    983         wp_tag_cloud();
     983        wp_tag_cloud(apply_filters('widget_tag_cloud_args', array()));
    984984        echo "</div>\n";
    985985        echo $after_widget;
Note: See TracChangeset for help on using the changeset viewer.