From 36e6d98a228729c2993b3c7921d9a31efca55d0a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 26 Jun 2024 15:21:26 +0000 Subject: [PATCH] Users: Restore spacing between the messages on Edit User screen. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Includes restoring paragraph tags for “User updated” and “← Go to Users” messages, so that the arrow is not on the same line as the previous message. Follow-up to [56570]. Props Presskopp, narenin, swissspidy, SergeyBiryukov. Fixes #61506. git-svn-id: https://develop.svn.wordpress.org/trunk@58581 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/edit-tag-form.php | 6 +++++- src/wp-admin/user-edit.php | 11 ++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/wp-admin/edit-tag-form.php b/src/wp-admin/edit-tag-form.php index ba2e187de43a..0b59e36c84cc 100644 --- a/src/wp-admin/edit-tag-form.php +++ b/src/wp-admin/edit-tag-form.php @@ -77,7 +77,11 @@ if ( $message ) { $message = '

' . $message . '

'; if ( $wp_http_referer ) { - $message .= '

' . esc_html( $tax->labels->back_to_items ) . '

'; + $message .= sprintf( + '

%2$s

', + esc_url( wp_validate_redirect( sanitize_url( $wp_http_referer ), admin_url( 'term.php?taxonomy=' . $taxonomy ) ) ), + esc_html( $tax->labels->back_to_items ) + ); } wp_admin_notice( $message, diff --git a/src/wp-admin/user-edit.php b/src/wp-admin/user-edit.php index 0ab9aec48f06..f66a54d85fbb 100644 --- a/src/wp-admin/user-edit.php +++ b/src/wp-admin/user-edit.php @@ -214,12 +214,16 @@ if ( isset( $_GET['updated'] ) ) : if ( IS_PROFILE_PAGE ) : - $message = '' . __( 'Profile updated.' ) . ''; + $message = '

' . __( 'Profile updated.' ) . '

'; else : - $message = '' . __( 'User updated.' ) . ''; + $message = '

' . __( 'User updated.' ) . '

'; endif; if ( $wp_http_referer && ! str_contains( $wp_http_referer, 'user-new.php' ) && ! IS_PROFILE_PAGE ) : - $message .= '' . __( '← Go to Users' ) . ''; + $message .= sprintf( + '

%2$s

', + esc_url( wp_validate_redirect( sanitize_url( $wp_http_referer ), self_admin_url( 'users.php' ) ) ), + __( '← Go to Users' ) + ); endif; wp_admin_notice( $message, @@ -227,6 +231,7 @@ 'id' => 'message', 'dismissible' => true, 'additional_classes' => array( 'updated' ), + 'paragraph_wrap' => false, ) ); endif;