acf_field_wysiwyg::initialize
This function will setup the field type data
Method of the class: acf_field_wysiwyg{}
No Hooks.
Returns
n/a.
Usage
$acf_field_wysiwyg = new acf_field_wysiwyg(); $acf_field_wysiwyg->initialize();
Changelog
| Since 5.0.0 | Introduced. |
acf_field_wysiwyg::initialize() acf field wysiwyg::initialize code ACF 6.8.8
function initialize() {
// vars
$this->name = 'wysiwyg';
$this->label = __( 'WYSIWYG Editor', 'acf' );
$this->category = 'content';
$this->description = __( 'Displays the WordPress WYSIWYG editor as seen in Posts and Pages allowing for a rich text-editing experience that also allows for multimedia content.', 'acf' ) . ' ' . __( 'We do not recommend using this field in ACF Blocks.', 'acf' );
$this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-wysiwyg.png';
$this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/wysiwyg-editor/', 'docs', 'field-type-selection' );
$this->defaults = array(
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 1,
'default_value' => '',
'delay' => 0,
);
$this->supports = array(
'escaping_html' => true,
);
// add acf_the_content filters
$this->add_filters();
// actions
add_action( 'acf/enqueue_uploader', array( $this, 'acf_enqueue_uploader' ) );
}