wp_update_php_annotation()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
wp_update_php_annotation( string $before = '<p class="description">', string $after = '</p>', bool $display = true ): string|void
Описание
Эту функцию следует использовать после wp_get_update_php_url(), чтобы вывести единообразную аннотацию, если хостинг-провайдер изменил URL страницы «Обновление PHP» по умолчанию.
Оригинал (английский)
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.
Параметры
$before
string
необязательный
= '<p class="description">'
.
$after
string
необязательный
= '</p>'
$display
bool
необязательный
= true
Возвращаемое значение
string|void
Исходный код
wp-includes/functions.php:8583
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;
}
}
}
История изменений
| Версия | Описание |
|---|---|
| 6.4.0 | Added the $display parameter. |
| 5.2.0 | Added the $before and $after parameters. |
| 5.1.0 | Introduced. |

