Posts, Post Types: Wrap text submitted via Quick Draft dashboard widget in the Paragraph block.
Props audrasjb, jeroenrotty. Fixes #48120. Built from https://develop.svn.wordpress.org/trunk@47191 git-svn-id: http://core.svn.wordpress.org/trunk@46991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
44288356e2
commit
0544629460
|
@ -96,6 +96,14 @@ switch ( $action ) {
|
||||||
$_POST['comment_status'] = get_default_comment_status( $post->post_type );
|
$_POST['comment_status'] = get_default_comment_status( $post->post_type );
|
||||||
$_POST['ping_status'] = get_default_comment_status( $post->post_type, 'pingback' );
|
$_POST['ping_status'] = get_default_comment_status( $post->post_type, 'pingback' );
|
||||||
|
|
||||||
|
// Wrap Quick Draft content in the Paragraph block.
|
||||||
|
if ( false === strpos( $_POST['content'], '<!-- wp:paragraph -->' ) ) {
|
||||||
|
$_POST['content'] = sprintf(
|
||||||
|
'<!-- wp:paragraph -->%s<!-- /wp:paragraph -->',
|
||||||
|
str_replace( array( "\r\n", "\r", "\n" ), '<br />', $_POST['content'] )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
edit_post();
|
edit_post();
|
||||||
wp_dashboard_quick_press();
|
wp_dashboard_quick_press();
|
||||||
exit;
|
exit;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.4-alpha-47190';
|
$wp_version = '5.4-alpha-47191';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue