Make WordPress Core

Opened 2 years ago

Last modified 6 months ago

#61503 new defect (bug)

Hook parent_file

Reported by: drashka Owned by:
Priority: normal Milestone: Awaiting Review
Component: Administration Version: 6.5.5
Severity: minor Keywords: has-patch
Cc: Focuses:

Description

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

Change History (1)

This ticket was mentioned in ​PR #11485 on ​WordPress/wordpress-develop by ​vishalsingh098.


6 months ago
#1

  • Keywords has-patch added; needs-patch removed

Fixes ​https://core.trac.wordpress.org/ticket/61503

Trac ticket:

## Use of AI Tools

Note: See TracTickets for help on using tickets.