Make WordPress Core


Ignore:
Timestamp:
09/14/2023 01:11:29 AM (17 months ago)
Author:
joedolson
Message:

Administration: Use wp_admin_notice() in /wp-admin/includes.

Add usages of wp_admin_notice() and wp_get_admin_notice() on .notice-[type] in the root level of /wp-admin/includes. Ongoing task to implement new function across core.

Props costdev, joedolson.
See #57791.

File:
1 edited

Legend:

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

    r55874 r56571  
    10501050    $url = wp_nonce_url( $url, WP_Recovery_Mode::EXIT_ACTION );
    10511051
    1052     ?>
    1053     <div class="notice notice-info">
    1054         <p>
    1055             <?php
    1056             printf(
    1057                 /* translators: %s: Recovery Mode exit link. */
    1058                 __( 'You are in recovery mode. This means there may be an error with a theme or plugin. To exit recovery mode, log out or use the Exit button. <a href="%s">Exit Recovery Mode</a>' ),
    1059                 esc_url( $url )
    1060             );
    1061             ?>
    1062         </p>
    1063     </div>
    1064     <?php
     1052    $message = sprintf(
     1053        /* translators: %s: Recovery Mode exit link. */
     1054        __( 'You are in recovery mode. This means there may be an error with a theme or plugin. To exit recovery mode, log out or use the Exit button. <a href="%s">Exit Recovery Mode</a>' ),
     1055        esc_url( $url )
     1056    );
     1057    wp_admin_notice( $message, array( 'type' => 'info' ) );
    10651058}
    10661059
Note: See TracChangeset for help on using the changeset viewer.