From bae7312f03cb867ea11b3bef7a60bd3fb0222046 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Mon, 14 Sep 2015 01:32:24 +0000 Subject: [PATCH] Pass `$r` and `$pages` to the 'wp_dropdown_pages' and 'wp_list_pages' filters. Props bigdawggi, SergeyBiryukov. Fixes #23734. Built from https://develop.svn.wordpress.org/trunk@34103 git-svn-id: http://core.svn.wordpress.org/trunk@34071 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post-template.php | 11 ++++++++--- wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index b85a77339e..faf75ab4cc 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -1054,10 +1054,13 @@ function wp_dropdown_pages( $args = '' ) { * Filter the HTML output of a list of pages as a drop down. * * @since 2.1.0 + * @since 4.4.0 `$r` and `$pages` added as arguments. * * @param string $output HTML output for drop down list of pages. - */ - $html = apply_filters( 'wp_dropdown_pages', $output ); + * @param array $r The parsed arguments array. + * @param array $pages List of WP_Post objects returned by `get_pages()` + */ + $html = apply_filters( 'wp_dropdown_pages', $output, $r, $pages ); if ( $r['echo'] ) { echo $html; @@ -1161,13 +1164,15 @@ function wp_list_pages( $args = '' ) { * Filter the HTML output of the pages to list. * * @since 1.5.1 + * @since 4.4.0 `$pages` added as arguments. * * @see wp_list_pages() * * @param string $output HTML output of the pages list. * @param array $r An array of page-listing arguments. + * @param array $pages List of WP_Post objects returned by `get_pages()` */ - $html = apply_filters( 'wp_list_pages', $output, $r ); + $html = apply_filters( 'wp_list_pages', $output, $r, $pages ); if ( $r['echo'] ) { echo $html; diff --git a/wp-includes/version.php b/wp-includes/version.php index 29d9ffd6da..b8e3f8a574 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34102'; +$wp_version = '4.4-alpha-34103'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.