acf_field_image::initialize()publicACF 5.0.0

__construct

This function will setup the field type data

Метод класса: acf_field_image{}

Хуков нет.

Возвращает

null. Ничего (null).

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

$acf_field_image = new acf_field_image();
$acf_field_image->initialize();

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

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

Код acf_field_image::initialize() ACF 6.0.4

function initialize() {

	// vars
	$this->name     = 'image';
	$this->label    = __( 'Image', 'acf' );
	$this->category = 'content';
	$this->defaults = array(
		'return_format' => 'array',
		'preview_size'  => 'medium',
		'library'       => 'all',
		'min_width'     => 0,
		'min_height'    => 0,
		'min_size'      => 0,
		'max_width'     => 0,
		'max_height'    => 0,
		'max_size'      => 0,
		'mime_types'    => '',
	);

	// filters
	add_filter( 'get_media_item_args', array( $this, 'get_media_item_args' ) );

}