[wp-trac] [WordPress Trac] #20595: Collapsible Admin menu fails if items are added by code
WordPress Trac
wp-trac at lists.automattic.com
Wed May 2 07:48:14 UTC 2012
#20595: Collapsible Admin menu fails if items are added by code
--------------------------------------------+------------------------------
Reporter: digitaldonkey | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 3.3.1
Severity: normal | Resolution:
Keywords: dev-feedback reporter-feedback |
--------------------------------------------+------------------------------
Comment (by digitaldonkey):
Replying to [comment:1 SergeyBiryukov]:
> What code do you use to create the menu item? The one in the forums
thread doesn't seem to be a correct way to do that.
>
> A correct example:
http://codex.wordpress.org/Plugin_API/Action_Reference/admin_menu
The standard way using add_submenu_page() requires to have a file and a
actual subpage as far as I know.
I require a link which will only add a get var in order to implement some
cache-clear, loading the current-admin page.
Is there a reason, why the action-hook is not called before collapse-menu-
button? Then everything will work as expected.
{{{
function clearcachify_menue() {
?>
<li class="wp-not-current-submenu menu-top menu-top-last" id="menu-
clearcachifyclear">
<div class="wp-menu-image">
<a href="<?php print $GLOBALS['cache-clear-uri']; ?>"><img alt="" src
="/wp-admin/images/generic.png"></a> </div>
<div class="wp-menu-arrow">
<div></div>
</div>
<a href="<?php print $GLOBALS['cache-clear-uri']; ?>" class="wp-
not-current-submenu menu-top " tabindex="1">Clear Cache</a>
</li>
<?php }
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20595#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list