Carbon_Fields\Field\Field::admin_hook_scripts PHP Method

admin_hook_scripts() public static method

Hook administration scripts.
public static admin_hook_scripts ( )
    public static function admin_hook_scripts()
    {
        wp_enqueue_media();
        wp_enqueue_script('carbon-fields', \Carbon_Fields\URL . '/assets/js/fields.js', array('carbon-app', 'carbon-containers'));
        wp_localize_script('carbon-fields', 'crbl10n', array('title' => __('Files', 'carbon-fields'), 'geocode_zero_results' => __('The address could not be found. ', 'carbon-fields'), 'geocode_not_successful' => __('Geocode was not successful for the following reason: ', 'carbon-fields'), 'max_num_items_reached' => __('Maximum number of items reached (%s items)', 'carbon-fields'), 'max_num_rows_reached' => __('Maximum number of rows reached (%s rows)', 'carbon-fields'), 'cannot_create_more_rows' => __('Cannot create more than %s rows', 'carbon-fields'), 'enter_name_of_new_sidebar' => __('Please enter the name of the new sidebar:', 'carbon-fields'), 'remove_sidebar_confirmation' => __('Are you sure you wish to remove this sidebar?', 'carbon-fields'), 'add_sidebar' => __('Add Sidebar', 'carbon-fields'), 'complex_no_rows' => __('There are no %s yet. Click <a href="#">here</a> to add one.', 'carbon-fields'), 'complex_add_button' => __('Add %s', 'carbon-fields'), 'complex_min_num_rows_not_reached' => __('Minimum number of rows not reached (%d %s)', 'carbon-fields'), 'message_form_validation_failed' => __('Please fill out all fields correctly. ', 'carbon-fields'), 'message_required_field' => __('This field is required. ', 'carbon-fields'), 'message_choose_option' => __('Please choose an option. ', 'carbon-fields')));
    }