Retrieves the markup for an accessible tooltip.
Description
Returns a button with an accessible name popover hint.
Parameters
$contentstringrequired- Plain-text tooltip content. An empty value returns an empty string.
$argsarrayoptional- Arguments for building the tooltip.
idstringUnique ID for the popover element. Default is a generated unique ID.buttonstringExistingbuttonoramarkup. Used instead of generated button.
Default standard button HTML.labelstringNot used for tooltips.close_labelstringNot used for tooltips.iconstringDashicons icon class for the toggle button.
Default'dashicons-editor-help'. Should match the control’s visible label.classstringAdditional class(es) for the wrapping element.
Default:
array()
Source
function wp_get_tooltip( $content, $args = array() ) {
$args['type'] = 'tooltip';
return wp_get_tooltip_helper( $content, $args );
}
Changelog
| Version | Description |
|---|---|
| 7.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.