acf_field_number::initialize
This function will setup the field type data
Method of the class: acf_field_number{}
No Hooks.
Returns
n/a.
Usage
$acf_field_number = new acf_field_number(); $acf_field_number->initialize();
Changelog
| Since 5.0.0 | Introduced. |
acf_field_number::initialize() acf field number::initialize code ACF 6.8.8
function initialize() {
// vars
$this->name = 'number';
$this->label = __( 'Number', 'acf' );
$this->description = __( 'An input limited to numerical values.', 'acf' );
$this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-number.png';
$this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/number/', 'docs', 'field-type-selection' );
$this->defaults = array(
'default_value' => '',
'min' => '',
'max' => '',
'step' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
);
}