Make WordPress Core


Ignore:
Timestamp:
09/14/2023 01:11:29 AM (3 years ago)
Author:
joedolson
Message:

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

Add usages of wp_admin_notice() and wp_get_admin_notice() on .notice-[type] in the root level of /wp-admin/includes. Ongoing task to implement new function across core.

Props costdev, joedolson.
See #57791.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/theme.php

    r56552 r56571  
    12251225        }
    12261226
    1227         printf(
    1228                 '<div class="notice notice-error"><p><strong>%s</strong><br>%s</p><p><a href="%s">%s</a></p></div>',
     1227        $message = sprintf(
     1228                '<p><strong>%s</strong><br>%s</p><p><a href="%s">%s</a></p>',
    12291229                __( 'One or more themes failed to load properly.' ),
    12301230                __( 'You can find more details and make changes on the Themes screen.' ),
     
    12321232                __( 'Go to the Themes screen' )
    12331233        );
     1234        wp_admin_notice(
     1235                $message,
     1236                array(
     1237                        'type'           => 'error',
     1238                        'paragraph_wrap' => false,
     1239                )
     1240        );
    12341241}
Note: See TracChangeset for help on using the changeset viewer.