submenu_file
Filters the file of an admin menu sub-menu item.
Usage
add_filter( 'submenu_file', 'wp_kama_submenu_file_filter', 10, 2 ); /** * Function for `submenu_file` filter-hook. * * @param string $submenu_file The submenu file. * @param string $parent_file The submenu item's parent file. * * @return string */ function wp_kama_submenu_file_filter( $submenu_file, $parent_file ){ // filter... return $submenu_file; }
- $submenu_file(string)
- The submenu file.
- $parent_file(string)
- The submenu item's parent file.
Changelog
Since 4.4.0 | Introduced. |
Where the hook is called
In file: /wp-admin/menu-header.php
wp-admin/menu-header.php 48
$submenu_file = apply_filters( 'submenu_file', $submenu_file, $parent_file );