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

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

Props costdev, joedolson.
See #57791.

git-svn-id: https://develop.svn.wordpress.org/trunk@56570 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Joe Dolson
2023-09-14 00:52:45 +00:00
parent 96a7954ee6
commit 3cefc7c7ff
20 changed files with 434 additions and 225 deletions

View File

@@ -8318,15 +8318,23 @@ function wp_get_default_update_php_url() {
*
* @since 5.1.0
* @since 5.2.0 Added the `$before` and `$after` parameters.
* @since 6.4.0 Added the `$echo` parameter.
*
* @param string $before Markup to output before the annotation. Default `<p class="description">`.
* @param string $after Markup to output after the annotation. Default `</p>`.
* @param bool $echo Markup should echo if true. Default `true`.
*
* @return string|void
*/
function wp_update_php_annotation( $before = '<p class="description">', $after = '</p>' ) {
function wp_update_php_annotation( $before = '<p class="description">', $after = '</p>', $echo = true ) {
$annotation = wp_get_update_php_annotation();
if ( $annotation ) {
echo $before . $annotation . $after;
if ( $echo ) {
echo $before . $annotation . $after;
} else {
return $before . $annotation . $after;
}
}
}