Completed
Push — master ( 409d21...32c778 )
by
unknown
12:55
created
modules/wps_customer/controller/customer_custom_list_table.class.php 3 patches
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
 	var $datas;
16 16
 
17 17
 	/**
18
-	* Constructor, we override the parent to pass our own arguments
19
-	* We usually focus on three parameters: singular and plural labels, as well as whether the class supports AJAX.
20
-	*/
18
+	 * Constructor, we override the parent to pass our own arguments
19
+	 * We usually focus on three parameters: singular and plural labels, as well as whether the class supports AJAX.
20
+	 */
21 21
 	function __construct(){
22 22
 			parent::__construct( array(
23 23
 			'singular'=> 'wp_list_customer', //Singular label
@@ -27,13 +27,13 @@  discard block
 block discarded – undo
27 27
 	}
28 28
 
29 29
 	/**
30
-	*	Define the output for each column if specific column output has not been defined
31
-	*
32
-	*	@param object|array $item The item to output column content for
33
-	*	@param string $column_name The column that we are trying to output
34
-	*
35
-	*	@return mixed The column output if found, or defaut is an complete output of the item
36
-	*/
30
+	 *	Define the output for each column if specific column output has not been defined
31
+	 *
32
+	 *	@param object|array $item The item to output column content for
33
+	 *	@param string $column_name The column that we are trying to output
34
+	 *
35
+	 *	@return mixed The column output if found, or defaut is an complete output of the item
36
+	 */
37 37
 	function column_default($item, $column_name){
38 38
 		switch($column_name){
39 39
 			case 'customer_id':{
@@ -52,12 +52,12 @@  discard block
 block discarded – undo
52 52
 	}
53 53
 
54 54
 	/**
55
-	*	Define specific outptu for a given column
56
-	*
57
-	*	@param object|array $item The item we want to get the specific output for the current column
58
-	*
59
-	*	@return string The output build specificly for the given column
60
-	*/
55
+	 *	Define specific outptu for a given column
56
+	 *
57
+	 *	@param object|array $item The item we want to get the specific output for the current column
58
+	 *
59
+	 *	@return string The output build specificly for the given column
60
+	 */
61 61
 	function column_cb($item){
62 62
 		return sprintf(
63 63
 				'<input type="radio" name="%1$s" value="%2$s" class="wpshop_customer_order_cb_dialog" id="wpshop_customer_order_cb_dialog_%2$s" name="customer_order" />',
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
 	}
68 68
 
69 69
 	/**
70
-	* Define the columns that are going to be used in the table
71
-	* @return array $columns, the array of columns to use with the table
72
-	*/
70
+	 * Define the columns that are going to be used in the table
71
+	 * @return array $columns, the array of columns to use with the table
72
+	 */
73 73
 	function get_columns() {
74 74
 		return $columns= array(
75 75
 			'cb'=>'',
@@ -80,23 +80,23 @@  discard block
 block discarded – undo
80 80
 	}
81 81
 
82 82
 	/**
83
-	* Define the columns that are going to be used for sorting the table
84
-	* @return array $columns, the array of sortable columns in the table
85
-	*/
83
+	 * Define the columns that are going to be used for sorting the table
84
+	 * @return array $columns, the array of sortable columns in the table
85
+	 */
86 86
 	function get_sortable_columns() {
87 87
 		$sortable_columns = array();
88 88
 		return $sortable_columns;
89 89
 	}
90 90
 
91 91
 	/**
92
-	*	Build The table output for future display
93
-	*
94
-	*	@param array|object $data, The list of item to display in the table
95
-	*	@param int $per_page, The number of items per page in the table
96
-	*	@param int $current_page, The current page number allowing to know wich item to display
97
-	*
98
-	*	@return void
99
-	*/
92
+	 *	Build The table output for future display
93
+	 *
94
+	 *	@param array|object $data, The list of item to display in the table
95
+	 *	@param int $per_page, The number of items per page in the table
96
+	 *	@param int $current_page, The current page number allowing to know wich item to display
97
+	 *
98
+	 *	@return void
99
+	 */
100 100
 	function prepare_items($data, $per_page, $current_page){
101 101
 
102 102
 
@@ -105,12 +105,12 @@  discard block
 block discarded – undo
105 105
 
106 106
 
107 107
 		/**
108
-		* REQUIRED. Now we need to define our column headers. This includes a complete
109
-		* array of columns to be displayed (slugs & titles), a list of columns
110
-		* to keep hidden, and a list of columns that are sortable. Each of these
111
-		* can be defined in another method (as we've done here) before being
112
-		* used to build the value for our _column_headers property.
113
-		*/
108
+		 * REQUIRED. Now we need to define our column headers. This includes a complete
109
+		 * array of columns to be displayed (slugs & titles), a list of columns
110
+		 * to keep hidden, and a list of columns that are sortable. Each of these
111
+		 * can be defined in another method (as we've done here) before being
112
+		 * used to build the value for our _column_headers property.
113
+		 */
114 114
 		$columns = $this->get_columns();
115 115
 		$hidden = array();
116 116
 		$sortable = $this->get_sortable_columns();
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 
3 3
 /*	Check if file is include. No direct access possible with file url	*/
4
-if ( !defined( 'WPSHOP_VERSION' ) ) {
5
-	die( __('Access is not allowed by this way', 'wpshop') );
4
+if (!defined('WPSHOP_VERSION')) {
5
+	die(__('Access is not allowed by this way', 'wpshop'));
6 6
 }
7 7
 
8 8
 
9 9
 //Our class extends the WP_List_Table class, so we need to make sure that it's there
10
-if(!class_exists('WP_List_Table')){
11
-	require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
10
+if (!class_exists('WP_List_Table')) {
11
+	require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
12 12
 }
13 13
 class Customer_List_Table extends WP_List_Table {
14 14
 
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
 	* Constructor, we override the parent to pass our own arguments
19 19
 	* We usually focus on three parameters: singular and plural labels, as well as whether the class supports AJAX.
20 20
 	*/
21
-	function __construct(){
22
-			parent::__construct( array(
21
+	function __construct() {
22
+			parent::__construct(array(
23 23
 			'singular'=> 'wp_list_customer', //Singular label
24 24
 			'plural' => 'wp_list_customers', //plural label, also this well be one of the table css class
25 25
 			'ajax' => false
26
-		) );
26
+		));
27 27
 	}
28 28
 
29 29
 	/**
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
 	*
35 35
 	*	@return mixed The column output if found, or defaut is an complete output of the item
36 36
 	*/
37
-	function column_default($item, $column_name){
38
-		switch($column_name){
37
+	function column_default($item, $column_name) {
38
+		switch ($column_name) {
39 39
 			case 'customer_id':{
40 40
 				return '<label for="wpshop_customer_order_cb_dialog_' . $item->ID . '" >' . WPSHOP_IDENTIFIER_CUSTOMER . $item->ID . '</label>';
41 41
 			}break;
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 				return $item->user_firstname;
47 47
 			}break;
48 48
 			default:
49
-				return print_r($item,true); //Show the whole array for troubleshooting purposes
49
+				return print_r($item, true); //Show the whole array for troubleshooting purposes
50 50
 			break;
51 51
 		}
52 52
 	}
@@ -58,10 +58,10 @@  discard block
 block discarded – undo
58 58
 	*
59 59
 	*	@return string The output build specificly for the given column
60 60
 	*/
61
-	function column_cb($item){
61
+	function column_cb($item) {
62 62
 		return sprintf(
63 63
 				'<input type="radio" name="%1$s" value="%2$s" class="wpshop_customer_order_cb_dialog" id="wpshop_customer_order_cb_dialog_%2$s" name="customer_order" />',
64
-				/*$1%s*/ $this->_args['singular'],  //Let's simply repurpose the table's singular label ("movie")
64
+				/*$1%s*/ $this->_args['singular'], //Let's simply repurpose the table's singular label ("movie")
65 65
 				/*$2%s*/ $item->ID                //The value of the checkbox should be the record's id
66 66
 		);
67 67
 	}
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	* @return array $columns, the array of columns to use with the table
72 72
 	*/
73 73
 	function get_columns() {
74
-		return $columns= array(
74
+		return $columns = array(
75 75
 			'cb'=>'',
76 76
 			'customer_id'=>'',
77 77
 			'customer_lastname'=>__('Lastname', 'wpshop'),
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	*
98 98
 	*	@return void
99 99
 	*/
100
-	function prepare_items($data, $per_page, $current_page){
100
+	function prepare_items($data, $per_page, $current_page) {
101 101
 
102 102
 
103 103
 
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
 /*	Check if file is include. No direct access possible with file url	*/
4 6
 if ( !defined( 'WPSHOP_VERSION' ) ) {
Please login to merge, or discard this patch.
includes/modules/wps_customer/wps_customer.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
  * WpShop Customer Account bootstrap file
4 6
  * @author Jérôme ALLEGRE - Eoxia dev team <[email protected]>
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 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
  * WpShop Customer Account bootstrap file
4 4
  * @author Jérôme ALLEGRE - Eoxia dev team <[email protected]>
@@ -8,34 +8,34 @@  discard block
 block discarded – undo
8 8
  *
9 9
  */
10 10
 
11
-if ( !defined( 'WPSHOP_VERSION' ) ) {
12
-	die( __("You are not allowed to use this service.", 'wpshop') );
11
+if (!defined('WPSHOP_VERSION')) {
12
+	die(__("You are not allowed to use this service.", 'wpshop'));
13 13
 }
14 14
 
15 15
 	/** Template Global vars **/
16 16
 	DEFINE('WPS_ACCOUNT_DIR', basename(dirname(__FILE__)));
17
-	DEFINE('WPS_ACCOUNT_PATH', str_replace( "\\", "/", str_replace( WPS_ACCOUNT_DIR, "", dirname( __FILE__ ) ) ) );
18
-	DEFINE('WPS_ACCOUNT_URL', str_replace( str_replace( "\\", "/", ABSPATH), site_url() . '/', WPS_ACCOUNT_PATH ) );
19
-	DEFINE('WPS_ACCOUNT_TPL', WPS_ACCOUNT_PATH . WPS_ACCOUNT_DIR . '/templates/' );
17
+	DEFINE('WPS_ACCOUNT_PATH', str_replace("\\", "/", str_replace(WPS_ACCOUNT_DIR, "", dirname(__FILE__))));
18
+	DEFINE('WPS_ACCOUNT_URL', str_replace(str_replace("\\", "/", ABSPATH), site_url() . '/', WPS_ACCOUNT_PATH));
19
+	DEFINE('WPS_ACCOUNT_TPL', WPS_ACCOUNT_PATH . WPS_ACCOUNT_DIR . '/templates/');
20 20
 
21
-	include( plugin_dir_path( __FILE__ ).'controller/wps_customer_ctr.php' );
22
-	include( plugin_dir_path( __FILE__ ).'controller/wps-customer-metaboxes.controller.01.php' );
23
-	include( plugin_dir_path( __FILE__ ).'controller/wps_account_ctr.php' );
24
-	include( plugin_dir_path( __FILE__ ).'controller/wps_account_dashboard_ctr.php' );
25
-	include( plugin_dir_path( __FILE__ ).'model/wps_customer_mdl.php' );
26
-	include( plugin_dir_path( __FILE__ ).'controller/wps_customer_group.php' );
21
+	include(plugin_dir_path(__FILE__) . 'controller/wps_customer_ctr.php');
22
+	include(plugin_dir_path(__FILE__) . 'controller/wps-customer-metaboxes.controller.01.php');
23
+	include(plugin_dir_path(__FILE__) . 'controller/wps_account_ctr.php');
24
+	include(plugin_dir_path(__FILE__) . 'controller/wps_account_dashboard_ctr.php');
25
+	include(plugin_dir_path(__FILE__) . 'model/wps_customer_mdl.php');
26
+	include(plugin_dir_path(__FILE__) . 'controller/wps_customer_group.php');
27 27
 // 	include( plugin_dir_path( __FILE__ ).'controller/customer_custom_list_table.class.php' );
28 28
 // 	include( plugin_dir_path( __FILE__ ).'controller/wp_list_custom_groups.class.php' );
29
-	include( plugin_dir_path( __FILE__ ).'controller/wp_list_custom_entities_customers.php' );
30
-	include( plugin_dir_path( __FILE__ ).'controller/wps_provider_ctr.php' );
29
+	include(plugin_dir_path(__FILE__) . 'controller/wp_list_custom_entities_customers.php');
30
+	include(plugin_dir_path(__FILE__) . 'controller/wps_provider_ctr.php');
31 31
 
32 32
 	$wps_customer = new wps_customer_ctr();
33 33
 	$wps_account = new wps_account_ctr();
34 34
 	$wps_account_dashboard = new wps_account_dashboard_ctr();
35 35
 	$wps_provider = new wps_provider_ctr();
36 36
 	// Add customer admin
37
-	if( is_admin() ) {
38
-		include( plugin_dir_path( __FILE__ ).'controller/wps_customer_admin_ctr.php' );
37
+	if (is_admin()) {
38
+		include(plugin_dir_path(__FILE__) . 'controller/wps_customer_admin_ctr.php');
39 39
 		$wps_customer_admin = new wps_customer_admin();
40 40
 		$wps_customer_admin->install_modules();
41 41
 	}
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
 <div class="wps-boxed">
4 6
 	<div id="wps_renew_password_error_container"></div>
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
 <div id="wps_renew_password_error_container_true"></div>
4 6
 <div class="wps-boxed" id="wps_password_renew">
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.
includes/modules/wps_customer/templates/frontend/login/login-form.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
  if ( !$force_login ) : ?>
3 5
 <?php echo do_shortcode( '[wps_first_login]' ); ?>
4 6
 
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,41 +1,41 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
2
- if ( !$force_login ) : ?>
3
-<?php echo do_shortcode( '[wps_first_login]' ); ?>
1
+<?php if (!defined('ABSPATH')) exit;
2
+ if (!$force_login) : ?>
3
+<?php echo do_shortcode('[wps_first_login]'); ?>
4 4
 
5 5
 <?php endif; ?>
6 6
 <?php global $post; ?>
7 7
 <div class="wps-boxed" id="wps_login_form_container">
8
-	<span class="wps-h5"><?php _e ('Log in', 'wpshop'); ?></span>
8
+	<span class="wps-h5"><?php _e('Log in', 'wpshop'); ?></span>
9 9
 	<div class="wp-form-group wps-welcome_back_message" id="welcome_back_message">
10 10
 		<span class="welcome_back_message_hello_message">
11
-			<?php _e( 'Howdy', 'wpshop')?>
12
-		</span> <strong id="user_firstname"></strong>, <br/><?php _e( 'we are happy to see you again', 'wpshop'); ?> !</div>
11
+			<?php _e('Howdy', 'wpshop')?>
12
+		</span> <strong id="user_firstname"></strong>, <br/><?php _e('we are happy to see you again', 'wpshop'); ?> !</div>
13 13
 	<div id="wps_login_error_container"></div>
14 14
 	<form action="<?php echo admin_url('admin-ajax.php'); ?>" method="post" id="wps_login_form">
15
-		<?php echo apply_filters( 'login_form_top', '', $args ); ?>
15
+		<?php echo apply_filters('login_form_top', '', $args); ?>
16 16
 		<input type="hidden" name="action" value="wps_login_request" />
17
-    <?php wp_nonce_field( 'control_login_form_request' ); ?>
17
+    <?php wp_nonce_field('control_login_form_request'); ?>
18 18
 		<input type="hidden" name="wps-checking-origin" value="<?php echo $post->ID; ?>" />
19 19
 		<div class="wps-form-group">
20
-			<label for="wps_login_email_address"><?php _e('Email address', 'wpshop');?></label>
20
+			<label for="wps_login_email_address"><?php _e('Email address', 'wpshop'); ?></label>
21 21
 			<span class="wps-help-inline wps-help-inline-title"></span>
22
-			<div id="wps_login_email_address" class="wps-form"><input type="text" name="wps_login_user_login" id="wps_login_email" placeholder="<?php _e('Your email address', 'wpshop');?>" /></div>
22
+			<div id="wps_login_email_address" class="wps-form"><input type="text" name="wps_login_user_login" id="wps_login_email" placeholder="<?php _e('Your email address', 'wpshop'); ?>" /></div>
23 23
 		</div>
24 24
 
25 25
 		<div class="wps-form-group">
26
-			<label for="wps_login_password"><?php _e('Password', 'wpshop');?></label>
27
-			<div id="wps_login_password" class="wps-form"><input type="password" name="wps_login_password" id="wps_login_password" placeholder="<?php _e('Your password', 'wpshop');?>" /></div>
26
+			<label for="wps_login_password"><?php _e('Password', 'wpshop'); ?></label>
27
+			<div id="wps_login_password" class="wps-form"><input type="password" name="wps_login_password" id="wps_login_password" placeholder="<?php _e('Your password', 'wpshop'); ?>" /></div>
28 28
 		</div>
29 29
 		<div class="wps-form-group">
30
-			<?php echo apply_filters( 'login_form_middle', '', $args ); ?>
31
-			<?php do_action( 'login_form' ); ?>
30
+			<?php echo apply_filters('login_form_middle', '', $args); ?>
31
+			<?php do_action('login_form'); ?>
32 32
 		</div>
33 33
 		<div class="wps-form-group wps-password-reminder">
34
-			<a href="#" data-nonce="<?php echo wp_create_nonce( 'wps_fill_forgot_password_modal' ); ?>" class="wps-modal-forgot-password-opener wps-password-reminder-link"><?php _e( 'Forgotten password', 'wpshop'); ?> ?</a> <button class="wps-bton-first-alignRight-rounded" id="wps_login_button"><?php _e('Connexion', 'wpshop'); ?></button>
34
+			<a href="#" data-nonce="<?php echo wp_create_nonce('wps_fill_forgot_password_modal'); ?>" class="wps-modal-forgot-password-opener wps-password-reminder-link"><?php _e('Forgotten password', 'wpshop'); ?> ?</a> <button class="wps-bton-first-alignRight-rounded" id="wps_login_button"><?php _e('Connexion', 'wpshop'); ?></button>
35 35
 			<div class="wps-password-reminder-content">
36 36
 
37 37
 			</div>
38 38
 		</div>
39
-		<?php echo apply_filters( 'login_form_bottom', '', $args ); ?>
39
+		<?php echo apply_filters('login_form_bottom', '', $args); ?>
40 40
 	</form>
41 41
 </div>
Please login to merge, or discard this patch.
includes/modules/wps_customer/templates/frontend/login/login-form-first.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
 <div class="wps-boxed" id="wps_login_form_first_step">
4 6
 	<span class="wps-h5"><?php _e ('Log in', 'wpshop'); ?> / <?php _e( 'Sign up', 'wpshop'); ?></span>
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 <div class="wps-boxed" id="wps_login_form_first_step">
4
-	<span class="wps-h5"><?php _e ('Log in', 'wpshop'); ?> / <?php _e( 'Sign up', 'wpshop'); ?></span>
4
+	<span class="wps-h5"><?php _e('Log in', 'wpshop'); ?> / <?php _e('Sign up', 'wpshop'); ?></span>
5 5
 	<div id="wps_login_first_error_container" class="wps-login-first-error"></div>
6 6
 	<div class="wps-form-group">
7 7
 		<label for="wps_login_first_email_address">
8
-			<?php _e('Email address', 'wpshop');?>
8
+			<?php _e('Email address', 'wpshop'); ?>
9 9
 		</label>
10 10
 		<span class="wps-help-inline"></span>
11 11
 		<div class="wps-form">
12
-			<input type="text" name="wps_login_user_login" id="wps_login_first_email_address" placeholder="<?php _e('Your email address', 'wpshop');?>" />
12
+			<input type="text" name="wps_login_user_login" id="wps_login_first_email_address" placeholder="<?php _e('Your email address', 'wpshop'); ?>" />
13 13
 		</div>
14 14
 	</div>
15 15
 	<div class="wps-form-group">
16
-		<button class="wps-bton-first-alignRight-rounded" data-nonce="<?php echo wp_create_nonce( 'wps_login_first_request' ); ?>" id="wps_first_login_button">
16
+		<button class="wps-bton-first-alignRight-rounded" data-nonce="<?php echo wp_create_nonce('wps_login_first_request'); ?>" id="wps_first_login_button">
17 17
 			<?php _e('Continue', 'wpshop'); ?>
18 18
 		</button>
19 19
 	</div>
Please login to merge, or discard this patch.
includes/modules/wps_customer/templates/frontend/signup/signup.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
 <div class="wps-boxed" id="wps_signup_form_container">
4 6
 <span class="wps-h5"><?php _e ('Sign up', 'wpshop'); ?></span>
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,59 +1,59 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 <div class="wps-boxed" id="wps_signup_form_container">
4
-<span class="wps-h5"><?php _e ('Sign up', 'wpshop'); ?></span>
4
+<span class="wps-h5"><?php _e('Sign up', 'wpshop'); ?></span>
5 5
 <div id="wps_signup_error_container"></div>
6 6
 	<form action="<?php echo admin_url('admin-ajax.php'); ?>" method="post" id="wps_signup_form">
7
-		<?php if( !empty($args) ) : ?>
7
+		<?php if (!empty($args)) : ?>
8 8
 			<input type="hidden" name="wps_sign_up_request_from_admin" value="admin" />
9 9
 		<?php endif; ?>
10 10
 
11 11
 		<input type="hidden" name="action" value="wps_signup_request" />
12
-		<?php wp_nonce_field( 'wps_save_signup_form' ); ?>
12
+		<?php wp_nonce_field('wps_save_signup_form'); ?>
13 13
 
14 14
 		<?php
15
-		if( !empty($signup_fields) ) :
15
+		if (!empty($signup_fields)) :
16 16
 
17 17
 			$wpshop_billing_address = get_option('wpshop_billing_address');
18 18
 
19
-			foreach( $signup_fields as $signup_field ) :
20
-			if( isset( $signup_field->code ) && $signup_field->code == 'is_provider' ) {
19
+			foreach ($signup_fields as $signup_field) :
20
+			if (isset($signup_field->code) && $signup_field->code == 'is_provider') {
21 21
 				continue;
22 22
 			}
23
-			$value = ( !empty($signup_field->frontend_input) && $signup_field->frontend_input != 'password' && !empty($_POST) && !empty($_POST['attribute']) && !empty($_POST['attribute'][$signup_field->data_type]) && !empty( $_POST['attribute'][$signup_field->data_type][$signup_field->code]) ) ? sanitize_text_field( $_POST['attribute'][$signup_field->data_type][$signup_field->code] ) : '';
24
-			$attribute_output_def = wpshop_attributes::get_attribute_field_definition( $signup_field, $value, array( 'from' => 'frontend', ) );
23
+			$value = (!empty($signup_field->frontend_input) && $signup_field->frontend_input != 'password' && !empty($_POST) && !empty($_POST['attribute']) && !empty($_POST['attribute'][$signup_field->data_type]) && !empty($_POST['attribute'][$signup_field->data_type][$signup_field->code])) ? sanitize_text_field($_POST['attribute'][$signup_field->data_type][$signup_field->code]) : '';
24
+			$attribute_output_def = wpshop_attributes::get_attribute_field_definition($signup_field, $value, array('from' => 'frontend',));
25 25
 		?>
26 26
 			<div class="wps-form-group field-<?php echo $signup_field->code; ?>">
27
-				<label for="<?php echo $signup_field->code; ?>"><?php  _e( stripslashes($signup_field->frontend_label), 'wpshop'); ?> <?php echo ( ( !empty($attribute_output_def['required']) && $attribute_output_def['required'] == 'yes' ) ? '<em>*</em>' : '' ); ?></label>
27
+				<label for="<?php echo $signup_field->code; ?>"><?php  _e(stripslashes($signup_field->frontend_label), 'wpshop'); ?> <?php echo ((!empty($attribute_output_def['required']) && $attribute_output_def['required'] == 'yes') ? '<em>*</em>' : ''); ?></label>
28 28
 				<div id="<?php echo $signup_field->code; ?>" class="wps-form"><?php echo $attribute_output_def['output']; echo $attribute_output_def['options']; ?></div>
29 29
 			</div>
30 30
 		<?php
31 31
 			/** Check confirmation field **/
32 32
 			$current_field_key = $signup_field->code;
33
-			if ( $signup_field->_need_verification == 'yes'  ) {
34
-				$signup_field->code = $signup_field->code.'2';
35
-				$attribute_output_def = wpshop_attributes::get_attribute_field_definition( $signup_field, '', array() );
33
+			if ($signup_field->_need_verification == 'yes') {
34
+				$signup_field->code = $signup_field->code . '2';
35
+				$attribute_output_def = wpshop_attributes::get_attribute_field_definition($signup_field, '', array());
36 36
 			?>
37 37
 				<div class="wps-form-group field-<?php echo $signup_field->code; ?>">
38
-					<label for="<?php echo $signup_field->code; ?>"><?php printf( __('Confirm %s', 'wpshop'), stripslashes( strtolower(__( $signup_field->frontend_label, 'wpshop')) ) ); ?> <?php echo ( ( !empty($attribute_output_def['required']) && $attribute_output_def['required'] == 'yes' ) ? '<em>*</em>' : '' ); ?></label>
38
+					<label for="<?php echo $signup_field->code; ?>"><?php printf(__('Confirm %s', 'wpshop'), stripslashes(strtolower(__($signup_field->frontend_label, 'wpshop')))); ?> <?php echo ((!empty($attribute_output_def['required']) && $attribute_output_def['required'] == 'yes') ? '<em>*</em>' : ''); ?></label>
39 39
 					<div id="<?php echo $signup_field->code; ?>" class="wps-form"><?php echo $attribute_output_def['output']; echo $attribute_output_def['options']; ?></div>
40 40
 				</div>
41 41
 			<?php
42 42
 			}
43 43
 
44
-			if ( !empty($wpshop_billing_address['integrate_into_register_form']) && ($wpshop_billing_address['integrate_into_register_form'] == 'yes') && !empty($wpshop_billing_address['integrate_into_register_form_after_field']) && ($wpshop_billing_address['integrate_into_register_form_after_field'] == $current_field_key ) ) {
44
+			if (!empty($wpshop_billing_address['integrate_into_register_form']) && ($wpshop_billing_address['integrate_into_register_form'] == 'yes') && !empty($wpshop_billing_address['integrate_into_register_form_after_field']) && ($wpshop_billing_address['integrate_into_register_form_after_field'] == $current_field_key)) {
45 45
 				$current_connected_user = null;
46
-				if ( get_current_user_id() > 0 ) {
47
-					$query = $wpdb->prepare ("SELECT *
46
+				if (get_current_user_id() > 0) {
47
+					$query = $wpdb->prepare("SELECT *
48 48
 						FROM " . $wpdb->posts . "
49
-						WHERE post_type = '" .WPSHOP_NEWTYPE_IDENTIFIER_ADDRESS. "'
49
+						WHERE post_type = '" .WPSHOP_NEWTYPE_IDENTIFIER_ADDRESS . "'
50 50
 						AND post_parent = %d
51 51
 						ORDER BY ID
52
-						LIMIT 1", get_current_user_id() );
52
+						LIMIT 1", get_current_user_id());
53 53
 					$current_connected_user = $wpdb->get_var($query);
54 54
 				}
55 55
 				$wps_address = new wps_address();
56
-				echo $wps_address->display_form_fields($wpshop_billing_address['choice'], '', 'true', '', array(), array( 'title' => false, 'address_title' => false, 'field_to_hide' => $wpshop_billing_address[ 'integrate_into_register_form_matching_field' ] ), array(), $current_connected_user);
56
+				echo $wps_address->display_form_fields($wpshop_billing_address['choice'], '', 'true', '', array(), array('title' => false, 'address_title' => false, 'field_to_hide' => $wpshop_billing_address['integrate_into_register_form_matching_field']), array(), $current_connected_user);
57 57
 			}
58 58
 
59 59
 			endforeach;
Please login to merge, or discard this patch.
modules/wps_customer/templates/frontend/account/account_informations.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
 <div class="wps-boxed">
4 6
 	<?php echo $attributes_sections_tpl; ?>
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 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
 	<?php echo $attributes_sections_tpl; ?>
5
-	<?php if ( ! is_admin() || strpos( $_SERVER['REQUEST_URI'], 'admin-ajax.php' )  ) : ?>
6
-	<div><button data-nonce="<?php echo wp_create_nonce( 'wps_fill_account_informations_modal' ); ?>" data-customer-id="<?php echo esc_attr( $cid ); ?>" class="wps-link wps-alignright" id="wps_modal_account_informations_opener"><i class="wps-icon-pencil"></i><?php esc_html_e( 'Edit your account informations', 'wpshop')?></button></div>
7
-	<?php elseif( $customer_link ) : ?>
8
-		<div><a href="<?php echo get_edit_post_link( $cid ); ?>"><?php esc_html_e( 'See customer', 'wpshop' ); ?></a></div>
9
-		<?php apply_filters( 'wps_filter_customer_in_order', $cid, wps_customer_ctr::get_author_id_by_customer_id( $cid ) ); ?>
5
+	<?php if (!is_admin() || strpos($_SERVER['REQUEST_URI'], 'admin-ajax.php')) : ?>
6
+	<div><button data-nonce="<?php echo wp_create_nonce('wps_fill_account_informations_modal'); ?>" data-customer-id="<?php echo esc_attr($cid); ?>" class="wps-link wps-alignright" id="wps_modal_account_informations_opener"><i class="wps-icon-pencil"></i><?php esc_html_e('Edit your account informations', 'wpshop')?></button></div>
7
+	<?php elseif ($customer_link) : ?>
8
+		<div><a href="<?php echo get_edit_post_link($cid); ?>"><?php esc_html_e('See customer', 'wpshop'); ?></a></div>
9
+		<?php apply_filters('wps_filter_customer_in_order', $cid, wps_customer_ctr::get_author_id_by_customer_id($cid)); ?>
10 10
 	<?php endif; ?>
11 11
 </div>
Please login to merge, or discard this patch.
wps_customer/templates/frontend/account/account_informations_element.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 
3
-if( isset( $attribute_def->code ) && $attribute_def->code != 'is_provider' ) { ?>
3
+if (isset($attribute_def->code) && $attribute_def->code != 'is_provider') { ?>
4 4
 <div class="wps-form-group">
5
-	<?php echo stripslashes( $attribute_def->frontend_label ); ?> : <?php echo ( !empty($attribute_value) ) ? $attribute_value : ''; ?>
5
+	<?php echo stripslashes($attribute_def->frontend_label); ?> : <?php echo (!empty($attribute_value)) ? $attribute_value : ''; ?>
6 6
 </div>
7 7
 <?php } ?>
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
 if( isset( $attribute_def->code ) && $attribute_def->code != 'is_provider' ) { ?>
4 6
 <div class="wps-form-group">
Please login to merge, or discard this patch.