function step_3()
 {
     $presets = $preset_options = array();
     $this->js['product_message'] = __('Please provide a name for your product', OP_SN);
     $type = op_page_option('theme', 'type');
     $membership = $type == 'membership';
     op_tpl_assign('page_type', $type);
     if (($dirs = op_dir_list(OP_PAGES . $type)) === false) {
         return op_show_error(__('No themes were found. Please check the themes directory is present and contains themes.', OP_SN));
     }
     $themes = $js_options = $landing_themes = array();
     foreach ($dirs as $d) {
         if (($conf = op_load_page_config($d)) !== false) {
             $themes[] = array('name' => $conf['name'], 'screenshot' => $conf['screenshot'], 'screenshot_thumbnail' => $conf['screenshot_thumbnail'], 'description' => $conf['description'], 'dir' => $d);
             if ($membership) {
                 $js_options[$d] = isset($conf['membership_type']) ? $conf['membership_type'] : 'content';
             } elseif ($type == 'landing') {
                 if (isset($conf['feature_areas'])) {
                     $landing_themes[$d] = $conf['feature_areas'];
                 }
             }
         }
     }
     usort($themes, 'op_sort_theme_array');
     if ($membership) {
         $presets = array('blank' => __('Blank Page', OP_SN), 'sidebar' => __('Page with sidebar', OP_SN), 'module_listing' => __('Module listings', OP_SN));
         $product_id = $category_id = $subcategory_id = 0;
         if ($product = op_page_option('membership')) {
             $product_id = op_get_var($product, 'product_id', 0);
             $category_id = op_get_var($product, 'category_id', 0);
             $subcategory_id = op_get_var($product, 'subcategory_id', 0);
         }
         op_tpl_assign(array('product_select' => $this->_select_html('product', $product_id), 'category_select' => $this->_select_html('category', 0, $product_id), 'subcategory_select' => $this->_select_html('subcategory', 0, $category_id)));
         $this->js['membership_types'] = $js_options;
         $blankimg = 'pb_page_blank.png';
         $selected = 'blank';
         $preset_options = array();
         $default = array('width' => 206, 'height' => 147);
         foreach ($presets as $name => $title) {
             $li_class = $input_attr = '';
             if ($selected == $name) {
                 $input_attr = ' checked="checked"';
                 $li_class = 'img-radio-selected';
             }
             $preset_options[] = array_merge($default, array('input' => '<input type="radio" name="op[page][preset_option]" value="' . $name . '"' . $input_attr . ' />', 'image' => OP_IMG . 'page_types/' . $blankimg, 'preview_content' => $title, 'li_class' => $li_class));
         }
     }
     return op_tpl('page_builder/step3', array('themes' => $themes, 'landing_themes' => $landing_themes, 'presets' => $presets, 'preset_options' => $preset_options));
 }
Exemple #2
0
		</div> <!-- end .op-bsw-header -->

		<div class="op-bsw-steps">
			<div class="op-bsw-steps-content">
				<ul class="steps-breadcrumb cf">
                			<?php 
$steps = array('Theme', 'Brand', 'Layout', 'Modules', 'Finished');
foreach ($steps as $step => $text) {
    $num = $step + 1;
    echo '
					<li class="step-' . $num . ($num == $cur_step ? ' selected' : '') . '"><div class="op-bsw-circle">';
    if ($num == 5) {
        echo '<img src="' . OP_IMG . ($cur_step == 5 ? 'checkmark-green.png' : 'checkmark-alt.png') . '" alt="Finished" width="20" height="18" />';
    } else {
        echo '<h1>' . $num . '</h1>';
    }
    echo '</div><span>' . __($text, OP_SN) . '</span></li>';
}
?>
				</ul>
			</div>
		</div>

		<div class="op-bsw-main-content">
        			<?php 
if (isset($notification)) {
    op_notify($notification);
}
if (isset($error)) {
    op_show_error($error);
}
 function theme_tab()
 {
     if (($dirs = op_dir_list(OP_THEMES)) === false) {
         return op_show_error(__('No themes were found. Please check the themes directory is present and contains themes.', 'optimizepress'));
     }
     $themes = array();
     foreach ($dirs as $d) {
         if (($conf = op_load_theme_config($d)) !== false) {
             $themes[] = array('name' => $conf['name'], 'screenshot' => $conf['screenshot'], 'screenshot_thumbnail' => $conf['screenshot_thumbnail'], 'description' => $conf['description'], 'dir' => $d);
         }
     }
     usort($themes, 'op_sort_theme_array');
     return op_tpl('theme_settings/themes', array('themes' => $themes));
 }