wp_update_php_annotation()WP 5.1.0

Prints the default annotation for the web host altering the "Update PHP" page URL.

This function is to be used after wp_get_update_php_url() to display a consistent annotation if the web host has altered the default "Update PHP" page URL.

No Hooks.

Return

String|null.

Usage

wp_update_php_annotation( $before, $display );
$before(string)
Markup to output before the annotation.
Default: <p class="description">
$display(true|false)
Whether to echo or return the markup.
Default: true for echo

Changelog

Since 5.1.0 Introduced.
Since 5.2.0 Added the $before and $after parameters.
Since 6.4.0 Added the $display parameter.

wp_update_php_annotation() code WP 6.5.2

function wp_update_php_annotation( $before = '<p class="description">', $after = '</p>', $display = true ) {
	$annotation = wp_get_update_php_annotation();

	if ( $annotation ) {
		if ( $display ) {
			echo $before . $annotation . $after;
		} else {
			return $before . $annotation . $after;
		}
	}
}