Make WordPress Core

Changeset 34103


Ignore:
Timestamp:
09/14/2015 01:31:12 AM (11 years ago)
Author:
wonderboymusic
Message:

Pass $r and $pages to the 'wp_dropdown_pages' and 'wp_list_pages' filters.

Props bigdawggi, SergeyBiryukov.
Fixes #23734.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-template.php

    r33669 r34103  
    10551055         *
    10561056         * @since 2.1.0
     1057         * @since 4.4.0 `$r` and `$pages` added as arguments.
    10571058         *
    10581059         * @param string $output HTML output for drop down list of pages.
    1059          */
    1060         $html = apply_filters( 'wp_dropdown_pages', $output );
     1060         * @param array  $r      The parsed arguments array.
     1061         * @param array  $pages  List of WP_Post objects returned by `get_pages()`
     1062         */
     1063        $html = apply_filters( 'wp_dropdown_pages', $output, $r, $pages );
    10611064
    10621065        if ( $r['echo'] ) {
     
    11621165         *
    11631166         * @since 1.5.1
     1167         * @since 4.4.0 `$pages` added as arguments.
    11641168         *
    11651169         * @see wp_list_pages()
     
    11671171         * @param string $output HTML output of the pages list.
    11681172         * @param array  $r      An array of page-listing arguments.
    1169          */
    1170         $html = apply_filters( 'wp_list_pages', $output, $r );
     1173         * @param array  $pages  List of WP_Post objects returned by `get_pages()`
     1174         */
     1175        $html = apply_filters( 'wp_list_pages', $output, $r, $pages );
    11711176
    11721177        if ( $r['echo'] ) {
Note: See TracChangeset for help on using the changeset viewer.