wp_update_php_annotation() WordPress Function

The wp_update_php_annotation function is used to update the PHP version required for a given plugin or theme. This function is used by the WordPress auto-updater when a new version of WordPress is released.

wp_update_php_annotation( string $before = '<p class="description">', string $after = '</p>' ) #

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.


Top ↑

Parameters

$before

(string)(Optional)Markup to output before the annotation. Default <p class="description">.

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

$after

(string)(Optional)Markup to output after the annotation. Default </p>.

Default value: '</p>'


Top ↑

Source

File: wp-includes/functions.php

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

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


Top ↑

Changelog

Changelog
VersionDescription
5.2.0Added the $before and $after parameters.
5.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More