mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-10 07:34:34 +00:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user