wp_page_menu_args
Filter HookDescription
Filters the arguments used to generate a page-based menu.Hook Information
File Location |
wp-includes/post-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1462 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$args
|
An array of page menu arguments. See wp_page_menu() for information on accepted arguments. |
Usage Examples
Basic Usage
<?php
// Hook into wp_page_menu_args
add_filter('wp_page_menu_args', 'my_custom_filter', 10, 1);
function my_custom_filter($args) {
// Your custom filtering logic here
return $args;
}
Source Code Context
wp-includes/post-template.php:1462
- How this hook is used in WordPress core
<?php
1457 * @see wp_page_menu()
1458 *
1459 * @param array $args An array of page menu arguments. See wp_page_menu()
1460 * for information on accepted arguments.
1461 */
1462 $args = apply_filters( 'wp_page_menu_args', $args );
1463
1464 $menu = '';
1465
1466 $list_args = $args;
1467
PHP Documentation
<?php
/**
* Filters the arguments used to generate a page-based menu.
*
* @since 2.7.0
*
* @see wp_page_menu()
*
* @param array $args An array of page menu arguments. See wp_page_menu()
* for information on accepted arguments.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/post-template.php
Related Hooks
Related hooks will be displayed here in future updates.