WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/02/2017 10:01:19 PM (3 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-pages.php

    r41162 r41685  
    4848         *
    4949         * @param string $title    The widget title. Default 'Pages'.
    50          * @param array  $instance An array of the widget's settings.
     50         * @param array  $instance Array of settings for the current widget.
    5151         * @param mixed  $id_base  The widget ID.
    5252         */
     
    6363         *
    6464         * @since 2.8.0
     65         * @since 4.9.0 Added the `$instance` parameter.
    6566         *
    6667         * @see wp_list_pages()
    6768         *
    68          * @param array $args An array of arguments to retrieve the pages list.
     69         * @param array $args     An array of arguments to retrieve the pages list.
     70         * @param array $instance Array of settings for the current widget.
    6971         */
    7072        $out = wp_list_pages( apply_filters( 'widget_pages_args', array(
     
    7375            'sort_column' => $sortby,
    7476            'exclude'     => $exclude
    75         ) ) );
     77        ), $instance ) );
    7678
    7779        if ( ! empty( $out ) ) {
Note: See TracChangeset for help on using the changeset viewer.