[wp-trac] [WordPress Trac] #12453: _wp_menu_output() needs to use add_query_arg()
WordPress Trac
wp-trac at lists.automattic.com
Wed Mar 3 11:48:38 UTC 2010
#12453: _wp_menu_output() needs to use add_query_arg()
--------------------------+-------------------------------------------------
Reporter: TobiasBg | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Post Types | Version:
Severity: normal | Keywords: needs-patch
--------------------------+-------------------------------------------------
Comment(by TobiasBg):
I narrowed this down some further:
The above mentioned redirect or wp_die is caused by
{{{user_can_access_admin_page()}}} returning false.
It is returning false, because {{{$_registered_pages[$hookname]}}} is not
set ([http://core.trac.wordpress.org/browser/trunk/wp-
admin/includes/plugin.php#L1353 here]).
{{{$hookname}}} has the value "posts_page_demo-plugin-slug", while the
expected hookname is "edit-phppost_typepage_page_demo-plugin-slug".
Both are generated by {{{get_plugin_page_hookname()}}}
([http://core.trac.wordpress.org/browser/trunk/wp-
admin/includes/plugin.php#L1352 here] for the isset-check and
[http://core.trac.wordpress.org/browser/trunk/wp-
admin/includes/plugin.php#L937 here] for the population in the array).
In {{{get_plugin_page_hookname()}}}, the difference between the two is
caused by differing {{{$admin_page_hooks[$parent]}}}
([http://core.trac.wordpress.org/browser/trunk/wp-
admin/includes/plugin.php#L1326 here]).
The hookname "edit-phppost_typepage_page_demo-plugin-slug" seems to come
from [http://core.trac.wordpress.org/browser/trunk/wp-admin/menu.php#L180
here], while the hookname "posts_page_demo-plugin-slug" seems to come from
[http://core.trac.wordpress.org/browser/trunk/wp-
admin/includes/plugin.php#L817 here].
Any ideas?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12453#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list