acf_field_file::initialize
This function will setup the field type data
Method of the class: acf_field_file{}
No Hooks.
Returns
n/a.
Usage
$acf_field_file = new acf_field_file(); $acf_field_file->initialize();
Changelog
| Since 5.0.0 | Introduced. |
acf_field_file::initialize() acf field file::initialize code ACF 6.8.8
function initialize() {
// vars
$this->name = 'file';
$this->label = __( 'File', 'acf' );
$this->category = 'content';
$this->description = __( 'Uses the native WordPress media picker to upload, or choose files.', 'acf' );
$this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-file.png';
$this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/file/', 'docs', 'field-type-selection' );
$this->defaults = array(
'return_format' => 'array',
'library' => 'all',
'min_size' => 0,
'max_size' => 0,
'mime_types' => '',
);
// filters
add_filter( 'get_media_item_args', array( $this, 'get_media_item_args' ) );
}