Make WordPress Core


Ignore:
Timestamp:
09/14/2023 02:13:42 AM (9 months ago)
Author:
joedolson
Message:

Administration: Use wp_admin_notice() for .updated.

Add usages of wp_admin_notice() and wp_get_admin_notice() on .updated 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/edit.php

    r56549 r56573  
    470470
    471471if ( $messages ) {
    472     printf(
    473         '<div id="message" class="updated notice is-dismissible"><p>%s</p></div>',
    474         implode( ' ', $messages )
     472    wp_admin_notice(
     473        implode( ' ', $messages ),
     474        array(
     475            'id'                 => 'message',
     476            'additional_classes' => array( 'updated' ),
     477            'dismissible'        => true,
     478        )
    475479    );
    476480}
Note: See TracChangeset for help on using the changeset viewer.