WordPress.org

Make WordPress Core

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


Ignore:
Timestamp:
01/05/2013 06:58:13 AM (5 years ago)
Author:
jjharr
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22022, comment 1

    v1 v2  
    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 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.
    44
    5 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.
     5'''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.
    66
    77=====================