/** * Constructor. */ public function __construct() { $editor = new Editor(Factory::make('itelic-renewal-reminder'), array('mustSelectItem' => __("You must select an item", Plugin::SLUG), 'selectTemplateTag' => __("Select Template Tag", Plugin::SLUG), 'templateTag' => __("Template Tag", Plugin::SLUG), 'selectATag' => __("Select a tag", Plugin::SLUG), 'insertTag' => __("Insert", Plugin::SLUG), 'cancel' => __("Cancel", Plugin::SLUG), 'insertTemplateTag' => __("Insert Template Tag", Plugin::SLUG))); add_action('admin_footer', function () use($editor) { $editor->thickbox(); unset($editor); }); }
/** * Render the notification editor. * * @since 1.0 */ protected function render_notification_editor() { $editor = new Editor(Factory::make('itelic-outdated-customers'), array('mustSelectItem' => __("You must select an item", Plugin::SLUG), 'selectTemplateTag' => __("Select Template Tag", Plugin::SLUG), 'templateTag' => __("Template Tag", Plugin::SLUG), 'selectATag' => __("Select a tag", Plugin::SLUG), 'insertTag' => __("Insert", Plugin::SLUG), 'cancel' => __("Cancel", Plugin::SLUG), 'insertTemplateTag' => __("Insert Template Tag", Plugin::SLUG))); $editor->thickbox(); ?> <div class="spacing-wrapper hidden notifications-editor"> <h4><?php _e("Send Update Reminders", Plugin::SLUG); ?> </h4> <p class="description"> <?php printf(__('Email your customers who have not yet updated to version %1$s of %2$s.', Plugin::SLUG), $this->release->get_version(), $this->release->get_product()->post_title); ?> </p> <div class="notification-editor-fields-container"> <input type="text" id="notification-subject" placeholder="<?php esc_attr_e("Enter your subject", Plugin::SLUG); ?> "> <?php $editor->display_template_tag_button(); ?> <?php wp_editor('', 'notification-body', array('teeny' => true, 'media_buttons' => false, 'editor_height' => '250px')); ?> <p class="clearfix notification-buttons"> <a href="javascript:" class="button button-secondary" id="cancel-notification"> <?php _e("Cancel", Plugin::SLUG); ?> </a> <a href="javascript:" class="button button-primary" id="send-notification"> <?php _e("Send", Plugin::SLUG); ?> </a> </p> </div> </div> <?php }