function stpb_count_to($pre_name = '', $data_values = array(), $post = false, $no_value = false, $interface = false) { ?> <div class="item"> <div class="left width-50"> <?php stpb_input_text($pre_name . '[title]', $data_values['title']); ?> </div> <div class="right width-50"> <strong><?php _e('Title', 'smooththemes'); ?> </strong> <span><?php _e('Title of CountTo box', 'smooththemes'); ?> </span> </div> </div> <div class="item"> <div class="left width-50"> <?php stpb_input_text($pre_name . '[form]', $data_values['from']); ?> </div> <div class="right width-50"> <strong><?php _e('From', 'smooththemes'); ?> </strong> <span><?php _e('The number to start counting from.', 'smooththemes'); ?> </span> </div> </div> <div class="item"> <div class="left width-50"> <?php stpb_input_text($pre_name . '[to]', $data_values['to']); ?> </div> <div class="right width-50"> <strong><?php _e('To', 'smooththemes'); ?> </strong> <span><?php _e('The number to stop counting at.', 'smooththemes'); ?> </span> </div> </div> <div class="item"> <div class="left width-50"> <?php stpb_input_select_one($pre_name . '[size]', $data_values['size'], array('medium' => __('medium', 'smooththemes'), 'small' => __('Small', 'smooththemes'), 'large' => __('Large', 'smooththemes'))); ?> </div> <div class="right width-50"> <strong><?php _e('Size', 'smooththemes'); ?> </strong> <span><?php _e('Choose your Size.', 'smooththemes'); ?> </span> </div> </div> <div class="item"> <div class="left width-50"> <?php stpb_input_text($pre_name . '[speed]', $data_values['speed']); ?> </div> <div class="right width-50"> <strong><?php _e('Speed', 'smooththemes'); ?> </strong> <span><?php _e('The number of milliseconds it should take to finish counting.', 'smooththemes'); ?> </span> </div> </div> <div class="item trackColor"> <div class="left width-50"> <?php stpb_input_color($pre_name . '[number_color]', $data_values['number_color']); ?> </div> <div class="right width-50"> <strong><?php _e('Number Color', 'smooththemes'); ?> </strong> <span><?php _e('The color of Number.', 'smooththemes'); ?> </span> </div> </div> <div class="item trackColor"> <div class="left width-50"> <?php stpb_input_color($pre_name . '[text_color]', $data_values['text_color']); ?> </div> <div class="right width-50"> <strong><?php _e('Text Color', 'smooththemes'); ?> </strong> <span><?php _e('The color of text.', 'smooththemes'); ?> </span> </div> </div> <?php }
function stpb_input_effect($name, $save_value = '', $real_name = false) { $options = array('no-effect' => __('No effect', 'smooththemes'), 'topToBottom' => __('Top To Bottom', 'smooththemes'), 'bottomToTop' => __('Bottom To Top', 'smooththemes'), 'leftToRight' => __('Left To Right', 'smooththemes'), 'rightToLeft' => __('Right To Left', 'smooththemes'), 'fadeIn' => __('FadeIn', 'smooththemes')); $options = apply_filters('stpb_input_effect', $options); stpb_input_select_one($name, $save_value, $options, '', '', $real_name); }
/** * hook stpb_col_settings * @param array $settings_value */ function stpb_layout_column_settings($settings_value = array()) { $pre_name = '[settings]'; if (!is_array($settings_value)) { $settings_value = array(); } ?> <div class="item"> <div class="left width-50"> <?php stpb_input_select_one($pre_name . '[vertical_align]', $settings_value['vertical_align'], array('top' => __('Top', 'smooththemes'), 'middle' => __('Middle', 'smooththemes'), 'bottom' => __('Bottom', 'smooththemes'))); ?> </div> <div class="right width-50"> <strong><?php _e('Vertical align', 'smooththemes'); ?> </strong> </div> </div> <div class="item"> <div class="left width-50"> <?php stpb_input_effect($pre_name . '[effect]', $settings_value['effect']); ?> </div> <div class="right width-50"> <strong><?php _e('Effect', 'smooththemes'); ?> </strong> <span><?php _e('Special Effect for this Image', 'smooththemes'); ?> </span> </div> </div> <div class="item"> <div class="left width-50"> <?php stpb_input_text($pre_name . '[custom_class]', $settings_value['custom_class']); ?> </div> <div class="right width-50"> <strong><?php _e('Layout Class', 'smooththemes'); ?> </strong> <span><?php _e('Custom Layout Class class name for your own style', 'smooththemes'); ?> </span> </div> </div> <div class="item"> <div class="left width-50"> <?php stpb_input_text($pre_name . '[custom_id]', $settings_value['custom_id']); ?> </div> <div class="right width-50"> <strong><?php _e('Layout ID', 'smooththemes'); ?> </strong> <span><?php _e('Custom Layout ID id for your own style or script', 'smooththemes'); ?> </span> </div> </div> <?php }
function page_options_inferface() { global $post; $name = ST_Page_Builder::PAGE_OPTIONS_NAME; $save_values = ST_Page_Builder::get_page_options($post->ID, array()); $layouts = st_page_layout_config(); $inter = new ST_Page_Builder_Interface(); $sidebars = $inter->get_sidebar_widgets(); wp_nonce_field(plugin_basename(__FILE__), 'stPageBuilder_nonce'); ?> <div class="st-page-options stpb-lb-content-settings"> <?php do_action('st_page_options_before_settings', $name, $save_values); ?> <div class="st-option-item item"> <div class="width-50 left"> <?php stpb_input_select_one($name . '[layout]', $save_values['layout'], $layouts, '.st-select-sidebar', '', true); ?> </div> <div class="width-50 right"> <strong><?php _e('Layout', 'smooththemes'); ?> </strong> <span><?php _e('Select the desired Page layout', 'smooththemes'); ?> </span> </div> </div> <div class="item st-option-item show-on-select-change st-select-sidebar" show-on="right-sidebar left-right-sidebar"> <div class="width-50 left"> <?php stpb_input_select_one($name . '[right_sidebar]', $save_values['right_sidebar'], $sidebars, '', '', true); ?> </div> <div class="width-50 right"> <strong><?php _e('Right Sidebar', 'smooththemes'); ?> </strong> <span><?php _e('Choose a custom right sidebar for this entry', 'smooththemes'); ?> </span> </div> </div> <div class="item st-option-item show-on-select-change st-select-sidebar" show-on="left-sidebar left-right-sidebar"> <div class="width-50 left"> <?php stpb_input_select_one($name . '[left_sidebar]', $save_values['left_sidebar'], $sidebars, '', '', true); ?> </div> <div class="width-50 right"> <strong><?php _e('Left Sidebar', 'smooththemes'); ?> </strong> <span><?php _e('Choose a custom left sidebar for this entry', 'smooththemes'); ?> </span> </div> </div> <div class="item st-option-item"> <div class="width-50 left"> <?php stpb_input_select_one($name . '[show_page_el]', $save_values['show_page_el'], array('yes' => __('Yes', 'smooththemes'), 'no' => __('No', 'smooththemes')), '.show_page_el', '', true); ?> </div> <div class="right width-50"> <strong><?php _e('Show Top Elements', 'smooththemes'); ?> </strong> <span><?php _e('Display the Header with Page Title, Breadcrumb Navigation,...', 'smooththemes'); ?> </span> </div> </div> <?php do_action('st_after_show_page_el_settings', $name, $save_values); // title bar settings if (current_theme_supports('st-titlebar')) { ?> <div class="item st-option-item show-on-select-change show_page_el" show-on="yes"> <div class="width-50 left"> <?php stpb_input_select_one($name . '[titlebar]', $save_values['titlebar'], array('default' => __('Default - Set in Theme Options', 'smooththemes'), 'defined' => __('Defined Style', 'smooththemes'), 'custom' => __('Custom', 'smooththemes')), '.title_bar_style', '', true); ?> </div> <div class="right width-50"> <strong><?php _e('Title bar Style', 'smooththemes'); ?> </strong> <span><?php _e('', 'smooththemes'); ?> </span> </div> </div> <div class="item st-option-item show-on-select-change title_bar_style show_page_el" show-on="yes defined"> <div class="width-50 left"> <?php $list_titlebar_bg = apply_filters('st_titlebar_list_bg', array()); stpb_input_layout($name . '[titlebar_defined]', $save_values['titlebar_defined'], $list_titlebar_bg, true); ?> </div> <div class="right width-50"> <strong><?php _e('Title bar style', 'smooththemes'); ?> </strong> <span><?php _e('Select defined title bar style.', 'smooththemes'); ?> </span> </div> </div> <div class="item st-option-item show-on-select-change title_bar_style show_page_el" show-on="custom"> <div class="width-50 left"> <?php stpb_input_media($name . '[titlebar_bg_img]', $save_values['titlebar_bg_img'], 'image', __('Select/Change image', 'smooththemes'), '', true); ?> </div> <div class="right width-50"> <strong><?php _e('Titlebar background image', 'smooththemes'); ?> </strong> <span><?php _e('', 'smooththemes'); ?> </span> </div> </div> <div class="item st-option-item show-on-select-change title_bar_style show_page_el" show-on="custom"> <div class="left width-50"> <?php stpb_input_color($name . '[titlebar_bg_color]', $save_values['titlebar_bg_color'], '', true); ?> </div> <div class="right width-50"> <strong><?php _e(' Titlebar Background Color', 'smooththemes'); ?> </strong> </div> </div> <div class="item st-option-item show-on-select-change title_bar_style show_page_el" show-on="custom"> <div class="left width-50"> <?php stpb_input_select_one($name . '[titlebar_bg_position]', $save_values['titlebar_bg_position'], array('tl' => __('Top left', 'smooththemes'), 'tc' => __('Top center', 'smooththemes'), 'tr' => __('Top right', 'smooththemes'), 'cc' => __('Center', 'smooththemes'), 'bl' => __('Bottom left', 'smooththemes'), 'bc' => __('Bottom center', 'smooththemes'), 'br' => __('Bottom right', 'smooththemes')), '', '', true); ?> </div> <div class="right width-50"> <strong><?php _e('Titlebar Background Image Position', 'smooththemes'); ?> </strong> </div> </div> <div class="item st-option-item show-on-select-change title_bar_style show_page_el" show-on="custom"> <div class="left width-50"> <?php stpb_input_select_one($name . '[titlebar_bg_repeat]', $save_values['titlebar_bg_repeat'], array('repeat' => __('Repeat', 'smooththemes'), 'no-repeat' => __('No repeat', 'smooththemes'), 'repeat-x' => __('Horizontally', 'smooththemes'), 'repeat-y' => __('Vertically', 'smooththemes')), '', '', true); ?> </div> <div class="right width-50"> <strong><?php _e('Titlebar Background Repeat', 'smooththemes'); ?> </strong> </div> </div> <div class="item st-option-item show-on-select-change title_bar_style show_page_el" show-on="custom"> <div class="left width-50"> <?php stpb_input_select_one($name . '[titlebar_bg_attachment]', $save_values['titlebar_bg_attachment'], array('scroll' => __('Scroll', 'smooththemes'), 'fixed' => __('Fixed', 'smooththemes'), 'stretch' => __('Stretch to fit', 'smooththemes')), '', '', true); ?> </div> <div class="right width-50"> <strong><?php _e('Titlebar Background Attachment', 'smooththemes'); ?> </strong> </div> </div> <?php do_action('st_more_titlebar_settings', $name, $save_valuess); } // end title bar settings ?> <?php if ($post->ID == st_get_shop_page()) { ?> <div class="item st-option-item"> <div class="width-50 left"> <?php if (!isset($save_values['shop_columns']) || $save_values['shop_columns'] == '') { $save_values['shop_columns'] = 3; } stpb_input_select_one($name . '[shop_columns]', $save_values['shop_columns'], array(2 => 2, 3 => 3, 4 => 4, 6 => 6), '', '', true); ?> </div> <div class="right width-50"> <strong><?php _e('Number columns', 'smooththemes'); ?> </strong> <span><?php _e('How many columns of products to show ?', 'smooththemes'); ?> </span> </div> </div> <div class="item st-option-item"> <div class="width-50 left"> <?php if (!isset($save_values['number_product']) || $save_values['number_product'] == '') { $save_values['number_product'] = 9; } stpb_input_text($name . '[number_product]', $save_values['number_product'], '', true); ?> </div> <div class="right width-50"> <strong><?php _e('Number Products', 'smooththemes'); ?> </strong> <span><?php _e('How many products per page to show ?', 'smooththemes'); ?> </span> </div> </div> <?php // ---------relative product --------------------------- ?> <div class="item st-option-item"> <div class="width-50 left"> <?php stpb_input_select_one($name . '[show_relative_prod]', $save_values['show_relative_prod'], array('yes' => __('Yes', 'smooththemes'), 'no' => __('No', 'smooththemes')), '.number_relative_prod', '', true); ?> </div> <div class="right width-50"> <strong><?php _e('Show relative products', 'smooththemes'); ?> </strong> <span><?php _e('Display relative product on single product', 'smooththemes'); ?> </span> </div> </div> <div class="item st-option-item show-on-select-change number_relative_prod" show-on="yes"> <div class="width-50 left"> <?php if (!isset($save_values['number_relative_prod']) || $save_values['number_relative_prod'] == '') { $save_values['number_relative_prod'] = 3; } stpb_input_text($name . '[number_relative_prod]', $save_values['number_relative_prod'], '', true); ?> </div> <div class="right width-50"> <strong><?php _e('Number Relative Products', 'smooththemes'); ?> </strong> <span><?php _e('How many relative products to show ?', 'smooththemes'); ?> </span> </div> </div> <div class="item st-option-item show-on-select-change number_relative_prod" show-on="yes"> <div class="width-50 left"> <?php if (!isset($save_values['relative_prod_num_col']) || $save_values['relative_prod_num_col'] == '') { $save_values['relative_prod_num_col'] = 3; } stpb_input_select_one($name . '[relative_prod_num_col]', $save_values['relative_prod_num_col'], array(2 => 2, 3 => 3, 4 => 4, 6 => 6), '', '', true); ?> </div> <div class="right width-50"> <strong><?php _e('Number Relative columns', 'smooththemes'); ?> </strong> <span><?php _e('How many columns of Relative products to show ?', 'smooththemes'); ?> </span> </div> </div> <?php // ---------upsells product --------------------------- ?> <div class="item st-option-item"> <div class="width-50 left"> <?php stpb_input_select_one($name . '[show_upsells_prod]', $save_values['show_upsells_prod'], array('yes' => __('Yes', 'smooththemes'), 'no' => __('No', 'smooththemes')), '.number_upsells_prod', '', true); ?> </div> <div class="right width-50"> <strong><?php _e('Show Up-Sells products', 'smooththemes'); ?> </strong> <span><?php _e('Display Up-Sells product on single product', 'smooththemes'); ?> </span> </div> </div> <div class="item st-option-item show-on-select-change number_upsells_prod" show-on="yes"> <div class="width-50 left"> <?php if (!isset($save_values['number_upsells_prod']) || $save_values['number_upsells_prod'] == '') { $save_values['number_upsells_prod'] = 3; } stpb_input_text($name . '[number_upsells_prod]', $save_values['number_upsells_prod'], '', true); ?> </div> <div class="right width-50"> <strong><?php _e('Number Up-Sells Products', 'smooththemes'); ?> </strong> <span><?php _e('How many Up-Sells products to show ?', 'smooththemes'); ?> </span> </div> </div> <div class="item st-option-item show-on-select-change number_upsells_prod" show-on="yes"> <div class="width-50 left"> <?php if (!isset($save_values['upsells_prod_num_col']) || $save_values['upsells_prod_num_col'] == '') { $save_values['upsells_prod_num_col'] = 3; } stpb_input_select_one($name . '[upsells_prod_num_col]', $save_values['upsells_prod_num_col'], array(2 => 2, 3 => 3, 4 => 4, 6 => 6), '', '', true); ?> </div> <div class="right width-50"> <strong><?php _e('Number Up-Sells columns', 'smooththemes'); ?> </strong> <span><?php _e('How many columns of Up-Sells products to show ?', 'smooththemes'); ?> </span> </div> </div> <?php } ?> <?php do_action('st_page_options_more_settings', $name, $save_values); ?> </div> <?php }