function deleteContentLayout() { check_ajax_referer('op_content_layout_delete', 'nonce'); $le = new OptimizePress_LiveEditor(); if ($le->delete_content_layout(op_post('layout')) == 1) { wp_send_json_success(); } else { wp_send_json_error(); } }
<form id="le-colours-dialog"> <h1><?php _e('Colour Scheme Settings', 'optimizepress'); ?> </h1> <div class="op-lightbox-content"> <div class="op-actual-lightbox-content"> <div class="settings-container"> <?php $le = new OptimizePress_LiveEditor(); $sections = $le->getSections(true); ?> <?php op_tpl_assign('nav_menus', wp_get_nav_menus()); $img = op_img('', true); $tabs = array(); $tab_content = array(); if (is_array($sections) || is_object($sections)) { foreach ($sections as $name => $section) { $tabs[$name] = array('title' => $section['title']); $tab_content[$name] = op_tpl('live_editor/helper', array('section_type' => $name, 'sections' => $name == 'functionality' ? $GLOBALS['functionality_sections'] : $section['object'], 'title' => $section['title'], 'description' => $section['description'])); if (op_has_section_error($name)) { $tabs[$name]['li_class'] = 'has-error'; } } } $data = array('tabs' => $tabs, 'tab_content' => $tab_content, 'module_name' => 'live_editor', 'error' => '', 'notification' => ''); echo op_tpl('live_editor/headers_layout', $data); ?> </div> </div>
</p> <input type ="checkbox" name="op[sections][content_templates_reset]" id="op_content_templates_reset" /> <?php echo __('Yes, Reset Content Templates', 'optimizepress'); ?> <div class="clear"></div> <h4><?php _e('Content Templates List', 'optimizepress'); ?> </h4> <p class="op-micro-copy"><?php _e('List of all content templates, both predefined and custom, with ability to delete them.', 'optimizepress'); ?> </p> <?php $ajaxNonce = wp_create_nonce('op_content_layout_delete'); $le = new OptimizePress_LiveEditor(); $data = $le->get_content_layouts(); if (count($data) > 0) { foreach ($data as $category => $layouts) { ?> <div class="op-content-layout-category"> <h4><?php echo $category; ?> </h4> <?php foreach ($layouts as $layout) { list($description, $image) = explode('|', $layout->description); ?> <div class="img-radio-item" style="width:196px;"> <div class="thumb img-radio-label" style="width:196px;height:196px">
<form id="le-headers-dialog"> <h1><?php _e('Layout Settings', 'optimizepress'); ?> </h1> <div class="op-lightbox-content"> <div class="op-actual-lightbox-content"> <div class="settings-container"> <?php $le = new OptimizePress_LiveEditor(); $sections = $le->getSections(); op_tpl_assign('nav_menus', wp_get_nav_menus()); $img = op_img('', true); $tabs = array(); $tab_content = array(); if (is_array($sections) || is_object($sections)) { foreach ($sections as $name => $section) { $tabs[$name] = array('title' => $section['title']); $tab_content[$name] = op_tpl('live_editor/helper', array('section_type' => $name, 'sections' => $name == 'functionality' ? $GLOBALS['functionality_sections'] : $section['object'], 'title' => $section['title'], 'description' => $section['description'])); if (op_has_section_error($name)) { $tabs[$name]['li_class'] = 'has-error'; } } } $data = array('tabs' => $tabs, 'tab_content' => $tab_content, 'module_name' => 'live_editor', 'error' => '', 'notification' => ''); echo op_tpl('live_editor/headers_layout', $data); ?> </div> </div> </div> <div class="op-insert-button cf">