acf_admin_field_group::admin_enqueue_scripts() public ACF 5.0.0
This action is run after post query but before any admin script / head actions. It is a good place to register all actions.
{} Это метод класса: acf_admin_field_group{}
Хуки из метода
Возвращает
n/a.
Использование
$acf_admin_field_group = new acf_admin_field_group(); $acf_admin_field_group->admin_enqueue_scripts();
- (n/a) (обязательный)
Список изменений
С версии 5.0.0 | Введена. |
Код acf_admin_field_group::admin_enqueue_scripts() acf admin field group::admin enqueue scripts ACF 5.9.1
function admin_enqueue_scripts() {
// no autosave
wp_dequeue_script('autosave');
// custom scripts
wp_enqueue_style('acf-field-group');
wp_enqueue_script('acf-field-group');
// localize text
acf_localize_text(array(
'The string "field_" may not be used at the start of a field name' => __('The string "field_" may not be used at the start of a field name', 'acf'),
'This field cannot be moved until its changes have been saved' => __('This field cannot be moved until its changes have been saved', 'acf'),
'Field group title is required' => __('Field group title is required', 'acf'),
'Move to trash. Are you sure?' => __('Move to trash. Are you sure?', 'acf'),
'No toggle fields available' => __('No toggle fields available', 'acf'),
'Move Custom Field' => __('Move Custom Field', 'acf'),
'Checked' => __('Checked', 'acf'),
'(no label)' => __('(no label)', 'acf'),
'(this field)' => __('(this field)', 'acf'),
'copy' => __('copy', 'acf'),
'or' => __('or', 'acf'),
'Null' => __('Null', 'acf'),
// Conditions
'Has any value' => __('Has any value', 'acf'),
'Has no value' => __('Has no value', 'acf'),
'Value is equal to' => __('Value is equal to', 'acf'),
'Value is not equal to' => __('Value is not equal to', 'acf'),
'Value matches pattern' => __('Value matches pattern', 'acf'),
'Value contains' => __('Value contains', 'acf'),
'Value is greater than' => __('Value is greater than', 'acf'),
'Value is less than' => __('Value is less than', 'acf'),
'Selection is greater than' => __('Selection is greater than', 'acf'),
'Selection is less than' => __('Selection is less than', 'acf'),
));
// localize data
acf_localize_data(array(
'fieldTypes' => acf_get_field_types_info()
));
// 3rd party hook
do_action('acf/field_group/admin_enqueue_scripts');
}