function admin_main($data) { ?> <div class="<?php if (empty($data)) { ?> draggable-<?php } ?> module-holder-<?php echo $this->name; ?> module-holder-title" <?php if (empty($data)) { ?> style="display:none;"<?php } ?> > <h3 class="module-title sidebar-name <?php echo !empty($data->active_module) ? 'is_active_module' : ''; ?> " data-panel="<?php echo !empty($data->panel) ? $data->panel : ''; ?> " data-id="<?php echo !empty($data->ID) ? $data->ID : ''; ?> "> <span class="h3-label"> <span class="h3-label-left"><?php echo isset($data->post_title) && $data->post_title !== '' ? $data->post_title : __('Untitled', 'cp'); ?> </span> <span class="h3-label-right"><?php echo $this->label; ?> </span> <?php parent::get_module_move_link(); ?> </span> </h3> <div class="module-content"> <input type="hidden" name="<?php echo $this->name; ?> _module_page[]" class="module_page" value="<?php echo isset($data->module_page) ? $data->module_page : ''; ?> "/> <input type="hidden" name="<?php echo $this->name; ?> _module_order[]" class="module_order" value="<?php echo isset($data->module_order) ? $data->module_order : 999; ?> "/> <input type="hidden" name="module_type[]" value="<?php echo $this->name; ?> "/> <input type="hidden" name="<?php echo $this->name; ?> _id[]" class="unit_element_id" value="<?php echo esc_attr(isset($data->ID) ? $data->ID : ''); ?> "/> <input type="hidden" class="element_id" value="<?php echo esc_attr(isset($data->ID) ? $data->ID : ''); ?> "/> <label class="bold-label"><?php _e('Element Title', 'cp'); ?> </label> <?php echo $this->element_title_description(); ?> <input type="text" class="element_title" name="<?php echo $this->name; ?> _title[]" value="<?php echo esc_attr(isset($data->post_title) ? $data->post_title : ''); ?> "/> <?php echo $this->show_title_on_front_element($data); ?> <label class="bold-label"><?php _e('Content', 'cp'); ?> </label> <div class="editor_in_place"> <?php $editor_name = $this->name . "_content[]"; $editor_id = esc_attr(isset($data->ID) ? 'editor_' . $data->ID : rand(1, 9999)); $editor_content = htmlspecialchars_decode(isset($data->post_content) ? $data->post_content : ''); $editor = '<textarea id="' . $editor_id . '" name="' . $editor_name . '" class="coursepress-editor">' . $editor_content . '</textarea>'; echo trim($editor); ?> </div> <?php parent::get_module_delete_link(); ?> </div> </div> <?php }
function admin_main($data) { global $content_width; wp_enqueue_style('thickbox'); wp_enqueue_script('thickbox'); wp_enqueue_media(); wp_enqueue_script('media-upload'); $supported_video_extensions = implode(", ", wp_get_video_extensions()); ?> <div class="<?php if (empty($data)) { ?> draggable-<?php } ?> module-holder-<?php echo $this->name; ?> module-holder-title" <?php if (empty($data)) { ?> style="display:none;"<?php } ?> > <h3 class="module-title sidebar-name <?php echo !empty($data->active_module) ? 'is_active_module' : ''; ?> " data-panel="<?php echo !empty($data->panel) ? $data->panel : ''; ?> " data-id="<?php echo !empty($data->ID) ? $data->ID : ''; ?> "> <span class="h3-label"> <span class="h3-label-left"><?php echo isset($data->post_title) && $data->post_title !== '' ? $data->post_title : __('Untitled', 'cp'); ?> </span> <span class="h3-label-right"><?php echo $this->label; ?> </span> <?php parent::get_module_move_link(); ?> </span> </h3> <div class="module-content"> <input type="hidden" name="<?php echo $this->name; ?> _module_page[]" class="module_page" value="<?php echo isset($data->module_page) ? $data->module_page : ''; ?> "/> <input type="hidden" name="<?php echo $this->name; ?> _module_order[]" class="module_order" value="<?php echo isset($data->module_order) ? $data->module_order : 999; ?> "/> <input type="hidden" name="module_type[]" value="<?php echo $this->name; ?> "/> <input type="hidden" name="<?php echo $this->name; ?> _id[]" class="unit_element_id" value="<?php echo esc_attr(isset($data->ID) ? $data->ID : ''); ?> "/> <input type="hidden" class="element_id" value="<?php echo esc_attr(isset($data->ID) ? $data->ID : ''); ?> "/> <label class="bold-label"><?php _e('Element Title', 'cp'); $this->time_estimation($data); ?> </label> <?php echo $this->element_title_description(); ?> <input type="text" class="element_title" name="<?php echo $this->name; ?> _title[]" value="<?php echo esc_attr(isset($data->post_title) ? $data->post_title : ''); ?> "/> <?php echo $this->show_title_on_front_element($data); ?> <div class="editor_in_place" style="display: none;"> <?php $editor_name = $this->name . "_content[]"; $editor_id = esc_attr(isset($data->ID) ? 'editor_' . $data->ID : rand(1, 9999)); $editor_content = htmlspecialchars_decode(isset($data->post_content) ? $data->post_content : ''); $editor = '<textarea id="' . $editor_id . '" name="' . $editor_name . '" class="coursepress-editor">' . $editor_content . '</textarea>'; echo trim($editor); ?> </div> <div class="video_url_holder"> <label><?php _e('Put a URL or Browse for a video file.', 'cp'); ?> <br/> <span class="element_title_description"><?php printf(__('You can enter a Youtube or Vimeo link (oEmbed support is required). Alternatively you can Browse for a file - supported video extensions (%s)', 'cp'), $supported_video_extensions); ?> </span> <input class="video_url" type="text" size="36" name="<?php echo $this->name; ?> _video_url[]" value="<?php echo esc_attr(isset($data->video_url) ? $data->video_url : ''); ?> "/> <input class="attachment_id" type="hidden" size="36" name="<?php echo $this->name; ?> _attachment_id[]" value="<?php echo esc_attr(isset($data->attachment_id) ? $data->attachment_id : '0'); ?> "/> <input class="video_url_button" type="button" value="<?php _e('Browse', 'cp'); ?> "/> <div class="invalid_extension_message"><?php echo sprintf(__('Extension of the file is not valid. Please use one of the following: %s', 'cp'), $supported_video_extensions); ?> </div> </label> </div> <!--<div class="video_additional_controls"> <label><?php // _e('Player Width ( pixels )', 'cp'); ?> </label> <input type="text" name="<?php // echo $this->name; ?> _player_width[]" value="<?php //echo ( isset($data->player_width) ? esc_attr($data->player_width) : esc_attr(empty($content_width) ? 960 : $content_width ) ); ?> " /> </div>--> <?php echo $this->show_media_caption($data); ?> <?php echo $this->hide_related_videos($data); ?> <?php parent::get_module_delete_link(); ?> </div> </div> <?php }
function admin_main($data) { ?> <div class="<?php if (empty($data)) { ?> draggable-<?php } ?> module-holder-<?php echo $this->name; ?> module-holder-title" <?php if (empty($data)) { ?> style="display:none;"<?php } ?> > <h3 class="module-title sidebar-name <?php echo !empty($data->active_module) ? 'is_active_module' : ''; ?> " data-panel="<?php echo !empty($data->panel) ? $data->panel : ''; ?> " data-id="<?php echo !empty($data->ID) ? $data->ID : ''; ?> "> <span class="h3-label"> <span class="h3-label-left"><?php echo isset($data->post_title) && $data->post_title !== '' ? $data->post_title : __('Untitled', 'cp'); ?> </span> <span class="h3-label-right"><?php echo $this->label; ?> </span> <?php parent::get_module_move_link(); ?> </span> </h3> <div class="module-content"> <input type="hidden" name="<?php echo $this->name; ?> _module_page[]" class="module_page" value="<?php echo isset($data->module_page) ? $data->module_page : ''; ?> " /> <input type="hidden" name="<?php echo $this->name; ?> _checked_index[]" class='checked_index' value="0" /> <input type="hidden" name="<?php echo $this->name; ?> _module_order[]" class="module_order" value="<?php echo isset($data->module_order) ? $data->module_order : 999; ?> " /> <input type="hidden" name="module_type[]" value="<?php echo $this->name; ?> " /> <input type="hidden" name="<?php echo $this->name; ?> _id[]" class="unit_element_id" value="<?php echo esc_attr(isset($data->ID) ? $data->ID : ''); ?> " /> <input type="hidden" class="element_id" value="<?php echo esc_attr(isset($data->ID) ? $data->ID : ''); ?> " /> <label class="bold-label"><?php _e('Element Title', 'cp'); $this->time_estimation($data); ?> </label> <?php echo $this->element_title_description(); ?> <input type="text" class="element_title" name="<?php echo $this->name; ?> _title[]" value="<?php echo esc_attr(isset($data->post_title) ? $data->post_title : ''); ?> " /> <div class="group-check"> <?php echo $this->show_title_on_front_element($data); ?> <?php echo $this->mandatory_answer_element($data); ?> <?php echo $this->assessable_answer_element($data); ?> </div> <div class="group-check second-group-check" <?php echo isset($data->gradable_answer) && $data->gradable_answer == 'no' ? 'style="display:none;"' : ''; ?> /> <?php echo $this->minimum_grade_element($data); ?> <?php echo $this->limit_attempts_element($data); ?> </div> <label class="bold-label"><?php _e('Question', 'cp'); ?> </label> <div class="editor_in_place"> <?php $editor_name = $this->name . "_content[]"; $editor_id = esc_attr(isset($data->ID) ? 'editor_' . $data->ID : rand(1, 9999)); $editor_content = htmlspecialchars_decode(isset($data->post_content) ? $data->post_content : ''); $editor = '<textarea id="' . $editor_id . '" name="' . $editor_name . '" class="coursepress-editor">' . $editor_content . '</textarea>'; echo trim($editor); ?> </div> <div class="radio-editor"> <table class="form-table"> <tbody class="ri_items"> <tr> <th width="96%"> <div class="radio_answer_check"><?php _e('Answer', 'cp'); ?> </div> <div class="radio_answer"><?php //_e( 'Answers', 'cp' ); ?> </div> </th> <th width="3%"> <!--<a class="radio_new_link"><?php _e('Add New', 'cp'); ?> </a>--> </th> </tr> <tr> <td class="label" colspan="2"><?php _e('Set the correct answer', 'cp'); ?> </td> </tr> <?php $i = 1; ?> <?php if (isset($data->ID)) { $answer_cnt = 0; foreach ($data->answers as $answer) { ?> <tr> <td width="96%"> <input class="radio_answer_check" type="radio" name="<?php echo $this->name . '_radio_check[' . (isset($data->module_order) ? $data->module_order : 999) . '][]'; ?> " <?php if ($data->checked_answer == $answer) { echo 'checked'; } ?> /> <input class="radio_answer" type="text" name="<?php echo $this->name . '_radio_answers[' . (isset($data->module_order) ? $data->module_order : 999) . '][]'; ?> " value='<?php echo esc_attr(isset($answer) ? $answer : ''); ?> '/> </td> <?php if ($answer_cnt >= 2) { ?> <td width="3%"> <a class="radio_remove" onclick="jQuery( this ).parent().parent().remove();"><i class="fa fa-trash-o"></i></a> </td> <?php } else { ?> <td width="3%"> </td> <?php } ?> </tr> <?php $answer_cnt++; } } else { ?> <tr> <td width="96%"> <input class="radio_answer_check" type="radio" name="<?php echo $this->name . '_radio_check[' . (isset($data->module_order) ? $data->module_order : 999) . '][]'; ?> " checked/> <input class="radio_answer" type="text" name="<?php echo $this->name . '_radio_answers[' . (isset($data->module_order) ? $data->module_order : 999) . '][]'; ?> "/> </td> <td width="3%"> </td> </tr> <tr> <td width="96%"> <input class="radio_answer_check" type="radio" name="<?php echo $this->name . '_radio_check[' . (isset($data->module_order) ? $data->module_order : 999) . '][]'; ?> "/> <input class="radio_answer" type="text" name="<?php echo $this->name . '_radio_answers[' . (isset($data->module_order) ? $data->module_order : 999) . '][]'; ?> "/> </td> <td width="3%"> </td> </tr> <?php } ?> </tbody> </table> <a class="radio_new_link button-secondary"><?php _e('Add New', 'cp'); ?> </a> </div> <?php parent::get_module_delete_link(); ?> </div> </div> <?php }
function admin_main($data) { wp_enqueue_style('thickbox'); wp_enqueue_script('thickbox'); wp_enqueue_media(); wp_enqueue_script('media-upload'); $supported_audio_extensions = implode(",", wp_get_audio_extensions()); if (!empty($data)) { if (!isset($data->autoplay) or empty($data->autoplay)) { $data->autoplay = 'No'; } if (!isset($data->loop) or empty($data->loop)) { $data->loop = 'No'; } } ?> <div class="<?php if (empty($data)) { ?> draggable-<?php } ?> module-holder-<?php echo $this->name; ?> module-holder-title" <?php if (empty($data)) { ?> style="display:none;"<?php } ?> > <h3 class="module-title sidebar-name <?php echo !empty($data->active_module) ? 'is_active_module' : ''; ?> " data-panel="<?php echo !empty($data->panel) ? $data->panel : ''; ?> " data-id="<?php echo !empty($data->ID) ? $data->ID : ''; ?> "> <span class="h3-label"> <span class="h3-label-left"><?php echo isset($data->post_title) && $data->post_title !== '' ? $data->post_title : __('Untitled', 'cp'); ?> </span> <span class="h3-label-right"><?php echo $this->label; ?> </span> <?php parent::get_module_move_link(); ?> </span> </h3> <div class="module-content"> <input type="hidden" name="<?php echo $this->name; ?> _module_page[]" class="module_page" value="<?php echo isset($data->module_page) ? $data->module_page : ''; ?> "/> <input type="hidden" name="<?php echo $this->name; ?> _module_order[]" class="module_order" value="<?php echo isset($data->module_order) ? $data->module_order : 999; ?> "/> <input type="hidden" name="module_type[]" value="<?php echo $this->name; ?> "/> <input type="hidden" name="<?php echo $this->name; ?> _id[]" class="unit_element_id" value="<?php echo esc_attr(isset($data->ID) ? $data->ID : ''); ?> "/> <input type="hidden" class="element_id" value="<?php echo esc_attr(isset($data->ID) ? $data->ID : ''); ?> "/> <label class="bold-label"><?php _e('Element Title', 'cp'); $this->time_estimation($data); ?> </label> <?php echo $this->element_title_description(); ?> <input type="text" class="element_title" name="<?php echo $this->name; ?> _title[]" value="<?php echo esc_attr(isset($data->post_title) ? $data->post_title : ''); ?> "/> <?php echo $this->show_title_on_front_element($data); ?> <div class="audio_url_holder"> <label><?php echo sprintf(__('Put a URL or Browse for an audio file. Supported audio extensions ( %s )', 'cp'), $supported_audio_extensions); ?> <input class="audio_url" type="text" size="36" name="<?php echo $this->name; ?> _audio_url[]" value="<?php echo esc_attr(isset($data->audio_url) ? $data->audio_url : ''); ?> "/> <input class="audio_url_button" type="button" value="<?php _e('Browse', 'cp'); ?> "/> <div class="invalid_extension_message"><?php echo sprintf(__('Extension of the file is not valid. Please use one of the following: %s', 'cp'), $supported_audio_extensions); ?> </div> </label> </div> <div class="audio_additional_controls"> <label><?php _e('Play in a loop', 'cp'); ?> </label> <?php $data_loop = isset($data->loop) ? $data->loop : 'No'; $data_autoplay = isset($data->autoplay) ? $data->autoplay : 'No'; ?> <input type="radio" name="<?php echo $this->name . '_loop[' . (isset($data->module_order) ? $data->module_order : 999) . ']'; ?> " value="Yes" <?php checked($data_loop, 'Yes', true); ?> /> <?php _e('Yes', 'cp'); ?> <br/><br/> <input type="radio" name="<?php echo $this->name . '_loop[' . (isset($data->module_order) ? $data->module_order : 999) . ']'; ?> " value="No" <?php checked($data_loop, 'No', true); ?> /> <?php _e('No', 'cp'); ?> <br/><br/> <label><?php _e('Autoplay', 'cp'); ?> </label> <input type="radio" name="<?php echo $this->name . '_autoplay[' . (isset($data->module_order) ? $data->module_order : 999) . ']'; ?> " value="Yes" <?php checked($data_autoplay, 'Yes', true); ?> /> <?php _e('Yes', 'cp'); ?> <br/><br/> <input type="radio" name="<?php echo $this->name . '_autoplay[' . (isset($data->module_order) ? $data->module_order : 999) . ']'; ?> " value="No" <?php checked($data_autoplay, 'No', true); ?> /> <?php _e('No', 'cp'); ?> <br/><br/> </div> <div class="editor_in_place" style="display: none;"> <?php $editor_name = $this->name . "_content[]"; $editor_id = esc_attr(isset($data->ID) ? 'editor_' . $data->ID : rand(1, 9999)); $editor_content = htmlspecialchars_decode(isset($data->post_content) ? $data->post_content : ''); $editor = '<textarea id="' . $editor_id . '" name="' . $editor_name . '" class="coursepress-editor">' . $editor_content . '</textarea>'; echo trim($editor); ?> </div> <?php parent::get_module_delete_link(); ?> </div> </div> <?php }
function admin_main($data) { wp_enqueue_style('thickbox'); wp_enqueue_script('thickbox'); wp_enqueue_media(); wp_enqueue_script('media-upload'); $supported_image_extensions = implode(", ", cp_wp_get_image_extensions()); ?> <div class="<?php if (empty($data)) { ?> draggable-<?php } ?> module-holder-<?php echo $this->name; ?> module-holder-title" <?php if (empty($data)) { ?> style="display:none;"<?php } ?> > <h3 class="module-title sidebar-name <?php echo !empty($data->active_module) ? 'is_active_module' : ''; ?> " data-panel="<?php echo !empty($data->panel) ? $data->panel : ''; ?> " data-id="<?php echo !empty($data->ID) ? $data->ID : ''; ?> "> <span class="h3-label"> <span class="h3-label-left"><?php echo isset($data->post_title) && $data->post_title !== '' ? $data->post_title : __('Untitled', 'cp'); ?> </span> <span class="h3-label-right"><?php echo $this->label; ?> </span> <?php parent::get_module_move_link(); ?> </span> </h3> <div class="module-content"> <input type="hidden" name="<?php echo $this->name; ?> _module_page[]" class="module_page" value="<?php echo isset($data->module_page) ? $data->module_page : ''; ?> "/> <input type="hidden" name="<?php echo $this->name; ?> _module_order[]" class="module_order" value="<?php echo isset($data->module_order) ? $data->module_order : 999; ?> "/> <input type="hidden" name="module_type[]" value="<?php echo $this->name; ?> "/> <input type="hidden" name="<?php echo $this->name; ?> _id[]" class="unit_element_id" value="<?php echo esc_attr(isset($data->ID) ? $data->ID : ''); ?> "/> <input type="hidden" class="element_id" value="<?php echo esc_attr(isset($data->ID) ? $data->ID : ''); ?> "/> <label class="bold-label"><?php _e('Element Title', 'cp'); $this->time_estimation($data); ?> </label> <?php echo $this->element_title_description(); ?> <input type="text" class="element_title" name="<?php echo $this->name; ?> _title[]" value="<?php echo esc_attr(isset($data->post_title) ? $data->post_title : ''); ?> "/> <?php echo $this->show_title_on_front_element($data); ?> <div class="editor_in_place" style="display:none;"> <?php $editor_name = $this->name . "_content[]"; $editor_id = esc_attr(isset($data->ID) ? 'editor_' . $data->ID : rand(1, 9999)); $editor_content = htmlspecialchars_decode(isset($data->post_content) ? $data->post_content : ''); $editor = '<textarea id="' . $editor_id . '" name="' . $editor_name . '" class="coursepress-editor">' . $editor_content . '</textarea>'; echo trim($editor); ?> </div> <div class="file_url_holder"> <label><?php _e('Enter a URL or Browse for an image.', 'cp'); ?> <input class="image_url" type="text" size="36" name="<?php echo $this->name; ?> _image_url[]" value="<?php echo esc_attr(isset($data->image_url) ? $data->image_url : ''); ?> "/> <input class="attachment_id" type="hidden" size="36" name="<?php echo $this->name; ?> _attachment_id[]" value="<?php echo esc_attr(isset($data->attachment_id) ? $data->attachment_id : '0'); ?> "/> <input class="image_url_button" type="button" value="<?php _e('Browse', 'cp'); ?> "/> <div class="invalid_extension_message"><?php echo sprintf(__('Extension of the file is not valid. Please use one of the following: %s', 'cp'), $supported_image_extensions); ?> </div> </label> </div> <?php echo $this->show_media_caption($data); ?> <?php parent::get_module_delete_link(); ?> </div> </div> <?php }
function admin_main($data) { ?> <div class="<?php if (empty($data)) { ?> draggable-<?php } ?> module-holder-<?php echo $this->name; ?> module-holder-title" <?php if (empty($data)) { ?> style="display:none;"<?php } ?> > <h3 class="module-title sidebar-name <?php echo !empty($data->active_module) ? 'is_active_module' : ''; ?> " data-panel="<?php echo !empty($data->panel) ? $data->panel : ''; ?> " data-id="<?php echo !empty($data->ID) ? $data->ID : ''; ?> "> <span class="h3-label"> <span class="h3-label-left"><?php echo isset($data->post_title) && $data->post_title !== '' ? $data->post_title : __('Untitled', 'cp'); ?> </span> <span class="h3-label-right"><?php echo $this->label; ?> </span> <?php parent::get_module_move_link(); ?> </span> </h3> <div class="module-content"> <input type="hidden" name="<?php echo $this->name; ?> _module_page[]" class="module_page" value="<?php echo isset($data->module_page) ? $data->module_page : ''; ?> " /> <input type="hidden" name="<?php echo $this->name; ?> _checked_index[]" class='checked_index' value="0" /> <input type="hidden" name="<?php echo $this->name; ?> _module_order[]" class="module_order" value="<?php echo isset($data->module_order) ? $data->module_order : 999; ?> " /> <input type="hidden" name="module_type[]" value="<?php echo $this->name; ?> " /> <input type="hidden" name="<?php echo $this->name; ?> _id[]" class="unit_element_id" value="<?php echo esc_attr(isset($data->ID) ? $data->ID : ''); ?> " /> <input type="hidden" class="element_id" value="<?php echo esc_attr(isset($data->ID) ? $data->ID : ''); ?> " /> <label class="bold-label"><?php _e('Element Title', 'cp'); $this->time_estimation($data); ?> </label> <?php echo $this->element_title_description(); ?> <input type="text" class="element_title" name="<?php echo $this->name; ?> _title[]" value="<?php echo esc_attr(isset($data->post_title) ? $data->post_title : ''); ?> " /> <div class="group-check"> <?php echo $this->show_title_on_front_element($data); ?> <?php echo $this->mandatory_answer_element($data); ?> <?php echo $this->assessable_answer_element($data); ?> </div> <div class="group-check second-group-check" <?php echo isset($data->gradable_answer) && $data->gradable_answer == 'no' ? 'style="display:none;"' : ''; ?> /> <?php echo $this->minimum_grade_element($data); ?> <?php echo $this->limit_attempts_element($data); ?> </div> <label class="bold-label"><?php _e('Content', 'cp'); ?> </label> <div class="editor_in_place"> <?php $editor_name = $this->name . "_content[]"; $editor_id = esc_attr(isset($data->ID) ? 'editor_' . $data->ID : rand(1, 9999)); $editor_content = htmlspecialchars_decode(isset($data->post_content) ? $data->post_content : ''); $editor = '<textarea id="' . $editor_id . '" name="' . $editor_name . '" class="coursepress-editor">' . $editor_content . '</textarea>'; echo trim($editor); ?> </div> <div class="answer_length"> <label class="bold-label"><?php _e('Answer Length', 'cp'); ?> </label> <input type="radio" name="<?php echo $this->name . '_answer_length[' . (isset($data->module_order) ? $data->module_order : 999) . '][]'; ?> " value="single" <?php ?> <?php echo isset($data->checked_length) && $data->checked_length == 'single' ? 'checked' : !isset($data->checked_length) ? 'checked' : ''; ?> /> <?php _e('Single Line', 'cp'); ?> <br /><br /> <input type="radio" name="<?php echo $this->name . '_answer_length[' . (isset($data->module_order) ? $data->module_order : 999) . '][]'; ?> " value="multi" <?php echo isset($data->checked_length) && $data->checked_length == 'multi' ? 'checked' : ''; ?> /> <?php _e('Multiple Lines', 'cp'); ?> </div> <?php echo $this->placeholder_element($data); ?> <?php parent::get_module_delete_link(); ?> </div> </div> <?php }
function admin_main($data) { ?> <div class="<?php if (empty($data)) { ?> draggable-<?php } ?> module-holder-<?php echo $this->name; ?> module-holder-title" <?php if (empty($data)) { ?> style="display:none;"<?php } ?> > <h3 class="module-title sidebar-name"> <span class="h3-label"> <span class="h3-label-left"><?php echo isset($data->post_title) && $data->post_title !== '' ? $data->post_title : $this->label; ?> </span> <span class="page-break-dashed"></span> <span class="page-break-right-fix">...</span> <span class="h3-label-right"><?php echo $this->label; ?> </span> <?php parent::get_module_move_link(); ?> </span> </h3> <div class="module-content"> <input type="hidden" name="<?php echo $this->name; ?> _module_page[]" class="module_page" value="<?php echo isset($data->module_page) ? $data->module_page : ''; ?> "/> <input type="hidden" name="<?php echo $this->name; ?> _module_order[]" class="module_order" value="<?php echo isset($data->module_order) ? $data->module_order : 999; ?> "/> <input type="hidden" name="module_type[]" value="<?php echo $this->name; ?> "/> <input type="hidden" name="<?php echo $this->name; ?> _id[]" class="unit_element_id" value="<?php echo esc_attr(isset($data->ID) ? $data->ID : ''); ?> "/> <input type="hidden" name="<?php echo $this->name; ?> _title[]" value="<?php echo esc_attr(isset($data->post_title) ? $data->post_title : ''); ?> "/> <input type="hidden" class="element_id" value="<?php echo esc_attr(isset($data->ID) ? $data->ID : ''); ?> "/> <div class="editor_in_place" style="display:none;"> <?php $editor_name = $this->name . "_content[]"; $editor_id = esc_attr(isset($data->ID) ? 'editor_' . $data->ID : rand(1, 9999)); $editor_content = htmlspecialchars_decode(isset($data->post_content) ? $data->post_content : ''); $editor = '<textarea id="' . $editor_id . '" name="' . $editor_name . '" class="coursepress-editor">' . $editor_content . '</textarea>'; echo trim($editor); ?> </div> <?php parent::get_module_delete_link(); ?> </div> </div> <?php }