wp_list_pages filter-hookWP 1.5.1

Filters the HTML output of the pages to list.

Usage

add_filter( 'wp_list_pages', 'wp_kama_list_pages_filter', 10, 3 );

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

	// filter...
	return $output;
}
$output(string)
HTML output of the pages list.
$parsed_args(array)
An array of page-listing arguments. See wp_list_pages() for information on accepted arguments.
$pages(WP_Post[])
Array of the page objects.

Changelog

Since 1.5.1 Introduced.
Since 4.4.0 $pages added as arguments.

Where the hook is called

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

Where the hook is used in WordPress

Usage not found.