diff --git wp-admin/includes/plugin.php wp-admin/includes/plugin.php
index f305ef9..481e0b6 100644
|
|
|
function get_admin_page_parent( $parent = '' ) { |
| 1413 | 1413 | foreach ( $submenu[$parent] as $submenu_array ) { |
| 1414 | 1414 | if ( isset( $_wp_real_parent_file[$parent] ) ) |
| 1415 | 1415 | $parent = $_wp_real_parent_file[$parent]; |
| 1416 | | if ( !empty($typenow) && ($submenu_array[2] == "$pagenow?post_type=$typenow") ) { |
| | 1416 | if ( !empty($typenow) && ( isset( $submenu_array[2] ) && $submenu_array[2] == "$pagenow?post_type=$typenow") ) { |
| 1417 | 1417 | $parent_file = $parent; |
| 1418 | 1418 | return $parent; |
| 1419 | | } elseif ( $submenu_array[2] == $pagenow && empty($typenow) && ( empty($parent_file) || false === strpos($parent_file, '?') ) ) { |
| | 1419 | } elseif ( isset( $submenu_array[2] ) && $submenu_array[2] == $pagenow && empty($typenow) && ( empty($parent_file) || false === strpos($parent_file, '?') ) ) { |
| 1420 | 1420 | $parent_file = $parent; |
| 1421 | 1421 | return $parent; |
| 1422 | 1422 | } else |
diff --git wp-admin/index.php wp-admin/index.php
index dd429e7..3c7270d 100644
|
|
|
if ( current_user_can( 'moderate_comments' ) ) |
| 76 | 76 | $help .= '<p>' . __('<strong>Recent Comments</strong> - Shows the most recent comments on your posts (configurable, up to 30) and allows you to moderate them.') . '</p>'; |
| 77 | 77 | if ( current_user_can( 'publish_posts' ) ) |
| 78 | 78 | $help .= '<p>' . __('<strong>Incoming Links</strong> - Shows links to your site found by Google Blog Search.') . '</p>'; |
| 79 | | if ( current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) { |
| 80 | | $help .= '<p>' . __('<strong>QuickPress</strong> - Allows you to create a new post and either publish it or save it as a draft.') . '</p>'; |
| 81 | | $help .= '<p>' . __('<strong>Recent Drafts</strong> - Displays links to the 5 most recent draft posts you’ve started.') . '</p>'; |
| | 79 | if( post_type_exists( 'post ' ) ) { |
| | 80 | if ( current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) { |
| | 81 | $help .= '<p>' . __('<strong>QuickPress</strong> - Allows you to create a new post and either publish it or save it as a draft.') . '</p>'; |
| | 82 | $help .= '<p>' . __('<strong>Recent Drafts</strong> - Displays links to the 5 most recent draft posts you’ve started.') . '</p>'; |
| | 83 | } |
| 82 | 84 | } |
| 83 | 85 | $help .= '<p>' . __('<strong>WordPress Blog</strong> - Latest news from the official WordPress project.') . '</p>'; |
| 84 | 86 | $help .= '<p>' . __('<strong>Other WordPress News</strong> - Shows the <a href="http://planet.wordpress.org" target="_blank">WordPress Planet</a> feed. You can configure it to show a different feed of your choosing.') . '</p>'; |
diff --git wp-admin/menu.php wp-admin/menu.php
index 90c585d..fa7aa87 100644
|
|
|
$menu[4] = array( '', 'read', 'separator1', '', 'wp-menu-separator' ); |
| 49 | 49 | $menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', '', 'open-if-no-js menu-top menu-icon-post', 'menu-posts', 'none' ); |
| 50 | 50 | $submenu['edit.php'][5] = array( __('All Posts'), 'edit_posts', 'edit.php' ); |
| 51 | 51 | /* translators: add new post */ |
| 52 | | $submenu['edit.php'][10] = array( _x('Add New', 'post'), get_post_type_object( 'post' )->cap->create_posts, 'post-new.php' ); |
| | 52 | |
| | 53 | if( post_type_exists( 'post' ) ) { |
| | 54 | $submenu['edit.php'][10] = array( _x('Add New', 'post'), get_post_type_object( 'post' )->cap->create_posts, 'post-new.php' ); |
| | 55 | } |
| 53 | 56 | |
| 54 | 57 | $i = 15; |
| 55 | 58 | foreach ( get_taxonomies( array(), 'objects' ) as $tax ) { |
diff --git wp-includes/admin-bar.php wp-includes/admin-bar.php
index 6af1021..87bfdb0 100644
|
|
|
function wp_admin_bar_my_sites_menu( $wp_admin_bar ) { |
| 362 | 362 | 'title' => __( 'Dashboard' ), |
| 363 | 363 | 'href' => admin_url(), |
| 364 | 364 | ) ); |
| 365 | | |
| 366 | | if ( current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) { |
| 367 | | $wp_admin_bar->add_menu( array( |
| 368 | | 'parent' => $menu_id, |
| 369 | | 'id' => $menu_id . '-n', |
| 370 | | 'title' => __( 'New Post' ), |
| 371 | | 'href' => admin_url( 'post-new.php' ), |
| 372 | | ) ); |
| | 365 | |
| | 366 | if( post_type_exists( 'post' ) ) { |
| | 367 | if ( current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) { |
| | 368 | $wp_admin_bar->add_menu( array( |
| | 369 | 'parent' => $menu_id, |
| | 370 | 'id' => $menu_id . '-n', |
| | 371 | 'title' => __( 'New Post' ), |
| | 372 | 'href' => admin_url( 'post-new.php' ), |
| | 373 | ) ); |
| | 374 | } |
| 373 | 375 | } |
| 374 | 376 | |
| 375 | 377 | if ( current_user_can( 'edit_posts' ) ) { |