acf_field_icon_picker::get_tabs
Gets the available tabs for the icon picker field.
Method of the class: acf_field_icon_picker{}
Hooks from the method
Returns
Array.
Usage
$acf_field_icon_picker = new acf_field_icon_picker(); $acf_field_icon_picker->get_tabs();
Changelog
| Since 6.3 | Introduced. |
acf_field_icon_picker::get_tabs() acf field icon picker::get tabs code ACF 6.8.8
public function get_tabs() {
$tabs = array(
'dashicons' => esc_html__( 'Dashicons', 'acf' ),
);
if ( current_user_can( 'upload_files' ) ) {
$tabs['media_library'] = esc_html__( 'Media Library', 'acf' );
}
$tabs['url'] = esc_html__( 'URL', 'acf' );
/**
* Allows filtering the tabs used by the icon picker.
*
* @since 6.3
*
* @param array $tabs An associative array of tabs in key => label format.
* @return array
*/
return apply_filters( 'acf/fields/icon_picker/tabs', $tabs );
}