acf_field_date_and_time_picker::input_admin_enqueue_scripts()publicACF 5.3.2

input_admin_enqueue_scripts

description

@type    function

{} Это метод класса: acf_field_date_and_time_picker{}

Хуков нет.

Возвращает

$post_id. (int)

Использование

$acf_field_date_and_time_picker = new acf_field_date_and_time_picker();
$acf_field_date_and_time_picker->input_admin_enqueue_scripts();

Список изменений

С версии 5.3.2 Введена.

Код acf_field_date_and_time_picker::input_admin_enqueue_scripts() ACF 5.10.2

function input_admin_enqueue_scripts() {

	// bail ealry if no enqueue
	if ( ! acf_get_setting( 'enqueue_datetimepicker' ) ) {
		return;
	}

	// vars
	$version = '1.6.1';

	// script
	wp_enqueue_script( 'acf-timepicker', acf_get_url( 'assets/inc/timepicker/jquery-ui-timepicker-addon.min.js' ), array( 'jquery-ui-datepicker' ), $version );

	// style
	wp_enqueue_style( 'acf-timepicker', acf_get_url( 'assets/inc/timepicker/jquery-ui-timepicker-addon.min.css' ), '', $version );

	// localize
	acf_localize_data(
		array(
			'dateTimePickerL10n' => array(
				'timeOnlyTitle' => _x( 'Choose Time', 'Date Time Picker JS timeOnlyTitle', 'acf' ),
				'timeText'      => _x( 'Time', 'Date Time Picker JS timeText', 'acf' ),
				'hourText'      => _x( 'Hour', 'Date Time Picker JS hourText', 'acf' ),
				'minuteText'    => _x( 'Minute', 'Date Time Picker JS minuteText', 'acf' ),
				'secondText'    => _x( 'Second', 'Date Time Picker JS secondText', 'acf' ),
				'millisecText'  => _x( 'Millisecond', 'Date Time Picker JS millisecText', 'acf' ),
				'microsecText'  => _x( 'Microsecond', 'Date Time Picker JS microsecText', 'acf' ),
				'timezoneText'  => _x( 'Time Zone', 'Date Time Picker JS timezoneText', 'acf' ),
				'currentText'   => _x( 'Now', 'Date Time Picker JS currentText', 'acf' ),
				'closeText'     => _x( 'Done', 'Date Time Picker JS closeText', 'acf' ),
				'selectText'    => _x( 'Select', 'Date Time Picker JS selectText', 'acf' ),
				'amNames'       => array(
					_x( 'AM', 'Date Time Picker JS amText', 'acf' ),
					_x( 'A', 'Date Time Picker JS amTextShort', 'acf' ),
				),
				'pmNames'       => array(
					_x( 'PM', 'Date Time Picker JS pmText', 'acf' ),
					_x( 'P', 'Date Time Picker JS pmTextShort', 'acf' ),
				),
			),
		)
	);
}