acf_field_image::initialize
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 field image::initialize ACF 6.4.2
function initialize() {
// vars
$this->name = 'image';
$this->label = __( 'Image', 'acf' );
$this->category = 'content';
$this->description = __( 'Uses the native WordPress media picker to upload, or choose images.', 'acf' );
$this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-image.png';
$this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/image/', 'docs', 'field-type-selection' );
$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' ) );
}