wp_get_update_php_annotation() WordPress Function

This function displays a warning if the current version of PHP is less than the version required by WordPress. The minimum version of PHP required by WordPress is specified in the latest release notes, which can be found at https://wordpress.org/news/.

wp_get_update_php_annotation() #

Returns the default annotation for the web hosting altering the “Update PHP” page URL.


Description

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


Top ↑

Return

(string) Update PHP page annotation. An empty string if no custom URLs are provided.


Top ↑

Source

File: wp-includes/functions.php

function wp_get_update_php_annotation() {
	$update_url  = wp_get_update_php_url();
	$default_url = wp_get_default_update_php_url();

	if ( $update_url === $default_url ) {
		return '';
	}

	$annotation = sprintf(
		/* translators: %s: Default Update PHP page URL. */
		__( 'This resource is provided by your web host, and is specific to your site. For more information, <a href="%s" target="_blank">see the official WordPress documentation</a>.' ),
		esc_url( $default_url )
	);

	return $annotation;
}


Top ↑

Changelog

Changelog
VersionDescription
5.2.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