[wp-trac] [WordPress Trac] #20956: Navigation changes: Posts/Pages

WordPress Trac wp-trac at lists.automattic.com
Thu Jun 14 20:19:05 UTC 2012


#20956: Navigation changes: Posts/Pages
-------------------------+------------------------------
 Reporter:  jane         |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  UI           |     Version:  3.4
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------------------

Comment (by martythornley):

 Just added a quick patch that allows a filter to change the $menu array by
 either name (edit.php) or the numerical key.

 http://core.trac.wordpress.org/attachment/ticket/20956/20956.2.patch

 I used the following to alter the "Posts" menu item to read "Blog":

 add_filter( 'menu_items' , 'custom_menu_items' , 1, 2 );

 function custom_menu_items( $menu , $menu_pages ){
         $menu[$menu_pages['edit.php']][0] = "Blog";
         return $menu;
 }

 I think there might be a few places within that same file to add similar
 filters. I just added it at the top, before some other changes are made to
 the menu. But it seems to work. :)

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


More information about the wp-trac mailing list