acf_field_gallery::initialize()
__construct
This function will setup the field type data
Метод класса: acf_field_gallery{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$acf_field_gallery = new acf_field_gallery(); $acf_field_gallery->initialize();
Список изменений
С версии 5.0.0 | Введена. |
Код acf_field_gallery::initialize() acf field gallery::initialize ACF 6.0.4
function initialize() { // vars $this->name = 'gallery'; $this->label = __( 'Gallery', 'acf' ); $this->category = 'content'; $this->defaults = array( 'return_format' => 'array', 'preview_size' => 'medium', 'insert' => 'append', 'library' => 'all', 'min' => 0, 'max' => 0, 'min_width' => 0, 'min_height' => 0, 'min_size' => 0, 'max_width' => 0, 'max_height' => 0, 'max_size' => 0, 'mime_types' => '', ); // actions add_action( 'wp_ajax_acf/fields/gallery/get_attachment', array( $this, 'ajax_get_attachment' ) ); add_action( 'wp_ajax_nopriv_acf/fields/gallery/get_attachment', array( $this, 'ajax_get_attachment' ) ); add_action( 'wp_ajax_acf/fields/gallery/update_attachment', array( $this, 'ajax_update_attachment' ) ); add_action( 'wp_ajax_nopriv_acf/fields/gallery/update_attachment', array( $this, 'ajax_update_attachment' ) ); add_action( 'wp_ajax_acf/fields/gallery/get_sort_order', array( $this, 'ajax_get_sort_order' ) ); add_action( 'wp_ajax_nopriv_acf/fields/gallery/get_sort_order', array( $this, 'ajax_get_sort_order' ) ); }