Retrieves the markup for an accessible toggle tip.
Description
Returns a button and an action triggered toggle tip with $content.
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.buttonstringExistingbuttonmarkup. Used instead of generated button.
Default standard button HTML.labelstringAccessible label for the toggle button.
Default'Help', matching the default icon.
Ignored for tooltips.close_labelstringAccessible label for the close button. Default'Close'.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_toggletip( $content, $args = array() ) {
$args['type'] = 'toggletip';
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.