Make WordPress Core


Ignore:
Timestamp:
09/14/2023 12:52:45 AM (21 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/options-privacy.php

    r56559 r56570  
    178178<hr class="wp-header-end">
    179179
    180 <div class="notice notice-error hide-if-js">
    181     <p><?php _e( 'The Privacy Settings require JavaScript.' ); ?></p>
    182 </div>
     180<?php
     181wp_admin_notice(
     182    __( 'The Privacy Settings require JavaScript.' ),
     183    array(
     184        'type'               => 'error',
     185        'additional_classes' => array( 'hide-if-js' ),
     186    )
     187);
     188?>
    183189
    184190<div class="privacy-settings-body hide-if-no-js">
Note: See TracChangeset for help on using the changeset viewer.