Users: Restore spacing between the messages on Edit User screen.

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.
Built from https://develop.svn.wordpress.org/trunk@58581


git-svn-id: http://core.svn.wordpress.org/trunk@58028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2024-06-26 15:23:14 +00:00
parent 13d010f2d6
commit c15614f3cb
3 changed files with 14 additions and 5 deletions

View File

@ -77,7 +77,11 @@ $class = ( isset( $msg ) && 5 === $msg ) ? 'error' : 'success';
if ( $message ) {
$message = '<p><strong>' . $message . '</strong></p>';
if ( $wp_http_referer ) {
$message .= '<p><a href="' . esc_url( wp_validate_redirect( sanitize_url( $wp_http_referer ), admin_url( 'term.php?taxonomy=' . $taxonomy ) ) ) . '">' . esc_html( $tax->labels->back_to_items ) . '</a></p>';
$message .= sprintf(
'<p><a href="%1$s">%2$s</a></p>',
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,

View File

@ -214,12 +214,16 @@ switch ( $action ) {
if ( isset( $_GET['updated'] ) ) :
if ( IS_PROFILE_PAGE ) :
$message = '<strong>' . __( 'Profile updated.' ) . '</strong>';
$message = '<p><strong>' . __( 'Profile updated.' ) . '</strong></p>';
else :
$message = '<strong>' . __( 'User updated.' ) . '</strong>';
$message = '<p><strong>' . __( 'User updated.' ) . '</strong></p>';
endif;
if ( $wp_http_referer && ! str_contains( $wp_http_referer, 'user-new.php' ) && ! IS_PROFILE_PAGE ) :
$message .= '<a href="' . esc_url( wp_validate_redirect( sanitize_url( $wp_http_referer ), self_admin_url( 'users.php' ) ) ) . '">' . __( '&larr; Go to Users' ) . '</a>';
$message .= sprintf(
'<p><a href="%1$s">%2$s</a></p>',
esc_url( wp_validate_redirect( sanitize_url( $wp_http_referer ), self_admin_url( 'users.php' ) ) ),
__( '&larr; Go to Users' )
);
endif;
wp_admin_notice(
$message,
@ -227,6 +231,7 @@ switch ( $action ) {
'id' => 'message',
'dismissible' => true,
'additional_classes' => array( 'updated' ),
'paragraph_wrap' => false,
)
);
endif;

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.7-alpha-58580';
$wp_version = '6.7-alpha-58581';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.