Make WordPress Core


Ignore:
Timestamp:
09/14/2023 12:52:45 AM (15 months ago)
Author:
joedolson
Message:

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

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

Props costdev, joedolson.
See #57791.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/site-health-info.php

    r51970 r56570  
    1919
    2020$health_check_site_status = WP_Site_Health::get_instance();
     21
     22wp_admin_notice(
     23    __( 'The Site Health check requires JavaScript.' ),
     24    array(
     25        'type'               => 'error',
     26        'additional_classes' => array( 'hide-if-js' ),
     27    )
     28);
    2129?>
    22 
    23 <div class="notice notice-error hide-if-js">
    24     <p><?php _e( 'The Site Health check requires JavaScript.' ); ?></p>
    25 </div>
    2630
    2731<div class="health-check-body health-check-debug-tab hide-if-no-js">
Note: See TracChangeset for help on using the changeset viewer.