mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 07:07:04 +00:00
Administration: Use wp_admin_notice() for .updated.
Add usages of `wp_admin_notice()` and `wp_get_admin_notice()` on `.updated` in the root level of `/wp-admin/`. Ongoing task to implement new function across core. Props costdev, joedolson. See #57791. git-svn-id: https://develop.svn.wordpress.org/trunk@56573 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -139,25 +139,25 @@ if ( ! is_multisite() ) {
|
||||
<p class="description" id="new-admin-email-description"><?php _e( 'This address is used for admin purposes. If you change this, an email will be sent to your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>' ); ?></p>
|
||||
<?php
|
||||
$new_admin_email = get_option( 'new_admin_email' );
|
||||
if ( $new_admin_email && get_option( 'admin_email' ) !== $new_admin_email ) :
|
||||
?>
|
||||
<div class="updated inline">
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: New admin email. */
|
||||
__( 'There is a pending change of the admin email to %s.' ),
|
||||
'<code>' . esc_html( $new_admin_email ) . '</code>'
|
||||
);
|
||||
printf(
|
||||
' <a href="%1$s">%2$s</a>',
|
||||
esc_url( wp_nonce_url( admin_url( 'options.php?dismiss=new_admin_email' ), 'dismiss-' . get_current_blog_id() . '-new_admin_email' ) ),
|
||||
__( 'Cancel' )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
if ( $new_admin_email && get_option( 'admin_email' ) !== $new_admin_email ) {
|
||||
$pending_admin_email_message = sprintf(
|
||||
/* translators: %s: New admin email. */
|
||||
__( 'There is a pending change of the admin email to %s.' ),
|
||||
'<code>' . esc_html( $new_admin_email ) . '</code>'
|
||||
);
|
||||
$pending_admin_email_message .= sprintf(
|
||||
' <a href="%1$s">%2$s</a>',
|
||||
esc_url( wp_nonce_url( admin_url( 'options.php?dismiss=new_admin_email' ), 'dismiss-' . get_current_blog_id() . '-new_admin_email' ) ),
|
||||
__( 'Cancel' )
|
||||
);
|
||||
wp_admin_notice(
|
||||
$pending_admin_email_message,
|
||||
array(
|
||||
'additional_classes' => array( 'updated', 'inline' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user