acf_field_icon_picker::get_tabs
Gets the available tabs for the icon picker field.
Метод класса: acf_field_icon_picker{}
Хуки из метода
Возвращает
Массив.
Использование
$acf_field_icon_picker = new acf_field_icon_picker(); $acf_field_icon_picker->get_tabs();
Список изменений
| С версии 6.3 | Введена. |
Код acf_field_icon_picker::get_tabs() acf field icon picker::get tabs ACF 6.4.2
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 );
}