parent_file
Filter HookDescription
Filters the parent file of an admin menu sub-menu item. Allows plugins to move sub-menu items around.Hook Information
File Location |
wp-admin/menu-header.php
View on GitHub
|
Hook Type | Filter |
Line Number | 43 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$parent_file
|
The parent file. |
Usage Examples
Basic Usage
<?php
// Hook into parent_file
add_filter('parent_file', 'my_custom_filter', 10, 1);
function my_custom_filter($parent_file) {
// Your custom filtering logic here
return $parent_file;
}
Source Code Context
wp-admin/menu-header.php:43
- How this hook is used in WordPress core
<?php
38 *
39 * @since MU (3.0.0)
40 *
41 * @param string $parent_file The parent file.
42 */
43 $parent_file = apply_filters( 'parent_file', $parent_file );
44
45 /**
46 * Filters the file of an admin menu sub-menu item.
47 *
48 * @since 4.4.0
PHP Documentation
<?php
/**
* Filters the parent file of an admin menu sub-menu item.
*
* Allows plugins to move sub-menu items around.
*
* @since MU (3.0.0)
*
* @param string $parent_file The parent file.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-admin/menu-header.php
Related Hooks
Related hooks will be displayed here in future updates.