Completed
Pull Request — master (#2)
by Jimmy
1003:35 queued 970:52
created
wps_classic_checkout/templates/frontend/confirmation/confirmation-free.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 /**
3 3
 * Plugin database options
4 4
 *
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
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
  *
Please login to merge, or discard this patch.
wps_classic_checkout/templates/frontend/confirmation/confirmation-cic.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 /**
3 3
 * Plugin database options
4 4
 *
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
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
  *
Please login to merge, or discard this patch.
templates/frontend/confirmation/confirmation-others.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 /**
3 3
 * Plugin database options
4 4
 *
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
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
  *
Please login to merge, or discard this patch.
wps_classic_checkout/templates/frontend/classic-checkout-step-two.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 /**
3 3
 * Plugin database options
4 4
 *
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
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
  *
Please login to merge, or discard this patch.
wps_shipping/templates/backend/shipping-mode-configuration-interface.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
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
  *
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,35 +1,35 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3
-<div class="wps-alert-info"><span class="dashicons dashicons-lightbulb"></span><?php printf( __( 'Need help to configure your shipping rules ? <a href="%s" target="_blank">Opt for assistance</a>', 'wpshop'), 'http://shop.eoxia.com/ecommerce/wpshop_product/assistance-wordpress/' ); ?></div>
3
+<div class="wps-alert-info"><span class="dashicons dashicons-lightbulb"></span><?php printf(__('Need help to configure your shipping rules ? <a href="%s" target="_blank">Opt for assistance</a>', 'wpshop'), 'http://shop.eoxia.com/ecommerce/wpshop_product/assistance-wordpress/'); ?></div>
4 4
 
5 5
 <div class="wps-boxed">
6 6
 	<span class="wps-h2"><?php _e('General configurations', 'wpshop')?></span>
7 7
 	<div>
8 8
 		<?php
9
-			$wps_shipping_mode_config_extra_params = apply_filters('wps_shipping_mode_config_extra_params_'.$k, $k );
9
+			$wps_shipping_mode_config_extra_params = apply_filters('wps_shipping_mode_config_extra_params_' . $k, $k);
10 10
 			echo ($wps_shipping_mode_config_extra_params != $k) ? $wps_shipping_mode_config_extra_params : '';
11 11
 		?>
12 12
 	</div>
13 13
 	<div class="wps-form-group">
14 14
 		<label for="wps_shipping_mode_<?php echo $k; ?>_explanation"><?php _e('Explanation', 'wpshop'); ?> :</label>
15
-		<div class="wps-form"><textarea id="wps_shipping_mode_<?php echo $k; ?>_explanation" name="wps_shipping_mode[modes][<?php echo $k; ?>][explanation]"><?php echo ( !empty($shipping_mode['explanation']) ) ? $shipping_mode['explanation'] : ''; ?></textarea></div>
15
+		<div class="wps-form"><textarea id="wps_shipping_mode_<?php echo $k; ?>_explanation" name="wps_shipping_mode[modes][<?php echo $k; ?>][explanation]"><?php echo (!empty($shipping_mode['explanation'])) ? $shipping_mode['explanation'] : ''; ?></textarea></div>
16 16
 	</div>
17 17
 
18 18
 	<span class="wps-h5"><?php _e('Free shipping cost configuration', 'wpshop')?></span>
19 19
 	<div class="wps-row wps-gridwrapper2-padded">
20 20
 		<!-- Free shipping for all orders -->
21 21
 		<div class="wps-form-group">
22
-			<div class="wps-form"><input type="checkbox" name="wps_shipping_mode[modes][<?php echo $k; ?>][free_shipping]" id="<?php echo $k; ?>_free_shipping" <?php echo ( !empty($shipping_mode['free_shipping']) ) ? 'checked="checked"' : ''; ?> /> <label for="<?php echo $k; ?>_free_shipping"><?php _e('Activate free shipping for all orders', 'wpshop'); ?></label></div>
22
+			<div class="wps-form"><input type="checkbox" name="wps_shipping_mode[modes][<?php echo $k; ?>][free_shipping]" id="<?php echo $k; ?>_free_shipping" <?php echo (!empty($shipping_mode['free_shipping'])) ? 'checked="checked"' : ''; ?> /> <label for="<?php echo $k; ?>_free_shipping"><?php _e('Activate free shipping for all orders', 'wpshop'); ?></label></div>
23 23
 		</div>
24 24
 
25 25
 		<!-- Free shipping for orders which amount is over an amount -->
26 26
 		<div>
27 27
 			<div class="wps-form-group">
28
-				<div class="wps-form"><input type="checkbox" name="wps_shipping_mode[modes][<?php echo $k; ?>][activate_free_shipping_from]" id="<?php echo $k; ?>_free_shipping" class="activate_free_shipping_cost_from" <?php echo ( !empty($shipping_mode['activate_free_shipping_from']) ) ? 'checked="checked"' : ''; ?> /><label for="<?php echo $k; ?>_free_from"><?php _e('Activate free shipping for order over amount below', 'wpshop'); ?></label></div>
28
+				<div class="wps-form"><input type="checkbox" name="wps_shipping_mode[modes][<?php echo $k; ?>][activate_free_shipping_from]" id="<?php echo $k; ?>_free_shipping" class="activate_free_shipping_cost_from" <?php echo (!empty($shipping_mode['activate_free_shipping_from'])) ? 'checked="checked"' : ''; ?> /><label for="<?php echo $k; ?>_free_from"><?php _e('Activate free shipping for order over amount below', 'wpshop'); ?></label></div>
29 29
 			</div>
30 30
 			<div class="wps-form-group" id="<?php echo $k; ?>_activate_free_shipping">
31 31
 				<label><?php _e('Free shipping cost for order over amount below', 'wpshop'); ?> ( <?php echo wpshop_tools::wpshop_get_currency(); ?> ) :</label>
32
-				<div class="wps-form"><input type="text" name="wps_shipping_mode[modes][<?php echo $k; ?>][free_from]" id="<?php echo $k; ?>_free_from" value="<?php echo ( !empty($shipping_mode['free_from']) ) ? $shipping_mode['free_from'] : ''; ?>" class="wps_little_input" /></div>
32
+				<div class="wps-form"><input type="text" name="wps_shipping_mode[modes][<?php echo $k; ?>][free_from]" id="<?php echo $k; ?>_free_from" value="<?php echo (!empty($shipping_mode['free_from'])) ? $shipping_mode['free_from'] : ''; ?>" class="wps_little_input" /></div>
33 33
 			</div>
34 34
 		</div>
35 35
 	</div>
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	<span class="wps-h5"><?php _e('Minimum and maximum limit shipping cost configuration', 'wpshop')?></span>
39 39
 	<div class="wps-row">
40 40
 		<div class="wps-form-group">
41
-			<div class="wps-form"><input type="checkbox" class="wps_shipping_mode_configuation_min_max" name="wps_shipping_mode[modes][<?php echo $k; ?>][min_max][activate]" id="<?php echo $k; ?>_min_max_activate" <?php echo (!empty($shipping_mode['min_max']) && !empty($shipping_mode['min_max']['activate']) ) ? 'checked="checked"' : ''; ?> /> <label for="<?php echo $k; ?>_min_max_activate"><?php _e('Activate the min. and max. shipping cost', 'wpshop'); ?></label></div>
41
+			<div class="wps-form"><input type="checkbox" class="wps_shipping_mode_configuation_min_max" name="wps_shipping_mode[modes][<?php echo $k; ?>][min_max][activate]" id="<?php echo $k; ?>_min_max_activate" <?php echo (!empty($shipping_mode['min_max']) && !empty($shipping_mode['min_max']['activate'])) ? 'checked="checked"' : ''; ?> /> <label for="<?php echo $k; ?>_min_max_activate"><?php _e('Activate the min. and max. shipping cost', 'wpshop'); ?></label></div>
42 42
 		</div>
43 43
 	</div>
44 44
 
@@ -46,12 +46,12 @@  discard block
 block discarded – undo
46 46
 		<div class="wps-row wps-gridwrapper2-padded" id="<?php echo $k; ?>_min_max_shipping_rules_configuration">
47 47
 			<div class="wps-form-group">
48 48
 				<label><?php _e('Minimum', 'wpshop'); ?> ( <?php echo wpshop_tools::wpshop_get_currency(); ?> ) :</label>
49
-				<div class="wps-form"><input type="text" name="wps_shipping_mode[modes][<?php echo $k; ?>][min_max][min]" value="<?php echo (!empty($shipping_mode['min_max']) && !empty($shipping_mode['min_max']['min']) ) ? $shipping_mode['min_max']['min'] : ''; ?>" /></div>
49
+				<div class="wps-form"><input type="text" name="wps_shipping_mode[modes][<?php echo $k; ?>][min_max][min]" value="<?php echo (!empty($shipping_mode['min_max']) && !empty($shipping_mode['min_max']['min'])) ? $shipping_mode['min_max']['min'] : ''; ?>" /></div>
50 50
 			</div>
51 51
 
52 52
 			<div class="wps-form-group">
53 53
 				<label><?php _e('Maximum', 'wpshop'); ?> ( <?php echo wpshop_tools::wpshop_get_currency(); ?> ) :</label>
54
-				<div class="wps-form"><input type="text" name="wps_shipping_mode[modes][<?php echo $k; ?>][min_max][max]"  value="<?php echo (!empty($shipping_mode['min_max']) && !empty($shipping_mode['min_max']['max']) ) ? $shipping_mode['min_max']['max'] : ''; ?>" /></div>
54
+				<div class="wps-form"><input type="text" name="wps_shipping_mode[modes][<?php echo $k; ?>][min_max][max]"  value="<?php echo (!empty($shipping_mode['min_max']) && !empty($shipping_mode['min_max']['max'])) ? $shipping_mode['min_max']['max'] : ''; ?>" /></div>
55 55
 			</div>
56 56
 		</div>
57 57
 	</div>
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
 	<div class="wps-row">
67 67
 		<label><?php _e('Choose all countries where you want to ship orders. Let empty you don\'t want limitations', 'wpshop'); ?></label>
68 68
 		<div class="wps-form">
69
-			<select name="wps_shipping_mode[modes][<?php echo $k; ?>][limit_destination][country][]" class="chosen_select" multiple data-placeholder="<?php __('Choose a Country', 'wpshop' ); ?>" style="width : 100%">
70
-				<?php if( !empty($countries) ) :
71
-				foreach( $countries as $key => $country) :	?>
72
-				<option value="<?php echo $key; ?>"<?php echo ( (!empty($shipping_mode['limit_destination']) && !empty($shipping_mode['limit_destination']['country']) && in_array($key, $shipping_mode['limit_destination']['country']) ) ? 'selected="selected"' : '' ); ?>><?php echo $country; ?></option>
69
+			<select name="wps_shipping_mode[modes][<?php echo $k; ?>][limit_destination][country][]" class="chosen_select" multiple data-placeholder="<?php __('Choose a Country', 'wpshop'); ?>" style="width : 100%">
70
+				<?php if (!empty($countries)) :
71
+				foreach ($countries as $key => $country) :	?>
72
+				<option value="<?php echo $key; ?>"<?php echo ((!empty($shipping_mode['limit_destination']) && !empty($shipping_mode['limit_destination']['country']) && in_array($key, $shipping_mode['limit_destination']['country'])) ? 'selected="selected"' : ''); ?>><?php echo $country; ?></option>
73 73
 			<?php endforeach; endif; ?>
74 74
 			</select>
75 75
 		</div>
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	<div class="wps-row">
80 80
 		<label><?php _e('Write all allowed postcode, separate it by a comma. Let empty if you don\'t want limitations.', 'wpshop'); ?></label>
81 81
 		<div class="wps-form">
82
-			<textarea name="wps_shipping_mode[modes][<?php echo $k; ?>][limit_destination][postcode]"><?php echo ( !empty($shipping_mode['limit_destination']) && !empty($shipping_mode['limit_destination']['postcode']) ) ? $shipping_mode['limit_destination']['postcode'] : ''; ?></textarea>
82
+			<textarea name="wps_shipping_mode[modes][<?php echo $k; ?>][limit_destination][postcode]"><?php echo (!empty($shipping_mode['limit_destination']) && !empty($shipping_mode['limit_destination']['postcode'])) ? $shipping_mode['limit_destination']['postcode'] : ''; ?></textarea>
83 83
 		</div>
84 84
 	</div>
85 85
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	<div class="wps-row">
88 88
 		<label><?php _e('Write all allowed department, separate it by a comma. Let empty if you don\'t want limitations.', 'wpshop'); ?></label>
89 89
 		<div class="wps-form">
90
-			<textarea name="wps_shipping_mode[modes][<?php echo $k; ?>][limit_destination][department]"><?php echo ( !empty($shipping_mode['limit_destination']) && !empty($shipping_mode['limit_destination']['department']) ) ? $shipping_mode['limit_destination']['department'] : ''; ?></textarea>
90
+			<textarea name="wps_shipping_mode[modes][<?php echo $k; ?>][limit_destination][department]"><?php echo (!empty($shipping_mode['limit_destination']) && !empty($shipping_mode['limit_destination']['department'])) ? $shipping_mode['limit_destination']['department'] : ''; ?></textarea>
91 91
 		</div>
92 92
 	</div>
93 93
 
@@ -99,15 +99,15 @@  discard block
 block discarded – undo
99 99
 
100 100
 	<div class="wps-row wps-gridwrapper3-padded">
101 101
 		<div class="wps-form-group">
102
-			<div class="wps-form"><input type="checkbox" name="wps_shipping_mode[modes][<?php echo $k; ?>][custom_shipping_rules][active]" id="<?php echo $k; ?>_custom_shipping_active" <?php echo ( !empty($shipping_mode['custom_shipping_rules']) && !empty($shipping_mode['custom_shipping_rules']['active']) )  ? 'checked="checked"' : ''; ?> /> <label for="<?php echo $k; ?>_custom_shipping_active"><?php _e('Activate custom shipping fees','wpshop'); ?></label></div>
102
+			<div class="wps-form"><input type="checkbox" name="wps_shipping_mode[modes][<?php echo $k; ?>][custom_shipping_rules][active]" id="<?php echo $k; ?>_custom_shipping_active" <?php echo (!empty($shipping_mode['custom_shipping_rules']) && !empty($shipping_mode['custom_shipping_rules']['active'])) ? 'checked="checked"' : ''; ?> /> <label for="<?php echo $k; ?>_custom_shipping_active"><?php _e('Activate custom shipping fees', 'wpshop'); ?></label></div>
103 103
 		</div>
104 104
 
105 105
 		<div class="wps-form-group">
106
-			<div class="wps-form"><input type="checkbox" class="active_postcode_custom_shipping" id="<?php echo $k; ?>_custom_shipping_active_cp" name="wps_shipping_mode[modes][<?php echo $k; ?>][custom_shipping_rules][active_cp]" <?php echo ( !empty($shipping_mode['custom_shipping_rules']) && !empty($shipping_mode['custom_shipping_rules']['active_cp']) )  ? 'checked="checked"' : ''; ?> /> <label for="<?php echo $k; ?>_custom_shipping_active_cp"> <?php _e('Activate custom shipping fees by postcode', 'wpshop'); ?></label></div>
106
+			<div class="wps-form"><input type="checkbox" class="active_postcode_custom_shipping" id="<?php echo $k; ?>_custom_shipping_active_cp" name="wps_shipping_mode[modes][<?php echo $k; ?>][custom_shipping_rules][active_cp]" <?php echo (!empty($shipping_mode['custom_shipping_rules']) && !empty($shipping_mode['custom_shipping_rules']['active_cp'])) ? 'checked="checked"' : ''; ?> /> <label for="<?php echo $k; ?>_custom_shipping_active_cp"> <?php _e('Activate custom shipping fees by postcode', 'wpshop'); ?></label></div>
107 107
 		</div>
108 108
 
109 109
 		<div class="wps-form-group">
110
-			<div class="wps-form"><input type="checkbox" class="active_department_custom_shipping" id="<?php echo $k; ?>_custom_shipping_active_department" name="wps_shipping_mode[modes][<?php echo $k; ?>][custom_shipping_rules][active_department]" <?php echo ( !empty($shipping_mode['custom_shipping_rules']) && !empty($shipping_mode['custom_shipping_rules']['active_department']) )  ? 'checked="checked"' : ''; ?> /> <label for="<?php echo $k; ?>_custom_shipping_active_department"> <?php _e('Activate custom shipping fees by department', 'wpshop'); ?></label></div>
110
+			<div class="wps-form"><input type="checkbox" class="active_department_custom_shipping" id="<?php echo $k; ?>_custom_shipping_active_department" name="wps_shipping_mode[modes][<?php echo $k; ?>][custom_shipping_rules][active_department]" <?php echo (!empty($shipping_mode['custom_shipping_rules']) && !empty($shipping_mode['custom_shipping_rules']['active_department'])) ? 'checked="checked"' : ''; ?> /> <label for="<?php echo $k; ?>_custom_shipping_active_department"> <?php _e('Activate custom shipping fees by department', 'wpshop'); ?></label></div>
111 111
 		</div>
112 112
 	</div>
113 113
 
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
 			<label for="<?php echo $k; ?>_country_list"><?php _e('Choose a country', 'wpshop'); ?> : </label>
119 119
 			<div class="wps-form">
120 120
 				<select id="<?php echo $k; ?>_country_list" name="country_list" class="shipping_mode_config_input">
121
-					<?php if( !empty($countries) ) :
122
-						foreach( $countries as $key => $country) :	?>
121
+					<?php if (!empty($countries)) :
122
+						foreach ($countries as $key => $country) :	?>
123 123
 						<option value="<?php echo $key; ?>"><?php echo $country; ?></option>
124 124
 					<?php endforeach; endif; ?>
125 125
 				</select>
@@ -155,17 +155,17 @@  discard block
 block discarded – undo
155 155
 	</div>
156 156
 
157 157
 	<div class="wps-row">
158
-		<input type="checkbox" id="<?php echo $k; ?>_main_rule" name="main_rule" value="OTHERS"/> <label for="<?php echo $k; ?>_main_rule" class="global_rule_checkbox_indic"><?php _e('Apply a common rule to all others countries','wpshop'); ?></label>
158
+		<input type="checkbox" id="<?php echo $k; ?>_main_rule" name="main_rule" value="OTHERS"/> <label for="<?php echo $k; ?>_main_rule" class="global_rule_checkbox_indic"><?php _e('Apply a common rule to all others countries', 'wpshop'); ?></label>
159 159
 	</div>
160 160
 
161 161
 	<div class="wps-form-group">
162 162
 		<br/>
163
-		<center><a id="<?php echo $k; ?>_save_rule" role="button" data-nonce="<?php echo wp_create_nonce( 'wpshop_ajax_save_shipping_rule' ); ?>" class="save_rules_button wps-bton-third-mini-rounded"><?php _e('Add the rule', 'wpshop'); ?></a></center>
163
+		<center><a id="<?php echo $k; ?>_save_rule" role="button" data-nonce="<?php echo wp_create_nonce('wpshop_ajax_save_shipping_rule'); ?>" class="save_rules_button wps-bton-third-mini-rounded"><?php _e('Add the rule', 'wpshop'); ?></a></center>
164 164
 		<br/>
165 165
 	</div>
166 166
 
167
-	<div class="wps-row wps-table wps-bloc-loader" id="<?php echo $k; ?>_shipping_rules_container" data-nonce="<?php echo wp_create_nonce( 'wpshop_ajax_display_shipping_rules' ); ?>">
168
-		<?php echo $this->generate_shipping_rules_table( $fees_data, $k ); ?>
167
+	<div class="wps-row wps-table wps-bloc-loader" id="<?php echo $k; ?>_shipping_rules_container" data-nonce="<?php echo wp_create_nonce('wpshop_ajax_display_shipping_rules'); ?>">
168
+		<?php echo $this->generate_shipping_rules_table($fees_data, $k); ?>
169 169
 	</div>
170 170
 </div>
171 171
 <center><a role="button" class="wps-bton-first-rounded wps_save_payment_mode_configuration"><?php _e('Save', 'wpshop'); ?></a><br/><br/><br/></center>
Please login to merge, or discard this patch.
includes/modules/wps-modal/templates/frontend/modal.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 /**
3 3
 * Plugin database options
4 4
 *
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
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
  *
Please login to merge, or discard this patch.
includes/modules/wps_customer/controller/wps_account_dashboard_ctr.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
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
  *
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -1,38 +1,38 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 class wps_account_dashboard_ctr {
3 3
 	function __construct() {
4
-		add_shortcode( 'wps_account_dashboard', array( $this, 'display_account_dashboard') );
4
+		add_shortcode('wps_account_dashboard', array($this, 'display_account_dashboard'));
5 5
 // 		add_shortcode( 'wps_messages', array( 'wpshop_messages', 'get_histo_messages_per_customer' ) );
6
-		add_shortcode( 'wps_account_last_actions_resume', array($this, 'display_account_last_actions' ) );
6
+		add_shortcode('wps_account_last_actions_resume', array($this, 'display_account_last_actions'));
7 7
 	}
8 8
 
9
-	function import_data( $part ) {
9
+	function import_data($part) {
10 10
 		$output = '';
11 11
 
12
-		switch( $part ) {
12
+		switch ($part) {
13 13
 			case 'account' :
14
-				$output  = '<div id="wps_account_informations_container" data-nonce="' . wp_create_nonce( 'wps_account_reload_informations' ) . '">';
14
+				$output  = '<div id="wps_account_informations_container" data-nonce="' . wp_create_nonce('wps_account_reload_informations') . '">';
15 15
 				$output .= do_shortcode('[wps_account_informations]');
16 16
 				$output .= '</div>';
17
-				$output .= do_shortcode( '[wps_orders_in_customer_account]');
17
+				$output .= do_shortcode('[wps_orders_in_customer_account]');
18 18
 			break;
19 19
 			case 'address' :
20
-				$output .= do_shortcode( '[wps_addresses]' );
20
+				$output .= do_shortcode('[wps_addresses]');
21 21
 			break;
22 22
 			case 'order' :
23
-				$output = do_shortcode( '[wps_orders_in_customer_account]' );
23
+				$output = do_shortcode('[wps_orders_in_customer_account]');
24 24
 			break;
25 25
 			case  'opinion' :
26
-				$output = do_shortcode( '[wps_opinion]' );
26
+				$output = do_shortcode('[wps_opinion]');
27 27
 			break;
28 28
 			case 'wishlist' :
29
-				$output = '<div class="wps-alert-info">' .__( 'This functionnality will be available soon', 'wpshop'). '</div>';
29
+				$output = '<div class="wps-alert-info">' . __('This functionnality will be available soon', 'wpshop') . '</div>';
30 30
 			break;
31 31
 			case 'coupon' :
32
-				$output = do_shortcode( '[wps_coupon]' );
32
+				$output = do_shortcode('[wps_coupon]');
33 33
 			break;
34 34
 			case 'messages' :
35
-				$output = do_shortcode( '[wps_message_histo]' );
35
+				$output = do_shortcode('[wps_message_histo]');
36 36
 			break;
37 37
 			default :
38 38
 				$output = do_shortcode('[wps_account_informations]');
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
 
41 41
 		}
42 42
 
43
-		$output = apply_filters( 'wps_my_account_extra_panel_content', $output, $part );
43
+		$output = apply_filters('wps_my_account_extra_panel_content', $output, $part);
44 44
 
45
-		if( get_current_user_id() == 0 ) {
46
-			$output = do_shortcode( '[wpshop_login]' );
45
+		if (get_current_user_id() == 0) {
46
+			$output = do_shortcode('[wpshop_login]');
47 47
 		}
48 48
 		return $output;
49 49
 	}
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
 	 * Display Account Dashboard
53 53
 	 */
54 54
 	function display_account_dashboard() {
55
-		$part = ( !empty($_GET['account_dashboard_part']) ) ? sanitize_title( $_GET['account_dashboard_part'] ) : 'account';
56
-		$content = $this->import_data( $part );
55
+		$part = (!empty($_GET['account_dashboard_part'])) ? sanitize_title($_GET['account_dashboard_part']) : 'account';
56
+		$content = $this->import_data($part);
57 57
 		ob_start();
58
-		require_once( wpshop_tools::get_template_part( WPS_ACCOUNT_DIR, WPS_ACCOUNT_PATH . WPS_ACCOUNT_DIR . "/templates/", "frontend", "account/account-dashboard") );
58
+		require_once(wpshop_tools::get_template_part(WPS_ACCOUNT_DIR, WPS_ACCOUNT_PATH . WPS_ACCOUNT_DIR . "/templates/", "frontend", "account/account-dashboard"));
59 59
 		$output = ob_get_contents();
60 60
 		ob_end_clean();
61 61
 		echo $output;
@@ -66,26 +66,26 @@  discard block
 block discarded – undo
66 66
 		global $wpdb;
67 67
 		$output = '';
68 68
 		$user_id = get_current_user_id();
69
-		if( !empty($user_id) ) {
70
-			$query = $wpdb->prepare( 'SELECT * FROM ' .$wpdb->posts. ' WHERE post_type = %s AND post_author = %d', WPSHOP_NEWTYPE_IDENTIFIER_ORDER, $user_id );
71
-			$orders = $wpdb->get_results( $query );
72
-			if( !empty($orders) ) {
69
+		if (!empty($user_id)) {
70
+			$query = $wpdb->prepare('SELECT * FROM ' . $wpdb->posts . ' WHERE post_type = %s AND post_author = %d', WPSHOP_NEWTYPE_IDENTIFIER_ORDER, $user_id);
71
+			$orders = $wpdb->get_results($query);
72
+			if (!empty($orders)) {
73 73
 				$orders_list = '';
74
-				foreach( $orders as $order ) {
75
-					$order_meta = get_post_meta( $order->ID, '_order_postmeta', true );
76
-					$order_number = ( !empty($order_meta) && !empty($order_meta['order_key']) ) ? $order_meta['order_key'] : '';
77
-					$order_date = ( !empty($order_meta) && !empty($order_meta['order_date']) ) ? mysql2date( get_option('date_format'), $order_meta['order_date'], true ) : '';
78
-					$order_amount = ( !empty($order_meta) && !empty($order_meta['order_key']) ) ? wpshop_tools::formate_number( $order_meta['order_grand_total'] ).' '.wpshop_tools::wpshop_get_currency( false ) : '';
79
-					$order_available_status = unserialize( WPSHOP_ORDER_STATUS );
80
-					$order_status = ( !empty($order_meta) && !empty($order_meta['order_status']) ) ? __( $order_available_status[ $order_meta['order_status'] ], 'wpshop' ) : '';
74
+				foreach ($orders as $order) {
75
+					$order_meta = get_post_meta($order->ID, '_order_postmeta', true);
76
+					$order_number = (!empty($order_meta) && !empty($order_meta['order_key'])) ? $order_meta['order_key'] : '';
77
+					$order_date = (!empty($order_meta) && !empty($order_meta['order_date'])) ? mysql2date(get_option('date_format'), $order_meta['order_date'], true) : '';
78
+					$order_amount = (!empty($order_meta) && !empty($order_meta['order_key'])) ? wpshop_tools::formate_number($order_meta['order_grand_total']) . ' ' . wpshop_tools::wpshop_get_currency(false) : '';
79
+					$order_available_status = unserialize(WPSHOP_ORDER_STATUS);
80
+					$order_status = (!empty($order_meta) && !empty($order_meta['order_status'])) ? __($order_available_status[$order_meta['order_status']], 'wpshop') : '';
81 81
 					ob_start();
82
-					require( wpshop_tools::get_template_part( WPS_ACCOUNT_DIR, WPS_ACCOUNT_PATH . WPS_ACCOUNT_DIR . "/templates/", "frontend", "account/account-dashboard-resume-element") );
82
+					require(wpshop_tools::get_template_part(WPS_ACCOUNT_DIR, WPS_ACCOUNT_PATH . WPS_ACCOUNT_DIR . "/templates/", "frontend", "account/account-dashboard-resume-element"));
83 83
 					$orders_list .= ob_get_contents();
84 84
 					ob_end_clean();
85 85
 				}
86 86
 
87 87
 				ob_start();
88
-				require_once( wpshop_tools::get_template_part( WPS_ACCOUNT_DIR, WPS_ACCOUNT_PATH . WPS_ACCOUNT_DIR . "/templates/","frontend", "account/account-dashboard-resume") );
88
+				require_once(wpshop_tools::get_template_part(WPS_ACCOUNT_DIR, WPS_ACCOUNT_PATH . WPS_ACCOUNT_DIR . "/templates/", "frontend", "account/account-dashboard-resume"));
89 89
 				$output = ob_get_contents();
90 90
 				ob_end_clean();
91 91
 			}
Please login to merge, or discard this patch.
modules/wps_customer/templates/frontend/forgot-password/forgot-password.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
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
  *
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 <div class="wps-boxed">
4 4
 	<div id="wps_renew_password_error_container"></div>
5 5
 	<form action="<?php echo admin_url('admin-ajax.php'); ?>" method="post" id="wps_forgot_password_form" >
6 6
 		<input type="hidden" name="action" value="wps_forgot_password_request" />
7
-		<?php wp_nonce_field( 'wps_forgot_password_request' ); ?>
7
+		<?php wp_nonce_field('wps_forgot_password_request'); ?>
8 8
 		<div class="wps-form-group">
9
-			<label for="wps_login_email_address"><?php _e('Email address', 'wpshop');?></label>
10
-			<div id="wps_login_email_address" class="wps-form"><input type="text" name="wps_user_login" id="wps_new_password_request" placeholder="<?php _e('Your email address', 'wpshop');?>" /></div>
9
+			<label for="wps_login_email_address"><?php _e('Email address', 'wpshop'); ?></label>
10
+			<div id="wps_login_email_address" class="wps-form"><input type="text" name="wps_user_login" id="wps_new_password_request" placeholder="<?php _e('Your email address', 'wpshop'); ?>" /></div>
11 11
 		</div>
12 12
 		<div class="wps-form-group">
13 13
 			<?php do_action('lostpassword_form'); ?>
Please login to merge, or discard this patch.
modules/wps_customer/templates/frontend/forgot-password/password-renew.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
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
  *
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 <div id="wps_renew_password_error_container_true"></div>
4 4
 <div class="wps-boxed" id="wps_password_renew">
@@ -8,15 +8,15 @@  discard block
 block discarded – undo
8 8
 		<input type="hidden" name="activation_key" value="<?php echo sanitize_text_field($_GET['key']); ?>" />
9 9
 		<input type="hidden" name="user_login" value="<?php echo sanitize_text_field($_GET['login']); ?>" />
10 10
 		<input type="hidden" name="action" value="wps_forgot_password_renew" />
11
-		<?php echo wp_nonce_field( 'wps_forgot_password_renew' ); ?>
11
+		<?php echo wp_nonce_field('wps_forgot_password_renew'); ?>
12 12
 
13 13
 		<div class="wps-form-group">
14
-			<label for="wps_login_email_address"><?php _e('New password', 'wpshop');?></label>
15
-			<div id="wps_login_email_address" class="wps-form"><input type="password" name="pass1" id="wps_new_password_request" placeholder="<?php _e('New password', 'wpshop');?>" /></div>
14
+			<label for="wps_login_email_address"><?php _e('New password', 'wpshop'); ?></label>
15
+			<div id="wps_login_email_address" class="wps-form"><input type="password" name="pass1" id="wps_new_password_request" placeholder="<?php _e('New password', 'wpshop'); ?>" /></div>
16 16
 		</div>
17 17
 		<div class="wps-form-group">
18
-			<label for="wps_login_email_address"><?php _e('Confirm new password', 'wpshop');?></label>
19
-			<div id="wps_login_email_address" class="wps-form"><input type="password" name="pass2" id="wps_new_password_request" placeholder="<?php _e('Confirm new password', 'wpshop');?>" /></div>
18
+			<label for="wps_login_email_address"><?php _e('Confirm new password', 'wpshop'); ?></label>
19
+			<div id="wps_login_email_address" class="wps-form"><input type="password" name="pass2" id="wps_new_password_request" placeholder="<?php _e('Confirm new password', 'wpshop'); ?>" /></div>
20 20
 		</div>
21 21
 		<div class="wps-form-group">
22 22
 
Please login to merge, or discard this patch.