@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | |
3 | 3 | /** |
4 | 4 | * @author ALLEGRE Jérôme - Eoxia dev team <[email protected]> |
@@ -9,10 +9,10 @@ discard block |
||
9 | 9 | |
10 | 10 | /** Template Global vars **/ |
11 | 11 | DEFINE('WPS_OPTIONS_DIR', basename(dirname(__FILE__))); |
12 | -DEFINE('WPS_OPTIONS_PATH', str_replace( "\\", "/", str_replace( WPS_OPTIONS_DIR, "", dirname( __FILE__ ) ) ) ); |
|
13 | -DEFINE('WPS_OPTIONS_URL', str_replace( str_replace( "\\", "/", ABSPATH), site_url() . '/', WPS_OPTIONS_PATH ) ); |
|
14 | -DEFINE('WPS_OPTIONS_TEMPLATE_DIR',WPS_OPTIONS_PATH . WPS_OPTIONS_DIR . "/templates/" ); |
|
12 | +DEFINE('WPS_OPTIONS_PATH', str_replace("\\", "/", str_replace(WPS_OPTIONS_DIR, "", dirname(__FILE__)))); |
|
13 | +DEFINE('WPS_OPTIONS_URL', str_replace(str_replace("\\", "/", ABSPATH), site_url() . '/', WPS_OPTIONS_PATH)); |
|
14 | +DEFINE('WPS_OPTIONS_TEMPLATE_DIR', WPS_OPTIONS_PATH . WPS_OPTIONS_DIR . "/templates/"); |
|
15 | 15 | |
16 | -include( plugin_dir_path( __FILE__ ).'/controller/wps_display_options_ctr.php' ); |
|
16 | +include(plugin_dir_path(__FILE__) . '/controller/wps_display_options_ctr.php'); |
|
17 | 17 | |
18 | 18 | $wps_dispaly_options = new wps_display_options(); |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -1,24 +1,24 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | class wps_display_options { |
3 | 3 | |
4 | 4 | function __construct() { |
5 | - add_action('admin_init', array( $this, 'declare_display_options')); |
|
6 | - add_action( 'admin_enqueue_scripts', array( $this, 'add_scripts') ); |
|
5 | + add_action('admin_init', array($this, 'declare_display_options')); |
|
6 | + add_action('admin_enqueue_scripts', array($this, 'add_scripts')); |
|
7 | 7 | |
8 | 8 | //Print Scripts in frontend for Customization part |
9 | - add_action( 'wp_enqueue_scripts', array( $this, 'add_scripts_frontend') ); |
|
9 | + add_action('wp_enqueue_scripts', array($this, 'add_scripts_frontend')); |
|
10 | 10 | } |
11 | 11 | |
12 | 12 | function add_scripts() { |
13 | - wp_enqueue_script( 'jquery'); |
|
13 | + wp_enqueue_script('jquery'); |
|
14 | 14 | //color picker lib |
15 | - wp_enqueue_script( 'iris' ); |
|
16 | - wp_enqueue_script( 'wps_options_display_js', WPS_OPTIONS_URL . WPS_OPTIONS_DIR .'/assets/backend/js/wps_option_display.js', false ); |
|
15 | + wp_enqueue_script('iris'); |
|
16 | + wp_enqueue_script('wps_options_display_js', WPS_OPTIONS_URL . WPS_OPTIONS_DIR . '/assets/backend/js/wps_option_display.js', false); |
|
17 | 17 | |
18 | 18 | } |
19 | 19 | |
20 | 20 | function add_scripts_frontend() { |
21 | - add_action('wp_print_scripts', array( $this, 'create_customizing_css_rules') ); |
|
21 | + add_action('wp_print_scripts', array($this, 'create_customizing_css_rules')); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | |
@@ -27,32 +27,32 @@ discard block |
||
27 | 27 | */ |
28 | 28 | function declare_display_options() { |
29 | 29 | // Frontend display options |
30 | - register_setting('wpshop_options', 'wpshop_display_option', array( $this, 'display_part_validator')); |
|
31 | - add_settings_section('wpshop_display_options_sections', '<span class="dashicons dashicons-welcome-view-site"></span>'.__('Display options', 'wpshop'), array( $this, 'frontend_display_part_explanation'), 'wpshop_display_option'); |
|
30 | + register_setting('wpshop_options', 'wpshop_display_option', array($this, 'display_part_validator')); |
|
31 | + add_settings_section('wpshop_display_options_sections', '<span class="dashicons dashicons-welcome-view-site"></span>' . __('Display options', 'wpshop'), array($this, 'frontend_display_part_explanation'), 'wpshop_display_option'); |
|
32 | 32 | |
33 | 33 | // Add the different field option for frontend |
34 | - add_settings_field('wpshop_display_cat_sheet_output', __('Display type for category page', 'wpshop'), array( $this, 'wpshop_display_cat_sheet_output'), 'wpshop_display_option', 'wpshop_display_options_sections'); |
|
35 | - add_settings_field('wpshop_display_list_type', __('Display type for element list', 'wpshop'), array( $this, 'wpshop_display_list_type'), 'wpshop_display_option', 'wpshop_display_options_sections'); |
|
36 | - add_settings_field('wpshop_display_grid_element_number', __('Number of element by line for grid mode', 'wpshop'), array( $this, 'wpshop_display_grid_element_number'), 'wpshop_display_option', 'wpshop_display_options_sections'); |
|
37 | - add_settings_field('wpshop_display_element_per_page', __('Number of element per page', 'wpshop'), array( $this, 'wpshop_display_element_per_page'), 'wpshop_display_option', 'wpshop_display_options_sections'); |
|
38 | - add_settings_field('wpshop_display_latest_products_ordered', __('Number of element in "latest products ordered" part', 'wpshop'), array( $this, 'wpshop_display_latest_products_ordered'), 'wpshop_display_option', 'wpshop_display_options_sections'); |
|
39 | - add_settings_field('wpshop_hide_admin_bar', __('Hide Wordpress Admin Bar for customers', 'wpshop'), array( $this, 'wpshop_hide_admin_bar'), 'wpshop_display_option', 'wpshop_display_options_sections'); |
|
40 | - add_settings_field('wpshop_display_delete_order', __('Display delete order for customers', 'wpshop'), array( $this, 'wpshop_display_delete_order'), 'wpshop_display_option', 'wpshop_display_options_sections'); |
|
34 | + add_settings_field('wpshop_display_cat_sheet_output', __('Display type for category page', 'wpshop'), array($this, 'wpshop_display_cat_sheet_output'), 'wpshop_display_option', 'wpshop_display_options_sections'); |
|
35 | + add_settings_field('wpshop_display_list_type', __('Display type for element list', 'wpshop'), array($this, 'wpshop_display_list_type'), 'wpshop_display_option', 'wpshop_display_options_sections'); |
|
36 | + add_settings_field('wpshop_display_grid_element_number', __('Number of element by line for grid mode', 'wpshop'), array($this, 'wpshop_display_grid_element_number'), 'wpshop_display_option', 'wpshop_display_options_sections'); |
|
37 | + add_settings_field('wpshop_display_element_per_page', __('Number of element per page', 'wpshop'), array($this, 'wpshop_display_element_per_page'), 'wpshop_display_option', 'wpshop_display_options_sections'); |
|
38 | + add_settings_field('wpshop_display_latest_products_ordered', __('Number of element in "latest products ordered" part', 'wpshop'), array($this, 'wpshop_display_latest_products_ordered'), 'wpshop_display_option', 'wpshop_display_options_sections'); |
|
39 | + add_settings_field('wpshop_hide_admin_bar', __('Hide Wordpress Admin Bar for customers', 'wpshop'), array($this, 'wpshop_hide_admin_bar'), 'wpshop_display_option', 'wpshop_display_options_sections'); |
|
40 | + add_settings_field('wpshop_display_delete_order', __('Display delete order for customers', 'wpshop'), array($this, 'wpshop_display_delete_order'), 'wpshop_display_option', 'wpshop_display_options_sections'); |
|
41 | 41 | |
42 | 42 | // Customize WPShop display part |
43 | - register_setting('wpshop_options', 'wpshop_customize_display_option', array( $this, 'customize_color_validator')); |
|
44 | - add_settings_section('wpshop_customize_wpshop_display_option', '<span class="dashicons dashicons-admin-appearance"></span>'.__('Customize your WPShop', 'wpshop'), array( $this, 'customize_wpshop_colors_explanation'), 'wpshop_customize_display_option'); |
|
45 | - add_settings_field('wpshop_customize_first_button_field', __('Change the principal button style', 'wpshop'), array( $this, 'wps_customize_first_button_style'), 'wpshop_customize_display_option', 'wpshop_customize_wpshop_display_option'); |
|
46 | - add_settings_field('wpshop_customize_second_button_field', __('Change the second button style', 'wpshop'), array( $this, 'wps_customize_second_button_style'), 'wpshop_customize_display_option', 'wpshop_customize_wpshop_display_option'); |
|
47 | - add_settings_field('wpshop_customize_account_field', __('Change the customer account elements style', 'wpshop'), array( $this, 'wps_customize_account_style'), 'wpshop_customize_display_option', 'wpshop_customize_wpshop_display_option'); |
|
48 | - add_settings_field('wpshop_customize_shipping_list_field', __('Change The shipping mode choice element style', 'wpshop'), array( $this, 'wps_customize_shipping_style'), 'wpshop_customize_display_option', 'wpshop_customize_wpshop_display_option'); |
|
43 | + register_setting('wpshop_options', 'wpshop_customize_display_option', array($this, 'customize_color_validator')); |
|
44 | + add_settings_section('wpshop_customize_wpshop_display_option', '<span class="dashicons dashicons-admin-appearance"></span>' . __('Customize your WPShop', 'wpshop'), array($this, 'customize_wpshop_colors_explanation'), 'wpshop_customize_display_option'); |
|
45 | + add_settings_field('wpshop_customize_first_button_field', __('Change the principal button style', 'wpshop'), array($this, 'wps_customize_first_button_style'), 'wpshop_customize_display_option', 'wpshop_customize_wpshop_display_option'); |
|
46 | + add_settings_field('wpshop_customize_second_button_field', __('Change the second button style', 'wpshop'), array($this, 'wps_customize_second_button_style'), 'wpshop_customize_display_option', 'wpshop_customize_wpshop_display_option'); |
|
47 | + add_settings_field('wpshop_customize_account_field', __('Change the customer account elements style', 'wpshop'), array($this, 'wps_customize_account_style'), 'wpshop_customize_display_option', 'wpshop_customize_wpshop_display_option'); |
|
48 | + add_settings_field('wpshop_customize_shipping_list_field', __('Change The shipping mode choice element style', 'wpshop'), array($this, 'wps_customize_shipping_style'), 'wpshop_customize_display_option', 'wpshop_customize_wpshop_display_option'); |
|
49 | 49 | |
50 | 50 | // Admin (Back-end) display options |
51 | - register_setting('wpshop_options', 'wpshop_admin_display_option', array( $this, 'admin_part_validator')); |
|
52 | - add_settings_section('wpshop_admin_display_options_sections', '<span class="dashicons dashicons-desktop"></span>'.__('Admin display options', 'wpshop'), array( $this, 'admin_part_explanation'), 'wpshop_admin_display_option'); |
|
53 | - add_settings_field('wpshop_admin_display_attribute_set_layout', __('Attribute set page layout', 'wpshop'), array( $this, 'wpshop_admin_display_attr_set_layout'), 'wpshop_admin_display_option', 'wpshop_admin_display_options_sections'); |
|
54 | - add_settings_field('wpshop_admin_display_attribute_layout', __('Attribute page layout', 'wpshop'), array( $this, 'wpshop_admin_display_attr_layout'), 'wpshop_admin_display_option', 'wpshop_admin_display_options_sections'); |
|
55 | - add_settings_field('wpshop_admin_display_shortcode_product', __('Shortcode display in product page', 'wpshop'), array( $this, 'wpshop_admin_display_shortcode_in_product_page'), 'wpshop_admin_display_option', 'wpshop_admin_display_options_sections'); |
|
51 | + register_setting('wpshop_options', 'wpshop_admin_display_option', array($this, 'admin_part_validator')); |
|
52 | + add_settings_section('wpshop_admin_display_options_sections', '<span class="dashicons dashicons-desktop"></span>' . __('Admin display options', 'wpshop'), array($this, 'admin_part_explanation'), 'wpshop_admin_display_option'); |
|
53 | + add_settings_field('wpshop_admin_display_attribute_set_layout', __('Attribute set page layout', 'wpshop'), array($this, 'wpshop_admin_display_attr_set_layout'), 'wpshop_admin_display_option', 'wpshop_admin_display_options_sections'); |
|
54 | + add_settings_field('wpshop_admin_display_attribute_layout', __('Attribute page layout', 'wpshop'), array($this, 'wpshop_admin_display_attr_layout'), 'wpshop_admin_display_option', 'wpshop_admin_display_options_sections'); |
|
55 | + add_settings_field('wpshop_admin_display_shortcode_product', __('Shortcode display in product page', 'wpshop'), array($this, 'wpshop_admin_display_shortcode_in_product_page'), 'wpshop_admin_display_option', 'wpshop_admin_display_options_sections'); |
|
56 | 56 | |
57 | 57 | } |
58 | 58 | |
@@ -69,12 +69,12 @@ discard block |
||
69 | 69 | * @param array $input |
70 | 70 | * @return array |
71 | 71 | */ |
72 | - function display_part_validator( $input ) { |
|
72 | + function display_part_validator($input) { |
|
73 | 73 | $newinput['wpshop_display_list_type'] = $input['wpshop_display_list_type']; |
74 | - if($input['wpshop_display_grid_element_number'] < WPSHOP_DISPLAY_GRID_ELEMENT_NUMBER_PER_LINE_MIN_RANGE){ |
|
74 | + if ($input['wpshop_display_grid_element_number'] < WPSHOP_DISPLAY_GRID_ELEMENT_NUMBER_PER_LINE_MIN_RANGE) { |
|
75 | 75 | $input['wpshop_display_grid_element_number'] = WPSHOP_DISPLAY_GRID_ELEMENT_NUMBER_PER_LINE_MIN_RANGE; |
76 | 76 | } |
77 | - elseif($input['wpshop_display_grid_element_number'] > WPSHOP_DISPLAY_GRID_ELEMENT_NUMBER_PER_LINE_MAX_RANGE){ |
|
77 | + elseif ($input['wpshop_display_grid_element_number'] > WPSHOP_DISPLAY_GRID_ELEMENT_NUMBER_PER_LINE_MAX_RANGE) { |
|
78 | 78 | $input['wpshop_display_grid_element_number'] = WPSHOP_DISPLAY_GRID_ELEMENT_NUMBER_PER_LINE_MAX_RANGE; |
79 | 79 | } |
80 | 80 | $newinput['wpshop_display_grid_element_number'] = $input['wpshop_display_grid_element_number']; |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * EXPLANATIONS - Frontend display option explanantion |
91 | 91 | */ |
92 | 92 | function frontend_display_part_explanation() { |
93 | - _e( 'Manage here your frontend display options', 'wpshop'); |
|
93 | + _e('Manage here your frontend display options', 'wpshop'); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
@@ -100,13 +100,13 @@ discard block |
||
100 | 100 | $wpshop_display_option = get_option('wpshop_display_option'); |
101 | 101 | $field_identifier = 'wpshop_display_cat_sheet_output'; |
102 | 102 | |
103 | - if(current_user_can('wpshop_edit_options')){ |
|
103 | + if (current_user_can('wpshop_edit_options')) { |
|
104 | 104 | $content = array('category_description', 'category_subcategory', 'category_subproduct'); |
105 | 105 | $option_field_output = ''; |
106 | - foreach($content as $content_definition){ |
|
106 | + foreach ($content as $content_definition) { |
|
107 | 107 | $current_value = (is_array($wpshop_display_option['wpshop_display_cat_sheet_output']) && in_array($content_definition, $wpshop_display_option['wpshop_display_cat_sheet_output'])) || !is_array($wpshop_display_option['wpshop_display_cat_sheet_output']) ? $content_definition : ''; |
108 | 108 | |
109 | - switch($content_definition){ |
|
109 | + switch ($content_definition) { |
|
110 | 110 | case 'category_description': |
111 | 111 | { |
112 | 112 | $field_label = __('Display product category description', 'wpshop'); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $option_field_output .= wpshop_form::form_input_check('wpshop_display_option[' . $field_identifier . '][]', $field_identifier . '_' . $content_definition, $content_definition, $current_value, 'checkbox') . '<label for="' . $field_identifier . '_' . $content_definition . '" >' . $field_label . '</label><br/>'; |
132 | 132 | } |
133 | 133 | } |
134 | - else{ |
|
134 | + else { |
|
135 | 135 | $option_field_output = $wpshop_display_option[$field_identifier]; |
136 | 136 | } |
137 | 137 | |
@@ -145,14 +145,14 @@ discard block |
||
145 | 145 | $wpshop_display_option = get_option('wpshop_display_option'); |
146 | 146 | $field_identifier = 'wpshop_display_list_type'; |
147 | 147 | |
148 | - if(current_user_can('wpshop_edit_options')){ |
|
148 | + if (current_user_can('wpshop_edit_options')) { |
|
149 | 149 | $option_field_output = wpshop_form::form_input_select('wpshop_display_option[' . $field_identifier . ']', $field_identifier, array('grid' => __('Grid', 'wpshop'), 'list' => __('List', 'wpshop')), $wpshop_display_option[$field_identifier], '', 'index'); |
150 | 150 | } |
151 | - else{ |
|
151 | + else { |
|
152 | 152 | $option_field_output = $wpshop_display_option[$field_identifier]; |
153 | 153 | } |
154 | 154 | |
155 | - echo $option_field_output.' <a href="#" title="'.__('Default display mode on shop','wpshop').'" class="wpshop_infobulle_marker">?</a>'; |
|
155 | + echo $option_field_output . ' <a href="#" title="' . __('Default display mode on shop', 'wpshop') . '" class="wpshop_infobulle_marker">?</a>'; |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | /** |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | function wpshop_display_grid_element_number() { |
162 | 162 | $wpshop_display_option = get_option('wpshop_display_option'); |
163 | 163 | $field_identifier = 'wpshop_display_grid_element_number'; |
164 | - require( wpshop_tools::get_template_part( WPS_OPTIONS_DIR, WPS_OPTIONS_TEMPLATE_DIR, "backend", "wps_display_options_grid_field") ); |
|
164 | + require(wpshop_tools::get_template_part(WPS_OPTIONS_DIR, WPS_OPTIONS_TEMPLATE_DIR, "backend", "wps_display_options_grid_field")); |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | /** |
@@ -171,14 +171,14 @@ discard block |
||
171 | 171 | $wpshop_display_option = get_option('wpshop_display_option'); |
172 | 172 | $field_identifier = 'wpshop_display_element_per_page'; |
173 | 173 | |
174 | - if(current_user_can('wpshop_edit_options')){ |
|
174 | + if (current_user_can('wpshop_edit_options')) { |
|
175 | 175 | $option_field_output = wpshop_form::form_input('wpshop_display_option[' . $field_identifier . ']', $field_identifier, !empty($wpshop_display_option[$field_identifier]) ? $wpshop_display_option[$field_identifier] : 20, 'text'); |
176 | 176 | } |
177 | - else{ |
|
177 | + else { |
|
178 | 178 | $option_field_output = $wpshop_display_option[$field_identifier]; |
179 | 179 | } |
180 | 180 | |
181 | - echo $option_field_output.' <a href="#" title="'.__('Number of elements per page','wpshop').'" class="wpshop_infobulle_marker">?</a>'; |
|
181 | + echo $option_field_output . ' <a href="#" title="' . __('Number of elements per page', 'wpshop') . '" class="wpshop_infobulle_marker">?</a>'; |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | /** |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | */ |
187 | 187 | function wpshop_display_latest_products_ordered() { |
188 | 188 | $display_option = get_option('wpshop_display_option'); |
189 | - $output = '<input type="text" value="' .( (!empty($display_option) && !empty($display_option['latest_products_ordered']) ) ? $display_option['latest_products_ordered'] : ''). '" name="wpshop_display_option[latest_products_ordered]" id="wpshop_display_latest_products_ordered" />'; |
|
189 | + $output = '<input type="text" value="' . ((!empty($display_option) && !empty($display_option['latest_products_ordered'])) ? $display_option['latest_products_ordered'] : '') . '" name="wpshop_display_option[latest_products_ordered]" id="wpshop_display_latest_products_ordered" />'; |
|
190 | 190 | echo $output; |
191 | 191 | } |
192 | 192 | |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | */ |
196 | 196 | function wpshop_hide_admin_bar() { |
197 | 197 | $wpshop_hide_admin_bar_option = get_option('wpshop_display_option'); |
198 | - $output = '<input type="checkbox" name="wpshop_display_option[wpshop_hide_admin_bar]" ' .( (!empty($wpshop_hide_admin_bar_option) && !empty($wpshop_hide_admin_bar_option['wpshop_hide_admin_bar']) ) ? 'checked="checked"' : ''). '/>'; |
|
198 | + $output = '<input type="checkbox" name="wpshop_display_option[wpshop_hide_admin_bar]" ' . ((!empty($wpshop_hide_admin_bar_option) && !empty($wpshop_hide_admin_bar_option['wpshop_hide_admin_bar'])) ? 'checked="checked"' : '') . '/>'; |
|
199 | 199 | echo $output; |
200 | 200 | } |
201 | 201 | |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | */ |
205 | 205 | public function wpshop_display_delete_order() { |
206 | 206 | $wpshop_display_delete_order_option = get_option('wpshop_display_option'); |
207 | - $output = '<input type="checkbox" name="wpshop_display_option[wpshop_display_delete_order]" ' .( (!empty($wpshop_display_delete_order_option) && !empty($wpshop_display_delete_order_option['wpshop_display_delete_order']) ) ? 'checked="checked"' : ''). '/>'; |
|
207 | + $output = '<input type="checkbox" name="wpshop_display_option[wpshop_display_delete_order]" ' . ((!empty($wpshop_display_delete_order_option) && !empty($wpshop_display_delete_order_option['wpshop_display_delete_order'])) ? 'checked="checked"' : '') . '/>'; |
|
208 | 208 | echo $output; |
209 | 209 | } |
210 | 210 | |
@@ -230,47 +230,47 @@ discard block |
||
230 | 230 | * EXPLANATIONS - Display customize WPShop explanantions |
231 | 231 | */ |
232 | 232 | function customize_wpshop_colors_explanation() { |
233 | - _e( 'Here, you can customize your WPShop elements like buttons, customer account parts and selected shipping method colors...', 'wpshop'); |
|
233 | + _e('Here, you can customize your WPShop elements like buttons, customer account parts and selected shipping method colors...', 'wpshop'); |
|
234 | 234 | } |
235 | 235 | |
236 | 236 | /** |
237 | 237 | * FIELDS - Display First button customize option |
238 | 238 | */ |
239 | 239 | function wps_customize_first_button_style() { |
240 | - $wpshop_customize_display_option = get_option( 'wpshop_customize_display_option' ); |
|
241 | - require( wpshop_tools::get_template_part( WPS_OPTIONS_DIR, WPS_OPTIONS_TEMPLATE_DIR, "backend", "wps_display_options_customize_first_button") ); |
|
240 | + $wpshop_customize_display_option = get_option('wpshop_customize_display_option'); |
|
241 | + require(wpshop_tools::get_template_part(WPS_OPTIONS_DIR, WPS_OPTIONS_TEMPLATE_DIR, "backend", "wps_display_options_customize_first_button")); |
|
242 | 242 | } |
243 | 243 | |
244 | 244 | /** |
245 | 245 | * FIELDS - Display Second button customize option |
246 | 246 | */ |
247 | 247 | function wps_customize_second_button_style() { |
248 | - $wpshop_customize_display_option = get_option( 'wpshop_customize_display_option' ); |
|
249 | - require( wpshop_tools::get_template_part( WPS_OPTIONS_DIR, WPS_OPTIONS_TEMPLATE_DIR, "backend", "wps_display_options_customize_second_button") ); |
|
248 | + $wpshop_customize_display_option = get_option('wpshop_customize_display_option'); |
|
249 | + require(wpshop_tools::get_template_part(WPS_OPTIONS_DIR, WPS_OPTIONS_TEMPLATE_DIR, "backend", "wps_display_options_customize_second_button")); |
|
250 | 250 | } |
251 | 251 | |
252 | 252 | /** |
253 | 253 | * FIELDS - Dsiplay Customer account customize option |
254 | 254 | */ |
255 | 255 | function wps_customize_account_style() { |
256 | - $wpshop_customize_display_option = get_option( 'wpshop_customize_display_option' ); |
|
257 | - require( wpshop_tools::get_template_part( WPS_OPTIONS_DIR, WPS_OPTIONS_TEMPLATE_DIR, "backend", "wps_display_options_customize_customer_account") ); |
|
256 | + $wpshop_customize_display_option = get_option('wpshop_customize_display_option'); |
|
257 | + require(wpshop_tools::get_template_part(WPS_OPTIONS_DIR, WPS_OPTIONS_TEMPLATE_DIR, "backend", "wps_display_options_customize_customer_account")); |
|
258 | 258 | } |
259 | 259 | |
260 | 260 | /** |
261 | 261 | * FIELDS - Dsiplay Customer account customize option |
262 | 262 | */ |
263 | 263 | function wps_customize_shipping_style() { |
264 | - $wpshop_customize_display_option = get_option( 'wpshop_customize_display_option' ); |
|
265 | - require( wpshop_tools::get_template_part( WPS_OPTIONS_DIR, WPS_OPTIONS_TEMPLATE_DIR, "backend", "wps_display_options_customize_shipping_list") ); |
|
264 | + $wpshop_customize_display_option = get_option('wpshop_customize_display_option'); |
|
265 | + require(wpshop_tools::get_template_part(WPS_OPTIONS_DIR, WPS_OPTIONS_TEMPLATE_DIR, "backend", "wps_display_options_customize_shipping_list")); |
|
266 | 266 | } |
267 | 267 | |
268 | 268 | /** |
269 | 269 | * Print Custom CSS Rules in administration |
270 | 270 | */ |
271 | 271 | function create_customizing_css_rules() { |
272 | - $wpshop_customize_display_option = get_option( 'wpshop_customize_display_option' ); |
|
273 | - require( wpshop_tools::get_template_part( WPS_OPTIONS_DIR, WPS_OPTIONS_TEMPLATE_DIR, "frontend", "wps_display_options_customize_css_rules") ); |
|
272 | + $wpshop_customize_display_option = get_option('wpshop_customize_display_option'); |
|
273 | + require(wpshop_tools::get_template_part(WPS_OPTIONS_DIR, WPS_OPTIONS_TEMPLATE_DIR, "frontend", "wps_display_options_customize_css_rules")); |
|
274 | 274 | } |
275 | 275 | |
276 | 276 | |
@@ -287,62 +287,62 @@ discard block |
||
287 | 287 | * @param array $input |
288 | 288 | * @return array |
289 | 289 | */ |
290 | - function admin_part_validator($input){ |
|
290 | + function admin_part_validator($input) { |
|
291 | 291 | return $input; |
292 | 292 | } |
293 | 293 | |
294 | 294 | /** |
295 | 295 | * EXPLANATIONS - Admin display options explanation |
296 | 296 | */ |
297 | - function admin_part_explanation(){ |
|
297 | + function admin_part_explanation() { |
|
298 | 298 | _e('You can defined some parameters for admin display', 'wpshop'); |
299 | 299 | } |
300 | 300 | |
301 | 301 | /** |
302 | 302 | * FIELDS - Display admin option Attributes set layout type |
303 | 303 | */ |
304 | - function wpshop_admin_display_attr_set_layout(){ |
|
304 | + function wpshop_admin_display_attr_set_layout() { |
|
305 | 305 | global $attribute_page_layout_types; |
306 | 306 | $field_identifier = 'wpshop_admin_attr_set_layout'; |
307 | 307 | $wpshop_admin_display_option = get_option('wpshop_admin_display_option', array()); |
308 | 308 | |
309 | - if ( current_user_can('wpshop_edit_options') ) |
|
309 | + if (current_user_can('wpshop_edit_options')) |
|
310 | 310 | $option_field_output = wpshop_form::form_input_select('wpshop_admin_display_option[' . $field_identifier . ']', $field_identifier, $attribute_page_layout_types, WPSHOP_ATTRIBUTE_SET_EDITION_PAGE_LAYOUT, '', 'index'); |
311 | 311 | else |
312 | 312 | $option_field_output = $wpshop_admin_display_option[$field_identifier]; |
313 | 313 | |
314 | - echo $option_field_output.' <a href="#" title="'.__('Define if the attribute set edition page is displayed as tab or as separated bloc','wpshop').'" class="wpshop_infobulle_marker">?</a>'; |
|
314 | + echo $option_field_output . ' <a href="#" title="' . __('Define if the attribute set edition page is displayed as tab or as separated bloc', 'wpshop') . '" class="wpshop_infobulle_marker">?</a>'; |
|
315 | 315 | } |
316 | 316 | |
317 | 317 | /** |
318 | 318 | * FIELDS - Display admin option attributes Layout type |
319 | 319 | */ |
320 | - function wpshop_admin_display_attr_layout(){ |
|
320 | + function wpshop_admin_display_attr_layout() { |
|
321 | 321 | global $attribute_page_layout_types; |
322 | 322 | $field_identifier = 'wpshop_admin_attr_layout'; |
323 | 323 | $wpshop_admin_display_option = get_option('wpshop_admin_display_option', array()); |
324 | 324 | |
325 | - if ( current_user_can('wpshop_edit_options') ) |
|
325 | + if (current_user_can('wpshop_edit_options')) |
|
326 | 326 | $option_field_output = wpshop_form::form_input_select('wpshop_admin_display_option[' . $field_identifier . ']', $field_identifier, $attribute_page_layout_types, WPSHOP_ATTRIBUTE_EDITION_PAGE_LAYOUT, '', 'index'); |
327 | 327 | else |
328 | 328 | $option_field_output = $wpshop_admin_display_option[$field_identifier]; |
329 | 329 | |
330 | - echo $option_field_output.' <a href="#" title="'.__('Define if the attribute edition page is displayed as tab or as separated bloc','wpshop').'" class="wpshop_infobulle_marker">?</a>'; |
|
330 | + echo $option_field_output . ' <a href="#" title="' . __('Define if the attribute edition page is displayed as tab or as separated bloc', 'wpshop') . '" class="wpshop_infobulle_marker">?</a>'; |
|
331 | 331 | } |
332 | 332 | |
333 | 333 | /** |
334 | 334 | * FIELDS - Display admin options Shortcode layout display |
335 | 335 | */ |
336 | - function wpshop_admin_display_shortcode_in_product_page(){ |
|
336 | + function wpshop_admin_display_shortcode_in_product_page() { |
|
337 | 337 | global $product_page_layout_types; |
338 | 338 | $field_identifier = 'wpshop_admin_product_shortcode_display'; |
339 | 339 | $wpshop_admin_display_option = get_option('wpshop_admin_display_option', array()); |
340 | 340 | |
341 | - if ( current_user_can('wpshop_edit_options') ) |
|
341 | + if (current_user_can('wpshop_edit_options')) |
|
342 | 342 | $option_field_output = wpshop_form::form_input_select('wpshop_admin_display_option[' . $field_identifier . ']', $field_identifier, $product_page_layout_types, WPSHOP_PRODUCT_SHORTCODE_DISPLAY_TYPE, '', 'index'); |
343 | 343 | else |
344 | 344 | $option_field_output = $wpshop_admin_display_option[$field_identifier]; |
345 | 345 | |
346 | - echo $option_field_output.' <a href="#" title="'.__('Define how to display the shortcode summary in product edition page','wpshop').'" class="wpshop_infobulle_marker">?</a>'; |
|
346 | + echo $option_field_output . ' <a href="#" title="' . __('Define how to display the shortcode summary in product edition page', 'wpshop') . '" class="wpshop_infobulle_marker">?</a>'; |
|
347 | 347 | } |
348 | 348 | } |
349 | 349 | \ No newline at end of file |
@@ -1,4 +1,6 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | class wps_display_options { |
3 | 5 | |
4 | 6 | function __construct() { |
@@ -73,8 +75,7 @@ discard block |
||
73 | 75 | $newinput['wpshop_display_list_type'] = $input['wpshop_display_list_type']; |
74 | 76 | if($input['wpshop_display_grid_element_number'] < WPSHOP_DISPLAY_GRID_ELEMENT_NUMBER_PER_LINE_MIN_RANGE){ |
75 | 77 | $input['wpshop_display_grid_element_number'] = WPSHOP_DISPLAY_GRID_ELEMENT_NUMBER_PER_LINE_MIN_RANGE; |
76 | - } |
|
77 | - elseif($input['wpshop_display_grid_element_number'] > WPSHOP_DISPLAY_GRID_ELEMENT_NUMBER_PER_LINE_MAX_RANGE){ |
|
78 | + } elseif($input['wpshop_display_grid_element_number'] > WPSHOP_DISPLAY_GRID_ELEMENT_NUMBER_PER_LINE_MAX_RANGE){ |
|
78 | 79 | $input['wpshop_display_grid_element_number'] = WPSHOP_DISPLAY_GRID_ELEMENT_NUMBER_PER_LINE_MAX_RANGE; |
79 | 80 | } |
80 | 81 | $newinput['wpshop_display_grid_element_number'] = $input['wpshop_display_grid_element_number']; |
@@ -130,8 +131,7 @@ discard block |
||
130 | 131 | } |
131 | 132 | $option_field_output .= wpshop_form::form_input_check('wpshop_display_option[' . $field_identifier . '][]', $field_identifier . '_' . $content_definition, $content_definition, $current_value, 'checkbox') . '<label for="' . $field_identifier . '_' . $content_definition . '" >' . $field_label . '</label><br/>'; |
132 | 133 | } |
133 | - } |
|
134 | - else{ |
|
134 | + } else{ |
|
135 | 135 | $option_field_output = $wpshop_display_option[$field_identifier]; |
136 | 136 | } |
137 | 137 | |
@@ -147,8 +147,7 @@ discard block |
||
147 | 147 | |
148 | 148 | if(current_user_can('wpshop_edit_options')){ |
149 | 149 | $option_field_output = wpshop_form::form_input_select('wpshop_display_option[' . $field_identifier . ']', $field_identifier, array('grid' => __('Grid', 'wpshop'), 'list' => __('List', 'wpshop')), $wpshop_display_option[$field_identifier], '', 'index'); |
150 | - } |
|
151 | - else{ |
|
150 | + } else{ |
|
152 | 151 | $option_field_output = $wpshop_display_option[$field_identifier]; |
153 | 152 | } |
154 | 153 | |
@@ -173,8 +172,7 @@ discard block |
||
173 | 172 | |
174 | 173 | if(current_user_can('wpshop_edit_options')){ |
175 | 174 | $option_field_output = wpshop_form::form_input('wpshop_display_option[' . $field_identifier . ']', $field_identifier, !empty($wpshop_display_option[$field_identifier]) ? $wpshop_display_option[$field_identifier] : 20, 'text'); |
176 | - } |
|
177 | - else{ |
|
175 | + } else{ |
|
178 | 176 | $option_field_output = $wpshop_display_option[$field_identifier]; |
179 | 177 | } |
180 | 178 | |
@@ -306,10 +304,11 @@ discard block |
||
306 | 304 | $field_identifier = 'wpshop_admin_attr_set_layout'; |
307 | 305 | $wpshop_admin_display_option = get_option('wpshop_admin_display_option', array()); |
308 | 306 | |
309 | - if ( current_user_can('wpshop_edit_options') ) |
|
310 | - $option_field_output = wpshop_form::form_input_select('wpshop_admin_display_option[' . $field_identifier . ']', $field_identifier, $attribute_page_layout_types, WPSHOP_ATTRIBUTE_SET_EDITION_PAGE_LAYOUT, '', 'index'); |
|
311 | - else |
|
312 | - $option_field_output = $wpshop_admin_display_option[$field_identifier]; |
|
307 | + if ( current_user_can('wpshop_edit_options') ) { |
|
308 | + $option_field_output = wpshop_form::form_input_select('wpshop_admin_display_option[' . $field_identifier . ']', $field_identifier, $attribute_page_layout_types, WPSHOP_ATTRIBUTE_SET_EDITION_PAGE_LAYOUT, '', 'index'); |
|
309 | + } else { |
|
310 | + $option_field_output = $wpshop_admin_display_option[$field_identifier]; |
|
311 | + } |
|
313 | 312 | |
314 | 313 | echo $option_field_output.' <a href="#" title="'.__('Define if the attribute set edition page is displayed as tab or as separated bloc','wpshop').'" class="wpshop_infobulle_marker">?</a>'; |
315 | 314 | } |
@@ -322,10 +321,11 @@ discard block |
||
322 | 321 | $field_identifier = 'wpshop_admin_attr_layout'; |
323 | 322 | $wpshop_admin_display_option = get_option('wpshop_admin_display_option', array()); |
324 | 323 | |
325 | - if ( current_user_can('wpshop_edit_options') ) |
|
326 | - $option_field_output = wpshop_form::form_input_select('wpshop_admin_display_option[' . $field_identifier . ']', $field_identifier, $attribute_page_layout_types, WPSHOP_ATTRIBUTE_EDITION_PAGE_LAYOUT, '', 'index'); |
|
327 | - else |
|
328 | - $option_field_output = $wpshop_admin_display_option[$field_identifier]; |
|
324 | + if ( current_user_can('wpshop_edit_options') ) { |
|
325 | + $option_field_output = wpshop_form::form_input_select('wpshop_admin_display_option[' . $field_identifier . ']', $field_identifier, $attribute_page_layout_types, WPSHOP_ATTRIBUTE_EDITION_PAGE_LAYOUT, '', 'index'); |
|
326 | + } else { |
|
327 | + $option_field_output = $wpshop_admin_display_option[$field_identifier]; |
|
328 | + } |
|
329 | 329 | |
330 | 330 | echo $option_field_output.' <a href="#" title="'.__('Define if the attribute edition page is displayed as tab or as separated bloc','wpshop').'" class="wpshop_infobulle_marker">?</a>'; |
331 | 331 | } |
@@ -338,10 +338,11 @@ discard block |
||
338 | 338 | $field_identifier = 'wpshop_admin_product_shortcode_display'; |
339 | 339 | $wpshop_admin_display_option = get_option('wpshop_admin_display_option', array()); |
340 | 340 | |
341 | - if ( current_user_can('wpshop_edit_options') ) |
|
342 | - $option_field_output = wpshop_form::form_input_select('wpshop_admin_display_option[' . $field_identifier . ']', $field_identifier, $product_page_layout_types, WPSHOP_PRODUCT_SHORTCODE_DISPLAY_TYPE, '', 'index'); |
|
343 | - else |
|
344 | - $option_field_output = $wpshop_admin_display_option[$field_identifier]; |
|
341 | + if ( current_user_can('wpshop_edit_options') ) { |
|
342 | + $option_field_output = wpshop_form::form_input_select('wpshop_admin_display_option[' . $field_identifier . ']', $field_identifier, $product_page_layout_types, WPSHOP_PRODUCT_SHORTCODE_DISPLAY_TYPE, '', 'index'); |
|
343 | + } else { |
|
344 | + $option_field_output = $wpshop_admin_display_option[$field_identifier]; |
|
345 | + } |
|
345 | 346 | |
346 | 347 | echo $option_field_output.' <a href="#" title="'.__('Define how to display the shortcode summary in product edition page','wpshop').'" class="wpshop_infobulle_marker">?</a>'; |
347 | 348 | } |
@@ -1,63 +1,63 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
2 | - if( !empty($wpshop_customize_display_option) ) : ?> |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | + if (!empty($wpshop_customize_display_option)) : ?> |
|
3 | 3 | <!-- WPSHOP CUSTOM CSS RULES --> |
4 | 4 | <style> |
5 | - <?php if( !empty($wpshop_customize_display_option['first']) ) : ?> |
|
5 | + <?php if (!empty($wpshop_customize_display_option['first'])) : ?> |
|
6 | 6 | [class*="wps"][class*="bton"][class*="first"] { |
7 | - <?php if( !empty($wpshop_customize_display_option['first']['background']) ) : ?> |
|
7 | + <?php if (!empty($wpshop_customize_display_option['first']['background'])) : ?> |
|
8 | 8 | background : <?php echo $wpshop_customize_display_option['first']['background']; ?>!important; |
9 | 9 | <?php endif; ?> |
10 | - <?php if( !empty($wpshop_customize_display_option['first']['shadow']) ) : ?> |
|
10 | + <?php if (!empty($wpshop_customize_display_option['first']['shadow'])) : ?> |
|
11 | 11 | box-shadow: 0 0.25em 0 0 <?php echo $wpshop_customize_display_option['first']['shadow']; ?>!important; |
12 | 12 | <?php endif; ?> |
13 | - <?php if( !empty($wpshop_customize_display_option['first']['text']) ) : ?> |
|
13 | + <?php if (!empty($wpshop_customize_display_option['first']['text'])) : ?> |
|
14 | 14 | color : <?php echo $wpshop_customize_display_option['first']['text']; ?>!important; |
15 | 15 | <?php endif; ?> |
16 | 16 | |
17 | 17 | } |
18 | 18 | |
19 | 19 | [class*="wps"][class*="bton"][class*="first"]:hover { |
20 | - <?php if( !empty($wpshop_customize_display_option['first']['background_hover']) ) : ?> |
|
20 | + <?php if (!empty($wpshop_customize_display_option['first']['background_hover'])) : ?> |
|
21 | 21 | background : <?php echo $wpshop_customize_display_option['first']['background_hover']; ?>!important; |
22 | 22 | <?php endif; ?> |
23 | - <?php if( !empty($wpshop_customize_display_option['first']['shadow_hover']) ) : ?> |
|
23 | + <?php if (!empty($wpshop_customize_display_option['first']['shadow_hover'])) : ?> |
|
24 | 24 | box-shadow: 0 0.25em 0 0 <?php echo $wpshop_customize_display_option['first']['shadow_hover']; ?>!important; |
25 | 25 | <?php endif; ?> |
26 | - <?php if( !empty($wpshop_customize_display_option['first']['text_hover']) ) : ?> |
|
26 | + <?php if (!empty($wpshop_customize_display_option['first']['text_hover'])) : ?> |
|
27 | 27 | color : <?php echo $wpshop_customize_display_option['first']['text_hover']; ?>!important; |
28 | 28 | <?php endif; ?> |
29 | 29 | } |
30 | 30 | <?php endif; ?> |
31 | 31 | |
32 | - <?php if( !empty($wpshop_customize_display_option['second']) ) : ?> |
|
32 | + <?php if (!empty($wpshop_customize_display_option['second'])) : ?> |
|
33 | 33 | [class*="wps"][class*="bton"][class*="second"] { |
34 | - <?php if( !empty($wpshop_customize_display_option['second']['background']) ) : ?> |
|
34 | + <?php if (!empty($wpshop_customize_display_option['second']['background'])) : ?> |
|
35 | 35 | background : <?php echo $wpshop_customize_display_option['second']['background']; ?>!important; |
36 | 36 | <?php endif; ?> |
37 | - <?php if( !empty($wpshop_customize_display_option['second']['shadow']) ) : ?> |
|
37 | + <?php if (!empty($wpshop_customize_display_option['second']['shadow'])) : ?> |
|
38 | 38 | box-shadow: 0 0.25em 0 0 <?php echo $wpshop_customize_display_option['second']['shadow']; ?>!important; |
39 | 39 | <?php endif; ?> |
40 | - <?php if( !empty($wpshop_customize_display_option['second']['text']) ) : ?> |
|
40 | + <?php if (!empty($wpshop_customize_display_option['second']['text'])) : ?> |
|
41 | 41 | color : <?php echo $wpshop_customize_display_option['second']['text']; ?>!important; |
42 | 42 | <?php endif; ?> |
43 | 43 | |
44 | 44 | } |
45 | 45 | |
46 | 46 | [class*="wps"][class*="bton"][class*="second"]:hover { |
47 | - <?php if( !empty($wpshop_customize_display_option['second']['background_hover']) ) : ?> |
|
47 | + <?php if (!empty($wpshop_customize_display_option['second']['background_hover'])) : ?> |
|
48 | 48 | background : <?php echo $wpshop_customize_display_option['second']['background_hover']; ?>!important; |
49 | 49 | <?php endif; ?> |
50 | - <?php if( !empty($wpshop_customize_display_option['second']['shadow_hover']) ) : ?> |
|
50 | + <?php if (!empty($wpshop_customize_display_option['second']['shadow_hover'])) : ?> |
|
51 | 51 | box-shadow: 0 0.25em 0 0 <?php echo $wpshop_customize_display_option['second']['shadow_hover']; ?>!important; |
52 | 52 | <?php endif; ?> |
53 | - <?php if( !empty($wpshop_customize_display_option['second']['text_hover']) ) : ?> |
|
53 | + <?php if (!empty($wpshop_customize_display_option['second']['text_hover'])) : ?> |
|
54 | 54 | color : <?php echo $wpshop_customize_display_option['second']['text_hover']; ?>!important; |
55 | 55 | <?php endif; ?> |
56 | 56 | } |
57 | 57 | <?php endif; ?> |
58 | 58 | |
59 | 59 | |
60 | - <?php if( !empty($wpshop_customize_display_option['account']['activ_element_background']) ) : ?> |
|
60 | + <?php if (!empty($wpshop_customize_display_option['account']['activ_element_background'])) : ?> |
|
61 | 61 | .wps-section-taskbar ul li.wps-activ a { |
62 | 62 | background : <?php echo $wpshop_customize_display_option['account']['activ_element_background']; ?>!important |
63 | 63 | } |
@@ -66,13 +66,13 @@ discard block |
||
66 | 66 | } |
67 | 67 | <?php endif; ?> |
68 | 68 | |
69 | - <?php if( !empty($wpshop_customize_display_option['account']['part_background']) ) : ?> |
|
69 | + <?php if (!empty($wpshop_customize_display_option['account']['part_background'])) : ?> |
|
70 | 70 | .wps-section-taskbar ul li a { |
71 | 71 | background : <?php echo $wpshop_customize_display_option['account']['part_background']; ?>!important; |
72 | 72 | } |
73 | 73 | <?php endif; ?> |
74 | 74 | |
75 | - <?php if( !empty($wpshop_customize_display_option['account']['information_box_background']) ) : ?> |
|
75 | + <?php if (!empty($wpshop_customize_display_option['account']['information_box_background'])) : ?> |
|
76 | 76 | .wps-section-taskbar ul li a span:before { |
77 | 77 | border-right-color : <?php echo $wpshop_customize_display_option['account']['information_box_background']; ?>!important |
78 | 78 | } |
@@ -81,25 +81,25 @@ discard block |
||
81 | 81 | } |
82 | 82 | <?php endif; ?> |
83 | 83 | |
84 | - <?php if( !empty($wpshop_customize_display_option['shipping']['active_element']) ) : ?> |
|
84 | + <?php if (!empty($wpshop_customize_display_option['shipping']['active_element'])) : ?> |
|
85 | 85 | .wps-itemList li.wps-activ { |
86 | 86 | background : <?php echo $wpshop_customize_display_option['shipping']['active_element']; ?>!important; |
87 | 87 | } |
88 | 88 | <?php endif; ?> |
89 | 89 | |
90 | 90 | .wps-itemList li { |
91 | - <?php if( !empty($wpshop_customize_display_option['shipping']['background']) ) : ?> |
|
91 | + <?php if (!empty($wpshop_customize_display_option['shipping']['background'])) : ?> |
|
92 | 92 | background : <?php echo $wpshop_customize_display_option['shipping']['background']; ?>!important; |
93 | 93 | <?php endif; ?> |
94 | 94 | } |
95 | 95 | |
96 | - <?php if( !empty($wpshop_customize_display_option['shipping']['text']) ) : ?> |
|
96 | + <?php if (!empty($wpshop_customize_display_option['shipping']['text'])) : ?> |
|
97 | 97 | .wps-itemList li span { |
98 | 98 | color : <?php echo $wpshop_customize_display_option['shipping']['text']; ?>!important; |
99 | 99 | } |
100 | 100 | |
101 | 101 | .wps-itemList li div { |
102 | - <?php if( !empty($wpshop_customize_display_option['shipping']['active_element']) ) : ?> |
|
102 | + <?php if (!empty($wpshop_customize_display_option['shipping']['active_element'])) : ?> |
|
103 | 103 | background : <?php echo $wpshop_customize_display_option['shipping']['active_element']; ?>!important; |
104 | 104 | <?php endif; ?> |
105 | 105 | } |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -1,32 +1,32 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="wps-gridwrapper3-padded"> |
4 | 4 | <div> |
5 | 5 | <div class="wps-form-group"> |
6 | - <label><?php _e( 'First button background color', 'wpshop'); ?> :</label> |
|
6 | + <label><?php _e('First button background color', 'wpshop'); ?> :</label> |
|
7 | 7 | <div class="wps-form"> |
8 | - <input type="text" name="wpshop_customize_display_option[first][background]" id="wpshop_customize_display_option_first_background" class="wps-color-picker-field" value="<?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['background']) ) ? $wpshop_customize_display_option['first']['background'] : ''; ?>" /> |
|
9 | - <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['background']) ) ? $wpshop_customize_display_option['first']['background'] : ''; ?>"></span> |
|
8 | + <input type="text" name="wpshop_customize_display_option[first][background]" id="wpshop_customize_display_option_first_background" class="wps-color-picker-field" value="<?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['background'])) ? $wpshop_customize_display_option['first']['background'] : ''; ?>" /> |
|
9 | + <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['background'])) ? $wpshop_customize_display_option['first']['background'] : ''; ?>"></span> |
|
10 | 10 | </div> |
11 | 11 | </div> |
12 | 12 | </div> |
13 | 13 | |
14 | 14 | <div> |
15 | 15 | <div class="wps-form-group"> |
16 | - <label><?php _e( 'First button shadow color', 'wpshop'); ?> :</label> |
|
16 | + <label><?php _e('First button shadow color', 'wpshop'); ?> :</label> |
|
17 | 17 | <div class="wps-form"> |
18 | - <input type="text" name="wpshop_customize_display_option[first][shadow]" id="wpshop_customize_display_option_first_shadow" class="wps-color-picker-field" value="<?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['shadow']) ) ? $wpshop_customize_display_option['first']['shadow'] : ''; ?>" /> |
|
19 | - <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['shadow']) ) ? $wpshop_customize_display_option['first']['shadow'] : ''; ?>"></span> |
|
18 | + <input type="text" name="wpshop_customize_display_option[first][shadow]" id="wpshop_customize_display_option_first_shadow" class="wps-color-picker-field" value="<?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['shadow'])) ? $wpshop_customize_display_option['first']['shadow'] : ''; ?>" /> |
|
19 | + <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['shadow'])) ? $wpshop_customize_display_option['first']['shadow'] : ''; ?>"></span> |
|
20 | 20 | </div> |
21 | 21 | </div> |
22 | 22 | </div> |
23 | 23 | |
24 | 24 | <div> |
25 | 25 | <div class="wps-form-group"> |
26 | - <label><?php _e( 'First button text color', 'wpshop'); ?> :</label> |
|
26 | + <label><?php _e('First button text color', 'wpshop'); ?> :</label> |
|
27 | 27 | <div class="wps-form"> |
28 | - <input type="text" name="wpshop_customize_display_option[first][text]" id="wpshop_customize_display_option_first_text" class="wps-color-picker-field" value="<?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['text']) ) ? $wpshop_customize_display_option['first']['text'] : ''; ?>"/> |
|
29 | - <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['text']) ) ? $wpshop_customize_display_option['first']['text'] : ''; ?>"></span> |
|
28 | + <input type="text" name="wpshop_customize_display_option[first][text]" id="wpshop_customize_display_option_first_text" class="wps-color-picker-field" value="<?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['text'])) ? $wpshop_customize_display_option['first']['text'] : ''; ?>"/> |
|
29 | + <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['text'])) ? $wpshop_customize_display_option['first']['text'] : ''; ?>"></span> |
|
30 | 30 | </div> |
31 | 31 | </div> |
32 | 32 | </div> |
@@ -36,28 +36,28 @@ discard block |
||
36 | 36 | <div class="wps-gridwrapper3-padded"> |
37 | 37 | <div> |
38 | 38 | <div class="wps-form-group"> |
39 | - <label><?php _e( 'First button background color on hover action', 'wpshop'); ?> :</label> |
|
39 | + <label><?php _e('First button background color on hover action', 'wpshop'); ?> :</label> |
|
40 | 40 | <div class="wps-form"> |
41 | - <input type="text" name="wpshop_customize_display_option[first][background_hover]" id="wpshop_customize_display_option_first_hover_background" class="wps-color-picker-field" value="<?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['background_hover']) ) ? $wpshop_customize_display_option['first']['background_hover'] : ''; ?>" /> |
|
42 | - <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['background_hover']) ) ? $wpshop_customize_display_option['first']['background_hover'] : ''; ?>"></span> |
|
41 | + <input type="text" name="wpshop_customize_display_option[first][background_hover]" id="wpshop_customize_display_option_first_hover_background" class="wps-color-picker-field" value="<?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['background_hover'])) ? $wpshop_customize_display_option['first']['background_hover'] : ''; ?>" /> |
|
42 | + <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['background_hover'])) ? $wpshop_customize_display_option['first']['background_hover'] : ''; ?>"></span> |
|
43 | 43 | </div> |
44 | 44 | </div> |
45 | 45 | </div> |
46 | 46 | |
47 | 47 | <div> |
48 | 48 | <div class="wps-form-group"> |
49 | - <label><?php _e( 'First button shadow color on hover action', 'wpshop'); ?> :</label> |
|
50 | - <div class="wps-form"><input type="text" name="wpshop_customize_display_option[first][shadow_hover]" id="wpshop_customize_display_option_first_hover_shadow" class="wps-color-picker-field" value="<?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['shadow_hover']) ) ? $wpshop_customize_display_option['first']['shadow_hover'] : ''; ?>" /> |
|
51 | - <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['shadow_hover']) ) ? $wpshop_customize_display_option['first']['shadow_hover'] : ''; ?>"></span> |
|
49 | + <label><?php _e('First button shadow color on hover action', 'wpshop'); ?> :</label> |
|
50 | + <div class="wps-form"><input type="text" name="wpshop_customize_display_option[first][shadow_hover]" id="wpshop_customize_display_option_first_hover_shadow" class="wps-color-picker-field" value="<?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['shadow_hover'])) ? $wpshop_customize_display_option['first']['shadow_hover'] : ''; ?>" /> |
|
51 | + <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['shadow_hover'])) ? $wpshop_customize_display_option['first']['shadow_hover'] : ''; ?>"></span> |
|
52 | 52 | </div> |
53 | 53 | </div> |
54 | 54 | </div> |
55 | 55 | |
56 | 56 | <div> |
57 | 57 | <div class="wps-form-group"> |
58 | - <label><?php _e( 'First button text color on hover action', 'wpshop'); ?> :</label> |
|
59 | - <div class="wps-form"><input type="text" name="wpshop_customize_display_option[first][text_hover]" id="wpshop_customize_display_option_first_hover_text" class="wps-color-picker-field" value="<?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['text_hover']) ) ? $wpshop_customize_display_option['first']['text_hover'] : ''; ?>" /> |
|
60 | - <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['text_hover']) ) ? $wpshop_customize_display_option['first']['text_hover'] : ''; ?>"></span> |
|
58 | + <label><?php _e('First button text color on hover action', 'wpshop'); ?> :</label> |
|
59 | + <div class="wps-form"><input type="text" name="wpshop_customize_display_option[first][text_hover]" id="wpshop_customize_display_option_first_hover_text" class="wps-color-picker-field" value="<?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['text_hover'])) ? $wpshop_customize_display_option['first']['text_hover'] : ''; ?>" /> |
|
60 | + <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['first']) && !empty($wpshop_customize_display_option['first']['text_hover'])) ? $wpshop_customize_display_option['first']['text_hover'] : ''; ?>"></span> |
|
61 | 61 | </div> |
62 | 62 | </div> |
63 | 63 | </div> |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -1,30 +1,30 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="wps-gridwrapper3-padded"> |
4 | 4 | <div> |
5 | 5 | <div class="wps-form-group"> |
6 | - <label><?php _e( 'Shipping mode list element background', 'wpshop'); ?> :</label> |
|
6 | + <label><?php _e('Shipping mode list element background', 'wpshop'); ?> :</label> |
|
7 | 7 | <div class="wps-form"> |
8 | - <input type="text" name="wpshop_customize_display_option[shipping][background]" class="wps-color-picker-field" value="<?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['shipping']['background']) ) ? $wpshop_customize_display_option['shipping']['background'] : ''; ?>" /></div> |
|
9 | - <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['shipping']['background']) ) ? $wpshop_customize_display_option['shipping']['background'] : ''; ?>" /></span> |
|
8 | + <input type="text" name="wpshop_customize_display_option[shipping][background]" class="wps-color-picker-field" value="<?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['shipping']['background'])) ? $wpshop_customize_display_option['shipping']['background'] : ''; ?>" /></div> |
|
9 | + <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['shipping']['background'])) ? $wpshop_customize_display_option['shipping']['background'] : ''; ?>" /></span> |
|
10 | 10 | </div> |
11 | 11 | </div> |
12 | 12 | |
13 | 13 | <div> |
14 | 14 | <div class="wps-form-group"> |
15 | - <label><?php _e( 'Selected shipping mode list element background', 'wpshop'); ?> :</label> |
|
15 | + <label><?php _e('Selected shipping mode list element background', 'wpshop'); ?> :</label> |
|
16 | 16 | <div class="wps-form"> |
17 | - <input type="text" name="wpshop_customize_display_option[shipping][active_element]" class="wps-color-picker-field" value="<?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['shipping']) && !empty($wpshop_customize_display_option['shipping']['active_element']) ) ? $wpshop_customize_display_option['shipping']['active_element'] : ''; ?>" /></div> |
|
18 | - <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['shipping']) && !empty($wpshop_customize_display_option['shipping']['active_element']) ) ? $wpshop_customize_display_option['shipping']['active_element'] : ''; ?>" /></span> |
|
17 | + <input type="text" name="wpshop_customize_display_option[shipping][active_element]" class="wps-color-picker-field" value="<?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['shipping']) && !empty($wpshop_customize_display_option['shipping']['active_element'])) ? $wpshop_customize_display_option['shipping']['active_element'] : ''; ?>" /></div> |
|
18 | + <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['shipping']) && !empty($wpshop_customize_display_option['shipping']['active_element'])) ? $wpshop_customize_display_option['shipping']['active_element'] : ''; ?>" /></span> |
|
19 | 19 | </div> |
20 | 20 | </div> |
21 | 21 | |
22 | 22 | <div> |
23 | 23 | <div class="wps-form-group"> |
24 | - <label><?php _e( 'Shipping mode list element text color', 'wpshop'); ?> :</label> |
|
24 | + <label><?php _e('Shipping mode list element text color', 'wpshop'); ?> :</label> |
|
25 | 25 | <div class="wps-form"> |
26 | - <input type="text" name="wpshop_customize_display_option[shipping][text]" class="wps-color-picker-field" value="<?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['shipping']) && !empty($wpshop_customize_display_option['shipping']['text']) ) ? $wpshop_customize_display_option['shipping']['text'] : ''; ?>"/></div> |
|
27 | - <span style="display : inline-block; width : 20px; height : 20px; background :<?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['shipping']) && !empty($wpshop_customize_display_option['shipping']['text']) ) ? $wpshop_customize_display_option['shipping']['text'] : ''; ?>" /></span> |
|
26 | + <input type="text" name="wpshop_customize_display_option[shipping][text]" class="wps-color-picker-field" value="<?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['shipping']) && !empty($wpshop_customize_display_option['shipping']['text'])) ? $wpshop_customize_display_option['shipping']['text'] : ''; ?>"/></div> |
|
27 | + <span style="display : inline-block; width : 20px; height : 20px; background :<?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['shipping']) && !empty($wpshop_customize_display_option['shipping']['text'])) ? $wpshop_customize_display_option['shipping']['text'] : ''; ?>" /></span> |
|
28 | 28 | </div> |
29 | 29 | </div> |
30 | 30 |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -1,5 +1,5 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
2 | - if(current_user_can('wpshop_edit_options') ) : ?> |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | + if (current_user_can('wpshop_edit_options')) : ?> |
|
3 | 3 | <?php |
4 | 4 | $value = ($wpshop_display_option[$field_identifier] <= 0 ? WPSHOP_DISPLAY_GRID_ELEMENT_NUMBER_PER_LINE_MIN_RANGE : $wpshop_display_option[$field_identifier]); |
5 | 5 | ?> |
@@ -10,8 +10,8 @@ discard block |
||
10 | 10 | wpshop(document).ready(function(){ |
11 | 11 | jQuery('#<?php echo $field_identifier ?>slider').slider({ |
12 | 12 | value : <?php echo $value; ?>, |
13 | - min: <?php echo WPSHOP_DISPLAY_GRID_ELEMENT_NUMBER_PER_LINE_MIN_RANGE ; ?>, |
|
14 | - max: <?php echo WPSHOP_DISPLAY_GRID_ELEMENT_NUMBER_PER_LINE_MAX_RANGE ; ?>, |
|
13 | + min: <?php echo WPSHOP_DISPLAY_GRID_ELEMENT_NUMBER_PER_LINE_MIN_RANGE; ?>, |
|
14 | + max: <?php echo WPSHOP_DISPLAY_GRID_ELEMENT_NUMBER_PER_LINE_MAX_RANGE; ?>, |
|
15 | 15 | range: "min", |
16 | 16 | step: 1, |
17 | 17 | slide: function(event, ui) { |
@@ -27,5 +27,5 @@ discard block |
||
27 | 27 | <?php else : |
28 | 28 | $option_field_output = $wpshop_display_option[$field_identifier]; |
29 | 29 | endif; ?> |
30 | -<a href="#" title="<?php _e('Number of products displayed per line when grid display mode is active','wpshop'); ?>" class="wpshop_infobulle_marker">?</a> |
|
30 | +<a href="#" title="<?php _e('Number of products displayed per line when grid display mode is active', 'wpshop'); ?>" class="wpshop_infobulle_marker">?</a> |
|
31 | 31 | |
32 | 32 | \ No newline at end of file |
@@ -1,4 +1,6 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | if(current_user_can('wpshop_edit_options') ) : ?> |
3 | 5 | <?php |
4 | 6 | $value = ($wpshop_display_option[$field_identifier] <= 0 ? WPSHOP_DISPLAY_GRID_ELEMENT_NUMBER_PER_LINE_MIN_RANGE : $wpshop_display_option[$field_identifier]); |
@@ -24,8 +26,10 @@ discard block |
||
24 | 26 | }); |
25 | 27 | </script> |
26 | 28 | |
27 | -<?php else : |
|
29 | +<?php else { |
|
30 | + : |
|
28 | 31 | $option_field_output = $wpshop_display_option[$field_identifier]; |
32 | +} |
|
29 | 33 | endif; ?> |
30 | 34 | <a href="#" title="<?php _e('Number of products displayed per line when grid display mode is active','wpshop'); ?>" class="wpshop_infobulle_marker">?</a> |
31 | 35 | |
32 | 36 | \ No newline at end of file |
@@ -1,30 +1,30 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="wps-gridwrapper3-padded"> |
4 | 4 | <div> |
5 | 5 | <div class="wps-form-group"> |
6 | - <label><?php _e( 'Second button background color', 'wpshop'); ?> :</label> |
|
6 | + <label><?php _e('Second button background color', 'wpshop'); ?> :</label> |
|
7 | 7 | <div class="wps-form"> |
8 | - <input type="text" name="wpshop_customize_display_option[second][background]" id="wpshop_customize_display_option_second_background" class="wps-color-picker-field" value="<?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['background']) ) ? $wpshop_customize_display_option['second']['background'] : ''; ?>" /></div> |
|
9 | - <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['account']) && !empty($wpshop_customize_display_option['account']['activ_element_background']) ) ? $wpshop_customize_display_option['account']['activ_element_background'] : ''; ?>"></span> |
|
8 | + <input type="text" name="wpshop_customize_display_option[second][background]" id="wpshop_customize_display_option_second_background" class="wps-color-picker-field" value="<?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['background'])) ? $wpshop_customize_display_option['second']['background'] : ''; ?>" /></div> |
|
9 | + <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['account']) && !empty($wpshop_customize_display_option['account']['activ_element_background'])) ? $wpshop_customize_display_option['account']['activ_element_background'] : ''; ?>"></span> |
|
10 | 10 | </div> |
11 | 11 | </div> |
12 | 12 | |
13 | 13 | <div> |
14 | 14 | <div class="wps-form-group"> |
15 | - <label><?php _e( 'Second button shadow color', 'wpshop'); ?> :</label> |
|
15 | + <label><?php _e('Second button shadow color', 'wpshop'); ?> :</label> |
|
16 | 16 | <div class="wps-form"> |
17 | - <input type="text" name="wpshop_customize_display_option[second][shadow]" id="wpshop_customize_display_option_second_shadow" class="wps-color-picker-field" value="<?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['shadow']) ) ? $wpshop_customize_display_option['second']['shadow'] : ''; ?>" /></div> |
|
18 | - <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['shadow']) ) ? $wpshop_customize_display_option['second']['shadow'] : ''; ?>" /></span> |
|
17 | + <input type="text" name="wpshop_customize_display_option[second][shadow]" id="wpshop_customize_display_option_second_shadow" class="wps-color-picker-field" value="<?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['shadow'])) ? $wpshop_customize_display_option['second']['shadow'] : ''; ?>" /></div> |
|
18 | + <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['shadow'])) ? $wpshop_customize_display_option['second']['shadow'] : ''; ?>" /></span> |
|
19 | 19 | </div> |
20 | 20 | </div> |
21 | 21 | |
22 | 22 | <div> |
23 | 23 | <div class="wps-form-group"> |
24 | - <label><?php _e( 'Second button text color', 'wpshop'); ?> :</label> |
|
24 | + <label><?php _e('Second button text color', 'wpshop'); ?> :</label> |
|
25 | 25 | <div class="wps-form"> |
26 | - <input type="text" name="wpshop_customize_display_option[second][text]" id="wpshop_customize_display_option_second_text" class="wps-color-picker-field" value="<?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['text']) ) ? $wpshop_customize_display_option['second']['text'] : ''; ?>"/></div> |
|
27 | - <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['text']) ) ? $wpshop_customize_display_option['second']['text'] : ''; ?>" /></span> |
|
26 | + <input type="text" name="wpshop_customize_display_option[second][text]" id="wpshop_customize_display_option_second_text" class="wps-color-picker-field" value="<?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['text'])) ? $wpshop_customize_display_option['second']['text'] : ''; ?>"/></div> |
|
27 | + <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['text'])) ? $wpshop_customize_display_option['second']['text'] : ''; ?>" /></span> |
|
28 | 28 | </div> |
29 | 29 | </div> |
30 | 30 | |
@@ -33,28 +33,28 @@ discard block |
||
33 | 33 | <div class="wps-gridwrapper3-padded"> |
34 | 34 | <div> |
35 | 35 | <div class="wps-form-group"> |
36 | - <label><?php _e( 'Second button background color on hover action', 'wpshop'); ?> :</label> |
|
36 | + <label><?php _e('Second button background color on hover action', 'wpshop'); ?> :</label> |
|
37 | 37 | <div class="wps-form"> |
38 | - <input type="text" name="wpshop_customize_display_option[second][background_hover]" id="wpshop_customize_display_option_second_hover_background" class="wps-color-picker-field" value="<?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['background_hover']) ) ? $wpshop_customize_display_option['second']['background_hover'] : ''; ?>" /></div> |
|
39 | - <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['background_hover']) ) ? $wpshop_customize_display_option['second']['background_hover'] : ''; ?>" /></span> |
|
38 | + <input type="text" name="wpshop_customize_display_option[second][background_hover]" id="wpshop_customize_display_option_second_hover_background" class="wps-color-picker-field" value="<?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['background_hover'])) ? $wpshop_customize_display_option['second']['background_hover'] : ''; ?>" /></div> |
|
39 | + <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['background_hover'])) ? $wpshop_customize_display_option['second']['background_hover'] : ''; ?>" /></span> |
|
40 | 40 | </div> |
41 | 41 | </div> |
42 | 42 | |
43 | 43 | <div> |
44 | 44 | <div class="wps-form-group"> |
45 | - <label><?php _e( 'Second button shadow color on hover action', 'wpshop'); ?> :</label> |
|
45 | + <label><?php _e('Second button shadow color on hover action', 'wpshop'); ?> :</label> |
|
46 | 46 | <div class="wps-form"> |
47 | - <input type="text" name="wpshop_customize_display_option[second][shadow_hover]" id="wpshop_customize_display_option_second_hover_shadow" class="wps-color-picker-field" value="<?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['shadow_hover']) ) ? $wpshop_customize_display_option['second']['shadow_hover'] : ''; ?>" /></div> |
|
48 | - <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['shadow_hover']) ) ? $wpshop_customize_display_option['second']['shadow_hover'] : ''; ?>" /></span> |
|
47 | + <input type="text" name="wpshop_customize_display_option[second][shadow_hover]" id="wpshop_customize_display_option_second_hover_shadow" class="wps-color-picker-field" value="<?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['shadow_hover'])) ? $wpshop_customize_display_option['second']['shadow_hover'] : ''; ?>" /></div> |
|
48 | + <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['shadow_hover'])) ? $wpshop_customize_display_option['second']['shadow_hover'] : ''; ?>" /></span> |
|
49 | 49 | </div> |
50 | 50 | </div> |
51 | 51 | |
52 | 52 | <div> |
53 | 53 | <div class="wps-form-group"> |
54 | - <label><?php _e( 'Second button text color on hover action', 'wpshop'); ?> :</label> |
|
54 | + <label><?php _e('Second button text color on hover action', 'wpshop'); ?> :</label> |
|
55 | 55 | <div class="wps-form"> |
56 | - <input type="text" name="wpshop_customize_display_option[second][text_hover]" id="wpshop_customize_display_option_second_hover_text" class="wps-color-picker-field" value="<?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['text_hover']) ) ? $wpshop_customize_display_option['second']['text_hover'] : ''; ?>" /></div> |
|
57 | - <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['text_hover']) ) ? $wpshop_customize_display_option['second']['text_hover'] : ''; ?>" /></span> |
|
56 | + <input type="text" name="wpshop_customize_display_option[second][text_hover]" id="wpshop_customize_display_option_second_hover_text" class="wps-color-picker-field" value="<?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['text_hover'])) ? $wpshop_customize_display_option['second']['text_hover'] : ''; ?>" /></div> |
|
57 | + <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['second']) && !empty($wpshop_customize_display_option['second']['text_hover'])) ? $wpshop_customize_display_option['second']['text_hover'] : ''; ?>" /></span> |
|
58 | 58 | </div> |
59 | 59 | </div> |
60 | 60 |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -1,22 +1,22 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="wps-gridwrapper3-padded"> |
4 | 4 | <div> |
5 | 5 | <div class="wps-form-group"> |
6 | - <label><?php _e( 'Selected part element background', 'wpshop'); ?> :</label> |
|
6 | + <label><?php _e('Selected part element background', 'wpshop'); ?> :</label> |
|
7 | 7 | <div class="wps-form"> |
8 | - <input type="text" name="wpshop_customize_display_option[account][activ_element_background]" class="wps-color-picker-field" value="<?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['account']) && !empty($wpshop_customize_display_option['account']['activ_element_background']) ) ? $wpshop_customize_display_option['account']['activ_element_background'] : ''; ?>" /> |
|
9 | - <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['account']) && !empty($wpshop_customize_display_option['account']['activ_element_background']) ) ? $wpshop_customize_display_option['account']['activ_element_background'] : ''; ?>"></span> |
|
8 | + <input type="text" name="wpshop_customize_display_option[account][activ_element_background]" class="wps-color-picker-field" value="<?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['account']) && !empty($wpshop_customize_display_option['account']['activ_element_background'])) ? $wpshop_customize_display_option['account']['activ_element_background'] : ''; ?>" /> |
|
9 | + <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['account']) && !empty($wpshop_customize_display_option['account']['activ_element_background'])) ? $wpshop_customize_display_option['account']['activ_element_background'] : ''; ?>"></span> |
|
10 | 10 | </div> |
11 | 11 | </div> |
12 | 12 | </div> |
13 | 13 | |
14 | 14 | <div> |
15 | 15 | <div class="wps-form-group"> |
16 | - <label><?php _e( 'Information box background color', 'wpshop'); ?> :</label> |
|
16 | + <label><?php _e('Information box background color', 'wpshop'); ?> :</label> |
|
17 | 17 | <div class="wps-form"> |
18 | - <input type="text" name="wpshop_customize_display_option[account][information_box_background]" class="wps-color-picker-field" value="<?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['account']) && !empty($wpshop_customize_display_option['account']['information_box_background']) ) ? $wpshop_customize_display_option['account']['information_box_background'] : ''; ?>" /> |
|
19 | - <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['account']) && !empty($wpshop_customize_display_option['account']['information_box_background']) ) ? $wpshop_customize_display_option['account']['information_box_background'] : ''; ?>"></span> |
|
18 | + <input type="text" name="wpshop_customize_display_option[account][information_box_background]" class="wps-color-picker-field" value="<?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['account']) && !empty($wpshop_customize_display_option['account']['information_box_background'])) ? $wpshop_customize_display_option['account']['information_box_background'] : ''; ?>" /> |
|
19 | + <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['account']) && !empty($wpshop_customize_display_option['account']['information_box_background'])) ? $wpshop_customize_display_option['account']['information_box_background'] : ''; ?>"></span> |
|
20 | 20 | |
21 | 21 | </div> |
22 | 22 | </div> |
@@ -24,10 +24,10 @@ discard block |
||
24 | 24 | |
25 | 25 | <div> |
26 | 26 | <div class="wps-form-group"> |
27 | - <label><?php _e( 'Unselected part element background', 'wpshop'); ?> :</label> |
|
27 | + <label><?php _e('Unselected part element background', 'wpshop'); ?> :</label> |
|
28 | 28 | <div class="wps-form"> |
29 | - <input type="text" name="wpshop_customize_display_option[account][part_background]" class="wps-color-picker-field" value="<?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['account']) && !empty($wpshop_customize_display_option['account']['part_background']) ) ? $wpshop_customize_display_option['account']['part_background'] : ''; ?>"/> |
|
30 | - <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo ( !empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['account']) && !empty($wpshop_customize_display_option['account']['part_background']) ) ? $wpshop_customize_display_option['account']['part_background'] : ''; ?>"></span> |
|
29 | + <input type="text" name="wpshop_customize_display_option[account][part_background]" class="wps-color-picker-field" value="<?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['account']) && !empty($wpshop_customize_display_option['account']['part_background'])) ? $wpshop_customize_display_option['account']['part_background'] : ''; ?>"/> |
|
30 | + <span style="display : inline-block; width : 20px; height : 20px; background : <?php echo (!empty($wpshop_customize_display_option) && !empty($wpshop_customize_display_option['account']) && !empty($wpshop_customize_display_option['account']['part_background'])) ? $wpshop_customize_display_option['account']['part_background'] : ''; ?>"></span> |
|
31 | 31 | |
32 | 32 | </div> |
33 | 33 | </div> |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | |
3 | 3 | /** |
4 | 4 | * Bootstrap file |
@@ -7,10 +7,10 @@ discard block |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | DEFINE('WPS_COUPON_DIR', basename(dirname(__FILE__))); |
10 | -DEFINE('WPS_COUPON_PATH', str_replace( "\\", "/", str_replace( WPS_COUPON_DIR, "", dirname( __FILE__ ) ) ) ); |
|
11 | -DEFINE('WPS_COUPON_URL', str_replace( str_replace( "\\", "/", ABSPATH), site_url() . '/', WPS_COUPON_PATH ) ); |
|
10 | +DEFINE('WPS_COUPON_PATH', str_replace("\\", "/", str_replace(WPS_COUPON_DIR, "", dirname(__FILE__)))); |
|
11 | +DEFINE('WPS_COUPON_URL', str_replace(str_replace("\\", "/", ABSPATH), site_url() . '/', WPS_COUPON_PATH)); |
|
12 | 12 | |
13 | 13 | |
14 | -include( plugin_dir_path( __FILE__ ).'/controller/wps_coupon_ctr.php' ); |
|
15 | -include( plugin_dir_path( __FILE__ ).'/model/wps_coupon_model.php' ); |
|
14 | +include(plugin_dir_path(__FILE__) . '/controller/wps_coupon_ctr.php'); |
|
15 | +include(plugin_dir_path(__FILE__) . '/model/wps_coupon_model.php'); |
|
16 | 16 | $wps_coupon = new wps_coupon_ctr(); |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |