Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #22022, comment 1


Ignore:
Timestamp:
01/05/2013 07:01:03 AM (11 years ago)
Author:
jjharr
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22022, comment 1

    v2 v3  
    11Providing a simpler explanation and a patch in hopes that something happens with this issue :
    22
    3 '''Simpler explanation''' : in menu-header.php, the 'parent_file' filter runs before the get_admin_page_parent() function, but the get_admin_page_parent() function can change $parent_file, overriding the filter and rendering in ineffective. So the filter needs to run after that function.
     3'''Simpler explanation''' : in menu-header.php, the 'parent_file' filter, which allows the user to set $parent_file, runs before the get_admin_page_parent() function. But the get_admin_page_parent() function can change $parent_file, overriding the filter value and rendering it ineffective. So the filter needs to run after that function.
    44
    55'''Patch''' : All this does is swap the filter and function lines. The only way this would break existing code is if someone was relying on the internal behavior of get_admin_page_parent() to override the value they set in their filter function - which is not very likely.