String|Array. When $args['return_array'] is false (default): Returns a string of escaped HTML attributes ready for output. When $args['return_array'] is true: Returns an associative array of attribute names and escaped values. When using the array return value with wp_get_attachment_image(), no element will be rendered if the image field is empty. If users need an inline editing target for selecting an image, render a fallback element with the attributes returned by this function.
Array { Required. A list of the fields, each of which which will be displayed in the popup toolbar.
Each field can be passed as:
A string (e.g. 'my_field_name')
An associative array with specific keys:
@type string $field_name The name of the field to display in the toolbar.
@type string $field_icon An html tag, can be an svg, to be used as the toolbar icon. If not passed, the icon of the first field will be used.
@type string $field_label A string to use as the label for the button in the toolbar.
@type boolean $use_expanded_editor Default is false, which opens the field in the popover. Set to true to open in the expanded editor.
@type string $popover_min_width Enter the CSS width value to use for the popover.
}. Default: "300px"
$args(array)
Array { Optional. An array of additional args which can control how the toolbar is displayed and used.
@type string $toolbar_icon Optional. An html tag, can be an svg, to be used as the toolbar icon. If not passed, the icon of the first field will be used.
@type string $toolbar_title Optional. A string to be used as the toolbar title. If not passed, the name of the first field will be used.
@type string $uid Optional. A unique identifier that isn't used by any other inline fields in this block. Pass if you have 2 elements that conflict.
@type boolean $return_array Optional. If true, returns an array of attributes suitable for wp_get_attachment_image().