Noptin_Email_Action::render_tinymce()
Renders the email editor.
Return Return
(string)
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>'; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.3.0 | Introduced. |