diff --git src/wp-includes/admin-bar.php src/wp-includes/admin-bar.php
index d1d438d9e5..5e1f2b8fb0 100644
|
|
|
function wp_admin_bar_new_content_menu( $wp_admin_bar ) { |
| 940 | 940 | $actions['post-new.php?post_type=page'] = array( $cpts['page']->labels->name_admin_bar, 'new-page' ); |
| 941 | 941 | } |
| 942 | 942 | |
| 943 | | unset( $cpts['post'], $cpts['page'], $cpts['attachment'] ); |
| | 943 | if ( isset( $cpts['wp_block'] ) && true === use_block_editor_for_post_type( $cpts['wp_block']->name ) && current_user_can( $cpts['wp_block']->cap->create_posts ) ) { |
| | 944 | $actions['post-new.php?post_type=wp_block'] = array( $cpts['wp_block']->labels->name_admin_bar, 'new-wp_block' ); |
| | 945 | } |
| | 946 | |
| | 947 | unset( $cpts['post'], $cpts['page'], $cpts['attachment'], $cpts['wp_block'] ); |
| 944 | 948 | |
| 945 | 949 | // Add any additional custom post types. |
| 946 | 950 | foreach ( $cpts as $cpt ) { |
diff --git src/wp-includes/post.php src/wp-includes/post.php
index 22a37683ea..32ef33cb0b 100644
|
|
|
function create_initial_post_types() { |
| 307 | 307 | '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ |
| 308 | 308 | 'show_ui' => true, |
| 309 | 309 | 'show_in_menu' => false, |
| | 310 | 'show_in_admin_bar' => true, |
| 310 | 311 | 'rewrite' => false, |
| 311 | 312 | 'show_in_rest' => true, |
| 312 | 313 | 'rest_base' => 'blocks', |