From d2cc86d50845cf4bf0d678b0b1a4d7b41cfb06f7 Mon Sep 17 00:00:00 2001 From: joedolson Date: Thu, 14 Sep 2023 01:25:16 +0000 Subject: [PATCH] Administration: Use `wp_admin_notice()` in `/wp-includes/`. Add usages of `wp_admin_notice()` and `wp_get_admin_notice()` on `.notice-[type]` in the root level of `/wp-includes/`. Ongoing task to implement new function across core. Props costdev, joedolson. See #57791. Built from https://develop.svn.wordpress.org/trunk@56572 git-svn-id: http://core.svn.wordpress.org/trunk@56084 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../class-wp-customize-theme-control.php | 39 ++++++++++++++----- wp-includes/user.php | 8 +++- wp-includes/version.php | 2 +- 3 files changed, 37 insertions(+), 12 deletions(-) diff --git a/wp-includes/customize/class-wp-customize-theme-control.php b/wp-includes/customize/class-wp-customize-theme-control.php index 0ebc9ef1ed..81c36dd421 100644 --- a/wp-includes/customize/class-wp-customize-theme-control.php +++ b/wp-includes/customize/class-wp-customize-theme-control.php @@ -240,7 +240,15 @@ class WP_Customize_Theme_Control extends WP_Customize_Control { -

+ 'success', + 'additional_classes' => array( 'notice-alt' ), + ) + ); + ?> <# } else if ( 'installed' === data.theme.type ) { #> <# if ( data.theme.blockTheme ) { #>
@@ -255,21 +263,26 @@ class WP_Customize_Theme_Control extends WP_Customize_Control { <# } #>
-

- + <# if ( data.theme.actions.activate ) { #> activate this theme, and use the Site Editor to customize it.' ), '{{{ data.theme.actions.activate }}}' ); ?> <# } #> -

+ + 'error', + 'additional_classes' => array( 'notice-alt' ), + ) + ); + ?> <# } else { #>

{{ data.theme.name }}

@@ -281,7 +294,15 @@ class WP_Customize_Theme_Control extends WP_Customize_Control { <# } #>
-

+ 'success', + 'additional_classes' => array( 'notice-alt' ), + ) + ); + ?> <# } #> <# } else { #>
diff --git a/wp-includes/user.php b/wp-includes/user.php index fc40f4cd75..5b9dacc20f 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -3761,8 +3761,12 @@ function new_user_email_admin_notice() { if ( 'profile.php' === $pagenow && isset( $_GET['updated'] ) ) { $email = get_user_meta( get_current_user_id(), '_new_email', true ); if ( $email ) { - /* translators: %s: New email address. */ - echo '

' . sprintf( __( 'Your email address has not been updated yet. Please check your inbox at %s for a confirmation email.' ), '' . esc_html( $email['newemail'] ) . '' ) . '

'; + $message = sprintf( + /* translators: %s: New email address. */ + __( 'Your email address has not been updated yet. Please check your inbox at %s for a confirmation email.' ), + '' . esc_html( $email['newemail'] ) . '' + ); + wp_admin_notice( $message, array( 'type' => 'info' ) ); } } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 63ed5cf650..be78d73df6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56571'; +$wp_version = '6.4-alpha-56572'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.