Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function cases_add_new_content_menu_item( $wp_admin_bar ) {
- if ( ! post_type_exists( 'cases' ) || ! current_user_can( 'edit_posts' ) )
- return;
- $wp_admin_bar->add_menu( array(
- 'parent' => 'new-content',
- 'id' => 'new-case',
- 'title' => 'Дело',
- 'href' => admin_url( 'post-new.php?post_type=cases' )
- ) );
- }
- add_action( 'admin_bar_menu', 'cases_add_new_content_menu_item' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement