Make WordPress Core


Ignore:
Timestamp:
10/02/2017 10:01:19 PM (9 years ago)
Author:
SergeyBiryukov
Message:

Widgets: Pass $instance to widget argument filters:

  • widget_archives_dropdown_args
  • widget_archives_args
  • widget_categories_dropdown_args
  • widget_categories_args
  • widget_meta_poweredby
  • widget_pages_args
  • widget_comments_args
  • widget_posts_args
  • widget_tag_cloud_args

See [33971] for widget_links_args and [34662] for widget_nav_menu_args.

Props Takahashi_Fumiki.
Fixes #38017.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets/class-wp-widget-recent-posts.php

    r41162 r41685  
    6060         *
    6161         * @since 3.4.0
     62         * @since 4.9.0 Added the `$instance` parameter.
    6263         *
    6364         * @see WP_Query::get_posts()
    6465         *
    65          * @param array $args An array of arguments used to retrieve the recent posts.
     66         * @param array $args     An array of arguments used to retrieve the recent posts.
     67         * @param array $instance Array of settings for the current widget.
    6668         */
    6769        $r = new WP_Query( apply_filters( 'widget_posts_args', array(
     
    7072            'post_status'         => 'publish',
    7173            'ignore_sticky_posts' => true
    72         ) ) );
     74        ), $instance ) );
    7375
    7476        if ($r->have_posts()) :
Note: See TracChangeset for help on using the changeset viewer.