wp_get_direct_php_update_url()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
wp_get_direct_php_update_url(): string
Описание
URL будет возвращён только в том случае, если задана переменная окружения WP_DIRECT_UPDATE_PHP_URL или используется фильтр «wp_direct_php_update_url». Это позволяет хостинг-провайдерам направлять пользователей сразу на страницу, где они могут обновить PHP до более новой версии.
Оригинал (английский)
A URL will only be returned if the WP_DIRECT_UPDATE_PHP_URL environment variable is specified or by using the ‘wp_direct_php_update_url’ filter. This allows hosts to send users directly to the page where they can update PHP to a newer version.
Возвращаемое значение
string
Исходный код
wp-includes/functions.php:8633
function wp_get_direct_php_update_url() {
$direct_update_url = '';
if ( false !== getenv( 'WP_DIRECT_UPDATE_PHP_URL' ) ) {
$direct_update_url = getenv( 'WP_DIRECT_UPDATE_PHP_URL' );
}
/**
* Filters the URL for directly updating the PHP version the site is running on from the host.
*
* @since 5.1.1
*
* @param string $direct_update_url URL for directly updating PHP.
*/
$direct_update_url = apply_filters( 'wp_direct_php_update_url', $direct_update_url );
return $direct_update_url;
}
История изменений
| Версия | Описание |
|---|---|
| 5.1.1 | Introduced. |

