[wp-trac] Re: [WordPress Trac] #5427: WordPress should not include
a file
indicated by a URL query string that has not been specified in an
add_submenu_page call
WordPress Trac
wp-trac at lists.automattic.com
Sun Feb 10 01:37:28 GMT 2008
#5427: WordPress should not include a file indicated by a URL query string that
has not been specified in an add_submenu_page call
----------------------------------------+-----------------------------------
Reporter: johnbillion | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.6
Component: Administration | Version: 2.3.1
Severity: normal | Resolution:
Keywords: add_submenu_page has-patch |
----------------------------------------+-----------------------------------
Comment (by DD32):
The $menu array has a structure like this:
{{{
42 =>
array
0 => string 'PHP Run' (length=7)
1 => string 'administrator' (length=13)
2 => string 'php-run/app.php' (length=15)
3 => string 'PHP Run' (length=7)
}}}
the $submenu has a structure like this:
{{{
'options-general.php' =>
array
40 =>
array
0 => string 'Miscellaneous' (length=13)
1 => string 'manage_options' (length=14)
2 => string 'options-misc.php' (length=16)
41 =>
array
0 => string 'DeviantArt' (length=10)
1 => string 'administrator' (length=13)
2 => string 'ddeviantart/dda_options.php' (length=27)
3 => string 'dDeviantArt' (length=11)
}}}
[0] is the Link title, [1] is the permission required for it, [2] is the
file that its been told to include, [3] is the Page title(Which is
manually set for hte default pages when they're called directly).
It might be possible to simplify it down a bit, so that the submenu search
only takes place for the file we're looking at right now.. have a look at
the extra patch, There was a reason why i didnt do that before i think,
But i cant seem to find a reason it wouldnt work.
--
Ticket URL: <http://trac.wordpress.org/ticket/5427#comment:5>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list