MailPoet\EmailEditor\Engine

Email_Editor::register_email_post_sent_status()privateWC 1.0

Register the 'sent' post status for emails.

Method of the class: Email_Editor{}

Return

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->register_email_post_sent_status(): void;

Email_Editor::register_email_post_sent_status() code WC 9.8.1

private function register_email_post_sent_status(): void {
	$default_args = array(
		'public'                    => false,
		'exclude_from_search'       => true,
		'internal'                  => true, // for now, we hide it, if we use the status in the listings we may flip this and following values.
		'show_in_admin_all_list'    => false,
		'show_in_admin_status_list' => false,
		'private'                   => true, // required by the preview in new tab feature for sent post (newsletter). Posts are only visible to site admins and editors.
	);
	$args         = apply_filters( 'mailpoet_email_editor_post_sent_status_args', $default_args );
	register_post_status(
		'sent',
		$args
	);
}