Noptin_Email_Action::render_tinymce()

Renders the email editor.


Return Return

(string)


Top ↑

Source Source

File: includes/automation-rules/actions/class-noptin-email-action.php

    public function render_tinymce() {

        echo '<div class="noptin-editor-wrapper field-wrapper">';
        printf(
            '<label class="noptin-label">%s</label>',
            __( 'Email Body', 'newsletter-optin-box' )
        );
        echo '<div class="noptin-content">';

        $content = '';
        if ( ! empty( $_GET['edit'] ) && is_numeric( $_GET['edit'] ) ) {
            $rule = new Noptin_Automation_Rule( $_GET['edit'] );
            $settings = $rule->action_settings;

            if ( ! empty( $settings['email_content'] ) ) {
                $content = wp_unslash( $settings['email_content'] );
            }

        }

        wp_editor(
			$content,
			'noptinemailbody',
			array(
				'media_buttons'    => true,
				'drag_drop_upload' => true,
				'textarea_rows'    => 15,
				'textarea_name'    => 'noptinemailbody',
				'tabindex'         => 4,
				'tinymce'          => array(
					'theme_advanced_buttons1' => 'bold,italic,underline,|,bullist,numlist,blockquote,|,link,unlink,|,spellchecker,fullscreen,|,formatselect,styleselect',
				),
			)
        );

        echo '</div></div>';

    }


Top ↑

Changelog Changelog

Changelog
VersionDescription
1.3.0Introduced.

Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation