wp_update_php_annotation()
Prints the default annotation for the web host altering the "Update PHP" page URL.
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.
Хуков нет.
Возвращает
Строку|null.
Использование
wp_update_php_annotation( $before, $display );
- $before(строка)
- Markup to output before the annotation.
По умолчанию:<p class="description"> - $display(true|false)
- Whether to echo or return the markup.
По умолчанию:truefor echo
Список изменений
| С версии 5.1.0 | Введена. |
| С версии 5.2.0 | Added the $before and $after parameters. |
| С версии 6.4.0 | Added the $display parameter. |
Код wp_update_php_annotation() wp update php annotation WP 6.9.1
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;
}
}
}