mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Use the create_posts post type cap in more places. Remove the janky create_posts meta cap. see #16714.
git-svn-id: https://develop.svn.wordpress.org/trunk@22908 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -363,13 +363,16 @@ function wp_admin_bar_my_sites_menu( $wp_admin_bar ) {
|
||||
'href' => admin_url(),
|
||||
) );
|
||||
|
||||
if ( current_user_can( 'edit_posts' ) ) {
|
||||
if ( current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'parent' => $menu_id,
|
||||
'id' => $menu_id . '-n',
|
||||
'title' => __( 'New Post' ),
|
||||
'href' => admin_url( 'post-new.php' ),
|
||||
) );
|
||||
}
|
||||
|
||||
if ( current_user_can( 'edit_posts' ) ) {
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'parent' => $menu_id,
|
||||
'id' => $menu_id . '-c',
|
||||
|
||||
Reference in New Issue
Block a user