parent_file filter-hookWP 3.0.0

Filters the parent file of an admin menu sub-menu item.

Allows plugins to move sub-menu items around.


add_filter( 'parent_file', 'wp_kama_parent_file_filter' );

 * Function for `parent_file` filter-hook.
 * @param string $parent_file The parent file.
 * @return string
function wp_kama_parent_file_filter( $parent_file ){

	// filter...
	return $parent_file;
The parent file.


Since 3.0.0 Introduced.

Where the hook is called

In file: /wp-admin/menu-header.php
wp-admin/menu-header.php 38
$parent_file = apply_filters( 'parent_file', $parent_file );

Where the hook is used in WordPress

Usage not found.