Skip to content

Commit

Permalink
Users: Restore spacing between the messages on Edit User screen.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
SergeyBiryukov committed Jun 26, 2024
1 parent c235b8d commit 36e6d98
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/wp-admin/edit-tag-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@
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,
Expand Down
11 changes: 8 additions & 3 deletions src/wp-admin/user-edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,19 +214,24 @@

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,
array(
'id' => 'message',
'dismissible' => true,
'additional_classes' => array( 'updated' ),
'paragraph_wrap' => false,
)
);
endif;
Expand Down

0 comments on commit 36e6d98

Please sign in to comment.