[wp-trac] [WordPress Trac] #61503: Hook parent_file
WordPress Trac
noreply at wordpress.org
Tue Jun 25 20:12:24 UTC 2024
#61503: Hook parent_file
----------------------------+-----------------------------
Reporter: drashka | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 6.5.5
Severity: minor | Keywords: needs-patch
Focuses: |
----------------------------+-----------------------------
Hello,
I have a problem with one of the hooks on the admin side menu and I think
it's a bug.
I'm trying to add a link to add a custom post type under an ACF option
page. I've managed to set it up, but the menu doesn't display level 1 in
current correctly. So I used this hook available in **/wp-admin/menu-
header.php line 38**: {{{#!php
<?php
$parent_file = apply_filters( 'parent_file', $parent_file );
}}}
This filter does modify the parent_file, but on line 50, the call to the
get_admin_page_parent function overloads the data I've hooked into it. Is
this intended? If I pull up the function call, the problem is solved.
Thanks in advance!
Mathieu
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61503>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list