/** * Show support page with its sectinos * * Load "support/index" template * @return void */ public function displayPage() { $tabs = $tabContent = array(); foreach ($this->sections as $key => $section) { $tabs[$key] = array('title' => $section['title'], 'prefix' => '', 'li_class' => op_has_section_error($key) ? 'has-error' : ''); $tabContent[$key] = op_tpl('support/step', array('section_type' => $key, 'sections' => $section['object']->sections())); } $data = array('tabs' => $tabs, 'tab_content' => $tabContent, 'module_name' => 'support', 'error' => $this->error, 'notification' => $this->notification); echo op_tpl('support/index', array('content' => op_tpl('generic/tabbed_module', $data))); }
function theme_settings() { $img = op_img('', true); $tabs = array('theme' => array('title' => __('Theme', 'optimizepress'), 'prefix' => '<span><img src="' . $img . 'theme-icon.png" alt="" width="16" height="53" /></span>')); $tab_content = array('theme' => $this->theme_tab()); foreach ($this->sections as $name => $section) { $tabs[$name] = array('title' => $section['title'], 'prefix' => '<span><img src="' . $img . $section['image'] . '" alt="" width="16" height="53" /></span> '); $tab_content[$name] = op_tpl('theme_settings/step', array('section_type' => $name, 'sections' => $section['object']->sections())); if (op_has_section_error($name)) { $tabs[$name]['li_class'] = 'has-error'; } } $data = array('tabs' => $tabs, 'tab_content' => $tab_content, 'module_name' => 'theme_settings', 'error' => $this->error, 'notification' => $this->notification); echo op_tpl('theme_settings/index', array('content' => op_tpl('generic/tabbed_module', $data))); }
function dashboard() { //Create an image $img = op_img('', true); //Init the tabs and content arrays $tabs = array(); $tab_content = array(); //Loop through each section foreach ($this->sections as $name => $section) { //Init tab info such as title of the tab $tabs[$name] = array('title' => $section['title'], 'prefix' => ''); //Get tab content $tab_content[$name] = op_tpl('dashboard/step', array('section_type' => $name, 'sections' => $section['object']->sections())); //Set the li class if the section has an error $tabs[$name]['li_class'] = op_has_section_error($name) ? 'has-error' : ''; } //Create the data array for use in template $data = array('tabs' => $tabs, 'tab_content' => $tab_content, 'module_name' => 'dashboard', 'error' => $this->error, 'notification' => $this->notification); //Echo out the template echo op_tpl('dashboard/index', array('content' => op_tpl('generic/tabbed_module', $data))); }
<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> </div> <div class="op-insert-button cf"> <button type="submit" class="editor-button"><span><?php _e('Update', 'optimizepress'); ?> </span></button>
function step_4() { op_tpl_assign('nav_menus', wp_get_nav_menus()); $img = op_img('', true); $tabs = array(); $tab_content = array(); if (is_array($this->sections) || is_object($this->sections)) { foreach ($this->sections as $name => $section) { $tabs[$name] = array('title' => $section['title']); $tab_content[$name] = op_tpl('page_builder/step', array('section_type' => $name, 'sections' => $name == 'functionality' ? $GLOBALS['functionality_sections'] : $section['object']->sections(), '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' => 'page_builder', 'error' => $this->error, 'notification' => $this->notification); return op_tpl('page_builder/step4', array('content' => op_tpl('generic/tabbed_module', $data))); }
$cur_action = $section['action']; } if (isset($section['help'])) { $help = $section['help']; } if (isset($section['module'])) { $cur_module = $section['module']; $options = op_get_var($section, 'options', $options); $on_off = op_get_var($section, 'on_off', true); $no_content = op_get_var($section, 'no_content', false); } } else { $cur_action = $section; } $class = $name; if (op_has_section_error($section_type . '_' . $name)) { $class .= ' has-error'; op_section_error($section_type); } ?> <div class="op-bsw-grey-panel section-<?php echo $class . ($no_content ? ' op-bsw-grey-panel-no-content' : ''); ?> "> <div class="op-bsw-grey-panel-header cf"> <h3><?php echo $no_content ? $section['title'] : '<a href="#">' . $section['title'] . '</a>'; ?> </h3> <?php $help_vid = op_help_vid(array($section_type, $name), true);