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))); }
<form action="<?php echo $cur_step == 5 ? menu_page_url(OP_SN . '-theme-settings', false) : menu_page_url(OP_SN . '-setup-wizard', false) . '&step=' . $cur_step; ?> " method="post" enctype="multipart/form-data" class="op-bsw-setup"> <div class="op-bsw-wizard"> <div class="op-bsw-content cf"> <div class="op-bsw-header cf"> <div class="op-logo"><img src="<?php op_img(); ?> logo-blogsetup.png" class="animated flipInY" alt="OptimizePress" width="221" height="50" /></div> <ul> <li><a href="http://help.optimizepress.com/" target="_blank"><img src="<?php echo OP_IMG; ?> live_editor/le_help_bg.png" onmouseover="this.src='<?php echo OP_IMG; ?> live_editor/le_help_icon.png'" onmouseout="this.src='<?php echo OP_IMG; ?> live_editor/le_help_bg.png'" alt="<?php _e('Help', OP_SN); ?> " class="tooltip animated pulse" title="<?php _e('Help', OP_SN); ?> " /></a></li> </ul> </div> <!-- end .op-bsw-header -->
?> </h2> <!--<?php op_help_vid('theme'); ?> --> <div class="clear"></div> <p><?php _e('Use the options below to choose a look and feel for your blog.', OP_SN); ?> </p> <?php $sel_text = __('Selected', OP_SN); $prev_text = __('Preview', OP_SN); $previews = array(); $img = op_img('', true); foreach ($themes as $key => $theme) { $field_id = 'op_theme_' . $theme['dir']; $selected = $theme_dir == $theme['dir']; /*$get_theme = (isset($_GET['theme_switch']) ? $_GET['theme_switch'] : 1); $selected = ($get_theme==($key+1) ? true : false);*/ $li_class = $input_attr = ''; if ($selected) { $li_class = ' img-radio-selected'; $input_attr = ' checked="checked"'; } $previews[] = array('image' => op_theme_url($theme['screenshot_thumbnail'], $theme['dir']), 'width' => 246, 'height' => 186, 'tooltip_title' => $theme['name'], 'tooltip_description' => $theme['description'], 'input' => '<input type="radio" name="theme_id" id="' . $field_id . '" value="' . $theme['dir'] . '"' . $input_attr . ' />', 'preview_content' => '<a href="' . op_theme_url($theme['screenshot'], $theme['dir']) . '" class="fancybox"><img src="' . $img . 'pagebuilder-preview.png" alt="Preview" width="70" height="70" border="0" /> ' . $theme['name'] . '</a>'); } echo $this->load_tpl('generic/img_radio_selector', array('previews' => $previews, 'classextra' => 'theme-select')); ?>
function _op_notification($msg = '', $type = 0, $hide_button = false, $echo = true, $extra_class = '', $element_id = '') { switch ($type) { case 1: $className = 'warning'; break; case 2: $className = 'error'; break; case 0: default: $className = 'success'; } $extra_class = $extra_class ? ' ' . trim($extra_class) : ''; $id = $element_id ? 'id="op-notification-' . $element_id . '"' : ''; $notification = '<div class="op-notify ' . $className . $extra_class . '" ' . $id . '><img src="' . op_img('notify-' . $className . '.png', true) . '" alt="' . ucfirst($className) . '"/><span><strong>' . ucfirst($className) . '! </strong>' . __($msg, OP_SN) . '</span>' . ($hide_button ? '' : '<div class="op-notify-close"></div>') . '</div>'; //If notification is in the cookie, don't show it. if (isset($_COOKIE['op-notification-' . $element_id]) && $_COOKIE['op-notification-' . $element_id] === 'notification_hidden') { return; } if ($echo) { echo $notification; } else { return $notification; } }
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))); }
function launch_suite() { $this->data['add_page_link'] = '<a href="' . menu_page_url(OP_SN . '-page-builder', false) . '" class="add-new-page"><img src="' . OP_IMG . 'blue-add.png" alt="' . __('Add A New Page') . '" border="0" /></a>'; $data = array_merge($this->data, array('content' => '', 'error' => $this->error, 'notification' => $this->notification, 'funnel_found' => false, 'funnel_count' => $this->funnel_count)); $data['funnel_select'] = $this->funnel_count > 0 ? '<select name="funnel_select" id="funnel_select">' . $this->funnel_dropdown . '</select>' : '<select name="funnel_select" id="funnel_select"></select>'; if (defined('OP_LAUNCH_FUNNEL')) { $data['funnel_id'] = OP_LAUNCH_FUNNEL; $data['funnel_found'] = true; $img = op_img('', true); $tabs = array('funnel_pages' => array('title' => __('Funnel Pages', OP_SN), 'prefix' => '<span><img src="' . $img . 'theme-icon.png" alt="" width="16" height="53" /></span>'), 'launch_settings' => array('title' => __('Launch Settings', OP_SN), 'prefix' => '<span><img src="' . $img . 'brand-icon.png" alt="" width="16" height="53" /></span>')); $data = array_merge($data, $this->_generate_funnel_pages()); $tab_content = array('funnel_pages' => op_tpl('launch_suite/pages', $data), 'launch_settings' => op_tpl('launch_suite/settings', $data)); $tabbed_data = array('tabs' => $tabs, 'tab_content' => $tab_content, 'module_name' => 'launch_suite'); $data['content'] = op_tpl('generic/tabbed_module', $tabbed_data); } echo op_tpl('launch_suite/index', $data); }