Filter hook 'wp_update_php_url'

in WP Core File wp-includes/functions.php at line 8438

View Source

wp_update_php_url

Filter Hook
Description
Filters the URL to learn more about updating the PHP version the site is running on. Providing an empty string is not allowed and will result in the default URL being used. Furthermore the page the URL links to should preferably be localized in the site language.

Hook Information

File Location wp-includes/functions.php View on GitHub
Hook Type Filter
Line Number 8438

Hook Parameters

Type Name Description
string $update_url URL to learn more about updating PHP.

Usage Examples

Basic Usage
<?php
// Hook into wp_update_php_url
add_filter('wp_update_php_url', 'my_custom_filter', 10, 1);

function my_custom_filter($update_url) {
    // Your custom filtering logic here
    return $update_url;
}

Source Code Context

wp-includes/functions.php:8438 - How this hook is used in WordPress core
<?php
8433  	 *
8434  	 * @since 5.1.0
8435  	 *
8436  	 * @param string $update_url URL to learn more about updating PHP.
8437  	 */
8438  	$update_url = apply_filters( 'wp_update_php_url', $update_url );
8439  
8440  	if ( empty( $update_url ) ) {
8441  		$update_url = $default_url;
8442  	}
8443  

PHP Documentation

<?php
/**
	 * Filters the URL to learn more about updating the PHP version the site is running on.
	 *
	 * Providing an empty string is not allowed and will result in the default URL being used. Furthermore
	 * the page the URL links to should preferably be localized in the site language.
	 *
	 * @since 5.1.0
	 *
	 * @param string $update_url URL to learn more about updating PHP.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/functions.php
Related Hooks

Related hooks will be displayed here in future updates.