In the admin bar an admin can create a new post by using the add new drop down. In there I want to change the label Post
to something else.
How can I do this? I just need the code to make the change in the admin bar as I have the code already to change the Post label everywhere else in the admin section.
Bonus points if you can tell me how to change the order of the labels in the drop down too.
Found my answer including my full solution:
Just needed change the label
$labels->name_admin_bar = 'Corporate News';
Looking through the function
wp_admin_bar_new_content_menu( $wp_admin_bar )
that deals with placing these drop down menu items there are no filters or hooks there that will allow me to change the order so I can only presume its not doable without some JS hacks.UPDATE: If you find this answer, please don’t do this. Use
$wp_post_types['post']->labels->name_admin_bar
instead, as shown above.Sloppy and hackish, I know, but here’s how I changed “Post” under the “New” dropdown in the admin bar to read “Project”:
As far as I know, you can’t, cause there is no filter applied to that label. (Check
wp-includes/admin-bar.php
, line 364).But you can remove the current one, and add your own link to do the same function, i. e. add new post. Check this to know the method.
Here is a quite well written tut about it and even more..
http://wp.tutsplus.com/tutorials/creative-coding/customizing-your-wordpress-admin/