Changeset 51116
- Timestamp:
- 06/08/2021 10:37:34 PM (3 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-form-blocks.php
r51090 r51116 314 314 wp_add_inline_script( 'wp-edit-post', $script ); 315 315 316 if ( (int) get_option( 'page_for_posts' ) === (int) $post->ID ) { 317 add_action( 'admin_enqueue_scripts', '_wp_block_editor_posts_page_notice' ); 318 } 319 316 320 require_once ABSPATH . 'wp-admin/admin-header.php'; 317 321 ?> -
trunk/src/wp-admin/includes/post.php
r51027 r51116 2135 2135 } 2136 2136 2137 // The posts page can't be edited in the block editor.2138 if ( absint( get_option( 'page_for_posts' ) ) === $post->ID && empty( $post->post_content ) ) {2139 return false;2140 }2141 2142 2137 $use_block_editor = use_block_editor_for_post_type( $post->post_type ); 2143 2138 -
trunk/src/wp-admin/includes/template.php
r51011 r51116 2675 2675 echo '<div class="notice notice-warning inline"><p>' . __( 'You are currently editing the page that shows your latest posts.' ) . '</p></div>'; 2676 2676 } 2677 2678 /** 2679 * Output a notice when editing the page for posts in the block editor (internal use only). 2680 * 2681 * @ignore 2682 * @since 5.8.0 2683 */ 2684 function _wp_block_editor_posts_page_notice() { 2685 wp_add_inline_script( 2686 'wp-notices', 2687 sprintf( 2688 'wp.data.dispatch( "core/notices" ).createWarningNotice( "%s", { isDismissible: false } )', 2689 __( 'You are currently editing the page that shows your latest posts.' ) 2690 ), 2691 'after' 2692 ); 2693 }
Note: See TracChangeset
for help on using the changeset viewer.