Make WordPress Core


Ignore:
Timestamp:
09/17/2023 03:31:32 PM (3 years ago)
Author:
joedolson
Message:

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

Add additional usage of wp_admin_notice() in wp-admin/ on .error and miscellaneous usages previously overlooked.

Follow up to [56408], [56409], [56410], [56518], [56570], [56571], [56572], [56573], [56576], [56589], [56590], [56597], [56599].

Props costdev, joedolson.
See #57791.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/plugin-editor.php

    r56570 r56600  
    3030        <div class="wrap">
    3131                <h1><?php echo esc_html( $title ); ?></h1>
    32                 <div id="message" class="error"><p><?php _e( 'No plugins are currently available.' ); ?></p></div>
     32                <?php
     33                wp_admin_notice(
     34                        __( 'No plugins are currently available.' ),
     35                        array(
     36                                'id'                 => 'message',
     37                                'additional_classes' => array( 'error' ),
     38                        )
     39                );
     40                ?>
    3341        </div>
    3442        <?php
Note: See TracChangeset for help on using the changeset viewer.