acf_field_text::initialize
This function will setup the field type data
Method of the class: acf_field_text{}
No Hooks.
Returns
null. Nothing (null).
Usage
$acf_field_text = new acf_field_text(); $acf_field_text->initialize();
Changelog
| Since 5.0.0 | Introduced. |
acf_field_text::initialize() acf field text::initialize code ACF 6.8.8
function initialize() {
// vars
$this->name = 'text';
$this->label = __( 'Text', 'acf' );
$this->description = __( 'A basic text input, useful for storing single string values.', 'acf' );
$this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-text.png';
$this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/text/', 'docs', 'field-type-selection' );
$this->defaults = array(
'default_value' => '',
'maxlength' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
);
}