wp_update_php_annotation( string $before = ‘<p class="description">’, string $after = ‘</p>’, bool $display = true ): string|void

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

Description

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.

Parameters

$beforestringoptional
Markup to output before the annotation. Default <p class="description">.

Default:'<p class="description">'

$afterstringoptional
Markup to output after the annotation. Default </p>.

Default:'</p>'

$displaybooloptional
Whether to echo or return the markup. Default true for echo.

Default:true

Return

string|void

Source

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;
		}
	}
}

Changelog

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

User Contributed Notes

You must log in before being able to contribute a note or feedback.