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/edit-comments.php

    r56576 r56600  
    302302        }
    303303        if ( $error_msg ) {
    304                 echo '<div id="moderated" class="error"><p>' . $error_msg . '</p></div>';
     304                wp_admin_notice(
     305                        $error_msg,
     306                        array(
     307                                'id'                 => 'moderated',
     308                                'additional_classes' => array( 'error' ),
     309                        )
     310                );
    305311        }
    306312}
Note: See TracChangeset for help on using the changeset viewer.