wp_dropdown_pages filter-hookWP 2.1.0

Filters the HTML output of a list of pages as a dropdown.

Usage

add_filter( 'wp_dropdown_pages', 'wp_kama_dropdown_pages_filter', 10, 3 );

/**
 * Function for `wp_dropdown_pages` filter-hook.
 * 
 * @param string    $output      HTML output for dropdown list of pages.
 * @param array     $parsed_args The parsed arguments array. See wp_dropdown_pages() for information on accepted arguments.
 * @param WP_Post[] $pages       Array of the page objects.
 *
 * @return string
 */
function wp_kama_dropdown_pages_filter( $output, $parsed_args, $pages ){

	// filter...
	return $output;
}
$output(string)
HTML output for dropdown list of pages.
$parsed_args(array)
The parsed arguments array. See wp_dropdown_pages() for information on accepted arguments.
$pages(WP_Post[])
Array of the page objects.

Changelog

Since 2.1.0 Introduced.
Since 4.4.0 $parsed_args and $pages added as arguments.

Where the hook is called

wp_dropdown_pages()
wp_dropdown_pages
wp-includes/post-template.php 1243
$html = apply_filters( 'wp_dropdown_pages', $output, $parsed_args, $pages );

Where the hook is used in WordPress

Usage not found.