[wp-trac] [WordPress Trac] #18850: hidden admin page

WordPress Trac wp-trac at lists.automattic.com
Mon May 7 07:29:53 UTC 2012


#18850: hidden admin page
-------------------------------+------------------------------
 Reporter:  ibotty             |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  General            |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  admin page hidden  |
-------------------------------+------------------------------

Comment (by SidHarrell):

 I found this: http://stackoverflow.com/questions/3902760/how-do-you-add-a
 -wordpress-admin-page-without-adding-it-to-the-menu

 I used it like so:

 {{{
 public function register_page() {
                 global $_registered_pages;

                 $menu_slug = 'restaurant_category_editor';
                 $hookname = get_plugin_page_hookname($menu_slug, '');
                 if (!empty($hookname)) {
                         add_action($hookname, array(&$this,
 'render_edit_page'));
                 }
                 $_registered_pages[$hookname] = true;
         }
 }}}
 And when I browse to: http://chinadelight.info/wp-
 admin/admin.php?page=restaurant_category_editor
 I get my "hello world!" output of the redering function.
 should be easy enough to turn into a core function by moving the
 $menu_slug and the callback into the parameters.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18850#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list