Make WordPress Core


Ignore:
Timestamp:
09/16/2023 09:47:22 PM (3 years ago)
Author:
costdev
Message:

Administration: Increase wp_admin_notice() usage in /wp-includes/.

Adds further usages of wp_admin_notice() in the root level of /wp-includes/ on .error and .notice-info.

Ongoing task to implement new function across core.

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

Props joedolson, costdev.
See #57791.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media-template.php

    r55943 r56597  
    376376                        <?php
    377377                        if ( isset( $_GET['error'] ) && 'deprecated' === $_GET['error'] ) {
    378                                 echo '<div id="message" class="error notice"><p>' . __( 'The Edit Media screen is deprecated as of WordPress 6.3. Please use the Media Library instead.' ) . '</p></div>';
     378                                wp_admin_notice(
     379                                        __( 'The Edit Media screen is deprecated as of WordPress 6.3. Please use the Media Library instead.' ),
     380                                        array(
     381                                                'id'                 => 'message',
     382                                                'additional_classes' => array( 'error' ),
     383                                        )
     384                                );
    379385                        }
    380386                        ?>
Note: See TracChangeset for help on using the changeset viewer.