Make WordPress Core

Ticket #38017: 38017.2.diff

File 38017.2.diff, 7.2 KB (added by Takahashi_Fumiki, 9 years ago)

Added since tag for each doc.

  • src/wp-includes/widgets/class-wp-widget-archives.php

     
    6767                         * @see wp_get_archives()
    6868                         *
    6969                         * @param array $args An array of Archives widget drop-down arguments.
     70                         * @param array $instance Settings for the current Archives widget instance.
    7071                         */
    7172                        $dropdown_args = apply_filters( 'widget_archives_dropdown_args', array(
    7273                                'type'            => 'monthly',
    7374                                'format'          => 'option',
    7475                                'show_post_count' => $c
    75                         ) );
     76                        ), $instance );
    7677
    7778                        switch ( $dropdown_args['type'] ) {
    7879                                case 'yearly':
     
    104105                 * Filters the arguments for the Archives widget.
    105106                 *
    106107                 * @since 2.8.0
     108                 * @since 4.7.0 Added `$instance` argument.
    107109                 *
    108110                 * @see wp_get_archives()
    109111                 *
    110                  * @param array $args An array of Archives option arguments.
     112                 * @param array $args     An array of Archives option arguments.
     113                 * @param array $instance Array of settings for the current widget.
    111114                 */
    112115                wp_get_archives( apply_filters( 'widget_archives_args', array(
    113116                        'type'            => 'monthly',
    114117                        'show_post_count' => $c
    115                 ) ) );
     118                ), $instance ) );
    116119                ?>
    117120                </ul>
    118121                <?php
  • src/wp-includes/widgets/class-wp-widget-categories.php

     
    7979                         * @see wp_dropdown_categories()
    8080                         *
    8181                         * @param array $cat_args An array of Categories widget drop-down arguments.
     82                         * @param array $instance Array of settings for the current widget.
    8283                         */
    83                         wp_dropdown_categories( apply_filters( 'widget_categories_dropdown_args', $cat_args ) );
     84                        wp_dropdown_categories( apply_filters( 'widget_categories_dropdown_args', $cat_args, $instance ) );
    8485                        ?>
    8586
    8687<script type='text/javascript'>
     
    108109                 * Filters the arguments for the Categories widget.
    109110                 *
    110111                 * @since 2.8.0
     112                 * @since 4.7.0 Added `$instance` argument.
    111113                 *
    112114                 * @param array $cat_args An array of Categories widget options.
     115                 * @param array $instance Array of settings for the current widget.
    113116                 */
    114                 wp_list_categories( apply_filters( 'widget_categories_args', $cat_args ) );
     117                wp_list_categories( apply_filters( 'widget_categories_args', $cat_args, $instance ) );
    115118?>
    116119                </ul>
    117120<?php
  • src/wp-includes/widgets/class-wp-widget-meta.php

     
    6262                         * Filters the "Powered by WordPress" text in the Meta widget.
    6363                         *
    6464                         * @since 3.6.0
     65                         * @since 4.7.0 Added `$instance` argument.
    6566                         *
    6667                         * @param string $title_text Default title text for the WordPress.org link.
     68                         * @param array  $instance   Array of settings for the current widget.
    6769                         */
    6870                        echo apply_filters( 'widget_meta_poweredby', sprintf( '<li><a href="%s" title="%s">%s</a></li>',
    6971                                esc_url( __( 'https://wordpress.org/' ) ),
    7072                                esc_attr__( 'Powered by WordPress, state-of-the-art semantic personal publishing platform.' ),
    7173                                _x( 'WordPress.org', 'meta widget link text' )
    72                         ) );
     74                        ), $instance );
    7375
    7476                        wp_meta();
    7577                        ?>
  • src/wp-includes/widgets/class-wp-widget-pages.php

     
    6464                 * Filters the arguments for the Pages widget.
    6565                 *
    6666                 * @since 2.8.0
     67                 * @since 4.7.0 Added `$instance` argument.
    6768                 *
    6869                 * @see wp_list_pages()
    6970                 *
    70                  * @param array $args An array of arguments to retrieve the pages list.
     71                 * @param array $args     An array of arguments to retrieve the pages list.
     72                 * @param array $instance Array of settings for the current widget.
    7173                 */
    7274                $out = wp_list_pages( apply_filters( 'widget_pages_args', array(
    7375                        'title_li'    => '',
     
    7476                        'echo'        => 0,
    7577                        'sort_column' => $sortby,
    7678                        'exclude'     => $exclude
    77                 ) ) );
     79                ), $instance ) );
    7880
    7981                if ( ! empty( $out ) ) {
    8082                        echo $args['before_widget'];
  • src/wp-includes/widgets/class-wp-widget-recent-comments.php

     
    8888                 * Filters the arguments for the Recent Comments widget.
    8989                 *
    9090                 * @since 3.4.0
     91                 * @since 4.7.0 Added `$instance` argument.
    9192                 *
    9293                 * @see WP_Comment_Query::query() for information on accepted arguments.
    9394                 *
    9495                 * @param array $comment_args An array of arguments used to retrieve the recent comments.
     96                 * @param array $instance     Array of settings for the current widget.
    9597                 */
    9698                $comments = get_comments( apply_filters( 'widget_comments_args', array(
    9799                        'number'      => $number,
    98100                        'status'      => 'approve',
    99101                        'post_status' => 'publish'
    100                 ) ) );
     102                ), $instance ) );
    101103
    102104                $output .= $args['before_widget'];
    103105                if ( $title ) {
  • src/wp-includes/widgets/class-wp-widget-recent-posts.php

     
    6161                 * Filters the arguments for the Recent Posts widget.
    6262                 *
    6363                 * @since 3.4.0
     64                 * @since 4.7.0 Added `$instance` argument.
    6465                 *
    6566                 * @see WP_Query::get_posts()
    6667                 *
    67                  * @param array $args An array of arguments used to retrieve the recent posts.
     68                 * @param array $args     An array of arguments used to retrieve the recent posts.
     69                 * @param array $instance Array of settings for the current widget.
    6870                 */
    6971                $r = new WP_Query( apply_filters( 'widget_posts_args', array(
    7072                        'posts_per_page'      => $number,
     
    7173                        'no_found_rows'       => true,
    7274                        'post_status'         => 'publish',
    7375                        'ignore_sticky_posts' => true
    74                 ) ) );
     76                ), $instance ) );
    7577
    7678                if ($r->have_posts()) :
    7779                ?>
  • src/wp-includes/widgets/class-wp-widget-tag-cloud.php

     
    5858                 *
    5959                 * @since 2.8.0
    6060                 * @since 3.0.0 Added taxonomy drop-down.
     61                 * @since 4.7.0 Added `$instance` argument.
    6162                 *
    6263                 * @see wp_tag_cloud()
    6364                 *
    6465                 * @param array $current_taxonomy The taxonomy to use in the tag cloud. Default 'tags'.
     66                 * @param array $instance         Array of settings for the current widget.
    6567                 */
    6668                $tag_cloud = wp_tag_cloud( apply_filters( 'widget_tag_cloud_args', array(
    6769                        'taxonomy' => $current_taxonomy,
    6870                        'echo' => false
    69                 ) ) );
     71                ), $instance ) );
    7072
    7173                if ( empty( $tag_cloud ) ) {
    7274                        return;