Make WordPress Core


Ignore:
Timestamp:
09/14/2023 01:23:37 AM (6 months ago)
Author:
joedolson
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user.php

    r56559 r56572  
    37623762        $email = get_user_meta( get_current_user_id(), '_new_email', true );
    37633763        if ( $email ) {
    3764             /* translators: %s: New email address. */
    3765             echo '<div class="notice notice-info"><p>' . sprintf( __( 'Your email address has not been updated yet. Please check your inbox at %s for a confirmation email.' ), '<code>' . esc_html( $email['newemail'] ) . '</code>' ) . '</p></div>';
     3764            $message = sprintf(
     3765                /* translators: %s: New email address. */
     3766                __( 'Your email address has not been updated yet. Please check your inbox at %s for a confirmation email.' ),
     3767                '<code>' . esc_html( $email['newemail'] ) . '</code>'
     3768            );
     3769            wp_admin_notice( $message, array( 'type' => 'info' ) );
    37663770        }
    37673771    }
Note: See TracChangeset for help on using the changeset viewer.