wp_get_toggletip()
Retrieves the markup for an accessible toggle tip.
Returns a button and an action triggered toggle tip with $content.
Хуков нет.
Возвращает
string. Toggletip HTML markup, or an empty string when no content is provided.
Использование
wp_get_toggletip( $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(строка)
Existingbuttonmarkup. Used instead of generated button.
По умолчанию: empty string -
label(строка)
Accessible label for the toggle button. Ignored for tooltips.
По умолчанию: 'Help', matching the default icon -
close_label(строка)
Accessible label for the close button.
По умолчанию: 'Close' -
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_toggletip() wp get toggletip WP 7.1.4
function wp_get_toggletip( $content, $args = array() ) {
$args['type'] = 'toggletip';
return wp_get_tooltip_helper( $content, $args );
}