mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Editor: Ensure that the block editor can be used on the page post type.
Additionally, add a notice for when you are editing the "latest posts" page. Fixes #45537. Props cameronjonesweb, swissspidy, hannahmalcolm, Fantasy1125, ArnaudBan, grantmkin, youknowriad, knutsp, SergeyBiryukov, audrasjb, whyisjake. git-svn-id: https://develop.svn.wordpress.org/trunk@51116 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2674,3 +2674,20 @@ function wp_star_rating( $args = array() ) {
|
||||
function _wp_posts_page_notice() {
|
||||
echo '<div class="notice notice-warning inline"><p>' . __( 'You are currently editing the page that shows your latest posts.' ) . '</p></div>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output a notice when editing the page for posts in the block editor (internal use only).
|
||||
*
|
||||
* @ignore
|
||||
* @since 5.8.0
|
||||
*/
|
||||
function _wp_block_editor_posts_page_notice() {
|
||||
wp_add_inline_script(
|
||||
'wp-notices',
|
||||
sprintf(
|
||||
'wp.data.dispatch( "core/notices" ).createWarningNotice( "%s", { isDismissible: false } )',
|
||||
__( 'You are currently editing the page that shows your latest posts.' )
|
||||
),
|
||||
'after'
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user