MailPoet\EmailEditor\Engine

Email_Editor::initialize()publicWC 1.0

Initialize the email editor.

Method of the class: Email_Editor{}

Return

null. Nothing (null).

Usage

$Email_Editor = new Email_Editor();
$Email_Editor->initialize(): void;

Email_Editor::initialize() code WC 9.8.1

public function initialize(): void {
	do_action( 'mailpoet_email_editor_initialized' );
	add_filter( 'mailpoet_email_editor_rendering_theme_styles', array( $this, 'extend_email_theme_styles' ), 10, 2 );
	$this->register_block_patterns();
	$this->register_email_post_types();
	$this->register_block_templates();
	$this->register_email_post_sent_status();
	$this->register_personalization_tags();
	$is_editor_page = apply_filters( 'mailpoet_is_email_editor_page', false );
	if ( $is_editor_page ) {
		$this->extend_email_post_api();
	}
	add_action( 'rest_api_init', array( $this, 'register_email_editor_api_routes' ) );
	add_filter( 'mailpoet_email_editor_send_preview_email', array( $this->send_preview_email, 'send_preview_email' ), 11, 1 ); // allow for other filter methods to take precedent.
	add_filter( 'single_template', array( $this, 'load_email_preview_template' ) );
}