wp_get_tooltip()
Retrieves the markup for an accessible tooltip.
Returns a button with an accessible name popover hint.
Хуков нет.
Возвращает
string. Tooltip HTML markup, or an empty string when no content is provided.
Использование
wp_get_tooltip( $content, $args );
- $content(строка) (обязательный)
- Plain-text tooltip content. An empty value returns an empty string.
- $args(массив)
Arguments for building the tooltip.
По умолчанию:
array()-
id(строка)
Unique ID for the popover element.
По умолчанию: generated unique ID -
button(строка)
Existingbuttonoramarkup. Used instead of generated button.
По умолчанию: empty string -
label(строка)
Not used for tooltips. -
close_label(строка)
Not used for tooltips. -
icon(строка)
Dashicons icon class for the toggle button. Should match the control's visible label.
По умолчанию: 'dashicons-editor-help' - class(строка)
Additional class(es) for the wrapping element.
По умолчанию: ''
-
Список изменений
| С версии 7.1.0 | Введена. |
Код wp_get_tooltip() wp get tooltip WP 7.1.2
function wp_get_tooltip( $content, $args = array() ) {
$args['type'] = 'tooltip';
return wp_get_tooltip_helper( $content, $args );
}