Completed
Push — master ( e21aca...50b935 )
by
unknown
13:22
created
templates/taxonomy-wpshop_product_category.php 2 patches
Spacing   +14 added lines, -14 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
  * The template for displaying Archive pages.
4 4
  *
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	 * We reset this later so we can run the loop
24 24
 	 * properly with a call to rewind_posts().
25 25
 	 */
26
-	if ( have_posts() )
26
+	if (have_posts())
27 27
 		the_post();
28 28
 
29 29
 
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
 	$category_has_content = false;
35 35
 	$category_has_sub_content = false;
36 36
 	/*	Check what must be outputed on the page (Defined in plugin option)	*/
37
-	if(!is_array($wpshop_display_option['wpshop_display_cat_sheet_output']) || in_array('category_description', $wpshop_display_option['wpshop_display_cat_sheet_output'])):
37
+	if (!is_array($wpshop_display_option['wpshop_display_cat_sheet_output']) || in_array('category_description', $wpshop_display_option['wpshop_display_cat_sheet_output'])):
38 38
 		$category_has_content = true;
39 39
 
40 40
 		$taxonomy_informations = get_option(WPSHOP_NEWTYPE_IDENTIFIER_CATEGORIES . '_' . $wp_query->queried_object->term_id);
41
-		if ( !empty($taxonomy_informations['wpshop_category_picture']) ) {
42
-			$image_post = wp_get_attachment_image( $taxonomy_informations['wpshop_category_picture'], 'wps-categorie-mini-display', false, array('class' => 'category_thumbnail_preview') );
41
+		if (!empty($taxonomy_informations['wpshop_category_picture'])) {
42
+			$image_post = wp_get_attachment_image($taxonomy_informations['wpshop_category_picture'], 'wps-categorie-mini-display', false, array('class' => 'category_thumbnail_preview'));
43 43
 		}
44
-		$category_thumbnail_preview = ( !empty($image_post) ) ? $image_post : '';
44
+		$category_thumbnail_preview = (!empty($image_post)) ? $image_post : '';
45 45
 ?>
46 46
 			<div class="wps-taxonomy-wrapper">
47 47
 					<?php echo do_shortcode('[wpshop_filter_search]'); ?>
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 							<div class="wps-entry-thumbnail"><?php echo $category_thumbnail_preview; ?></div>
51 51
 							<div class="wps-entry-caption">
52 52
 								<h1 class="wps-entry-title"><?php echo $wp_query->queried_object->name; ?></h1>
53
-								<p class="wps-entry-description"><?php echo do_shortcode( wp_trim_words( $wp_query->queried_object->description, 30, ' [...]' ) ); ?></p>
53
+								<p class="wps-entry-description"><?php echo do_shortcode(wp_trim_words($wp_query->queried_object->description, 30, ' [...]')); ?></p>
54 54
 							</div>
55 55
 						</header><!-- .entry-header -->
56 56
 	<?php
@@ -59,9 +59,9 @@  discard block
 block discarded – undo
59 59
 					<div class="wps-categorie-wrapper" >
60 60
 	<?php
61 61
 			/*	Check what must be outputed on the page (Defined in plugin option)	*/
62
-			if(!is_array($wpshop_display_option['wpshop_display_cat_sheet_output']) || in_array('category_subcategory', $wpshop_display_option['wpshop_display_cat_sheet_output'])):
62
+			if (!is_array($wpshop_display_option['wpshop_display_cat_sheet_output']) || in_array('category_subcategory', $wpshop_display_option['wpshop_display_cat_sheet_output'])):
63 63
 					$category_tree = wpshop_categories::category_tree($wp_query->queried_object->term_id);
64
-					if(is_array($category_tree) && (count($category_tree) > 0)):
64
+					if (is_array($category_tree) && (count($category_tree) > 0)):
65 65
 						$category_has_content = true;
66 66
 						$category_has_sub_content = true;
67 67
 	?>
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 						<div class="wps-categorie-content <?php echo $wpshop_display_option['wpshop_display_list_type'] ?>wrapper<?php echo $wpshop_display_option['wpshop_display_grid_element_number'] ?>" >
70 70
 							<!-- <h2 class="category_content_part_title" ><?php _e('Category\'s sub-category list', 'wpshop'); ?></h2> -->
71 71
 	<?php
72
-						foreach($category_tree as $sub_category_id => $sub_category_content){
72
+						foreach ($category_tree as $sub_category_id => $sub_category_content) {
73 73
 							$sub_category_definition = get_term($sub_category_id, WPSHOP_NEWTYPE_IDENTIFIER_CATEGORIES);
74 74
 							echo wpshop_categories::category_mini_output($sub_category_definition, $output_type);
75 75
 						}
@@ -82,13 +82,13 @@  discard block
 block discarded – undo
82 82
 						<?php
83 83
 
84 84
 								/*	Check what must be outputed on the page (Defined in plugin option)	*/
85
-								if(!is_array($wpshop_display_option['wpshop_display_cat_sheet_output']) || in_array('category_subproduct', $wpshop_display_option['wpshop_display_cat_sheet_output'])):
86
-									if ( count( wpshop_categories::get_product_of_category( $wp_query->queried_object->term_taxonomy_id ) ) > 0 ) :
85
+								if (!is_array($wpshop_display_option['wpshop_display_cat_sheet_output']) || in_array('category_subproduct', $wpshop_display_option['wpshop_display_cat_sheet_output'])):
86
+									if (count(wpshop_categories::get_product_of_category($wp_query->queried_object->term_taxonomy_id)) > 0) :
87 87
 										$category_has_content = true;
88 88
 										$category_has_sub_content = true;
89
-										echo do_shortcode('[wpshop_products cid="'.$wp_query->queried_object->term_id.'" type="'.$output_type.'"]');
89
+										echo do_shortcode('[wpshop_products cid="' . $wp_query->queried_object->term_id . '" type="' . $output_type . '"]');
90 90
 									endif;
91
-								elseif(is_array($wpshop_display_option['wpshop_display_cat_sheet_output']) && !in_array('category_subproduct', $wpshop_display_option['wpshop_display_cat_sheet_output'])):
91
+								elseif (is_array($wpshop_display_option['wpshop_display_cat_sheet_output']) && !in_array('category_subproduct', $wpshop_display_option['wpshop_display_cat_sheet_output'])):
92 92
 									$category_has_sub_content = true;
93 93
 								endif;
94 94
 						?>
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 /**
3 5
  * The template for displaying Archive pages.
4 6
  *
@@ -23,8 +25,9 @@  discard block
 block discarded – undo
23 25
 	 * We reset this later so we can run the loop
24 26
 	 * properly with a call to rewind_posts().
25 27
 	 */
26
-	if ( have_posts() )
27
-		the_post();
28
+	if ( have_posts() ) {
29
+			the_post();
30
+	}
28 31
 
29 32
 
30 33
 	$output_type = (isset($wpshop_display_option['wpshop_display_list_type']) && ($wpshop_display_option['wpshop_display_list_type'] != '')) ? $wpshop_display_option['wpshop_display_list_type'] : 'grid';
Please login to merge, or discard this patch.
assets/datas/default_datas_string.php 2 patches
Spacing   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -1,95 +1,95 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
2
-__('Account creation confirmation', 'wpshop' );
3
-__('Hello [customer_first_name] [customer_last_name], this email confirms that your account has just been created. Thank you for your loyalty. Have a good day.', 'wpshop' );
4
-__( 'User account creation confirmation message', 'wpshop' );
1
+<?php if (!defined('ABSPATH')) exit;
2
+__('Account creation confirmation', 'wpshop');
3
+__('Hello [customer_first_name] [customer_last_name], this email confirms that your account has just been created. Thank you for your loyalty. Have a good day.', 'wpshop');
4
+__('User account creation confirmation message', 'wpshop');
5 5
 
6
-__('Renewal of password', 'wpshop' );
7
-__('Hello [customer_first_name] [customer_last_name], <br />Somebody has asked a renewal of password for your account.<br/><br/>To renew your password, click on this link : [forgot_password_link].<br/>If you are not at the origin of this request, please ignore this message.', 'wpshop' );
8
-__('Send to customer a link to renew its password', 'wpshop' );
6
+__('Renewal of password', 'wpshop');
7
+__('Hello [customer_first_name] [customer_last_name], <br />Somebody has asked a renewal of password for your account.<br/><br/>To renew your password, click on this link : [forgot_password_link].<br/>If you are not at the origin of this request, please ignore this message.', 'wpshop');
8
+__('Send to customer a link to renew its password', 'wpshop');
9 9
 
10
-__('Order payment confirmation (Paypal id [paypal_order_key])', 'wpshop' );
11
-__('Hello [customer_first_name] [customer_last_name], this email confirms that your payment about your recent order on our website has been completed (order date : [order_date]). Thank you for your loyalty. Have a good day.', 'wpshop' );
12
-__('User paypal payment reception confirmation', 'wpshop' );
10
+__('Order payment confirmation (Paypal id [paypal_order_key])', 'wpshop');
11
+__('Hello [customer_first_name] [customer_last_name], this email confirms that your payment about your recent order on our website has been completed (order date : [order_date]). Thank you for your loyalty. Have a good day.', 'wpshop');
12
+__('User paypal payment reception confirmation', 'wpshop');
13 13
 
14
-__('Pay and finalize your order', 'wpshop' );
15
-__('Hello [customer_first_name] [customer_last_name], <br />An order is available for you on our website.<br/>You can click on this link to pay and finalize this order : [direct_payment_link]<br/><br/>[order_content]<br /><br />Thank you for your loyalty. Have a good day.', 'wpshop' );
16
-__('Send a link for finalize its order directly', 'wpshop' );
14
+__('Pay and finalize your order', 'wpshop');
15
+__('Hello [customer_first_name] [customer_last_name], <br />An order is available for you on our website.<br/>You can click on this link to pay and finalize this order : [direct_payment_link]<br/><br/>[order_content]<br /><br />Thank you for your loyalty. Have a good day.', 'wpshop');
16
+__('Send a link for finalize its order directly', 'wpshop');
17 17
 
18
-__('Your payment has been received', 'wpshop' );
19
-__('Hello [customer_first_name] [customer_last_name], this email confirms that your payment regarding your order ([order_key]) has just been received (order date : [order_date]). Thank you for your loyalty. Have a good day.', 'wpshop' );
20
-__('User payment reception confirmation', 'wpshop' );
18
+__('Your payment has been received', 'wpshop');
19
+__('Hello [customer_first_name] [customer_last_name], this email confirms that your payment regarding your order ([order_key]) has just been received (order date : [order_date]). Thank you for your loyalty. Have a good day.', 'wpshop');
20
+__('User payment reception confirmation', 'wpshop');
21 21
 
22
-__('Your order has been shipped', 'wpshop' );
23
-__('Hello [customer_first_name] [customer_last_name], this email confirms that your order ([order_key]) has just been shipped (order date : [order_date], tracking number : [order_trackingNumber]). Thank you for your loyalty. Have a good day.', 'wpshop' );
24
-__('Order shipping message', 'wpshop' );
22
+__('Your order has been shipped', 'wpshop');
23
+__('Hello [customer_first_name] [customer_last_name], this email confirms that your order ([order_key]) has just been shipped (order date : [order_date], tracking number : [order_trackingNumber]). Thank you for your loyalty. Have a good day.', 'wpshop');
24
+__('Order shipping message', 'wpshop');
25 25
 
26
-__('Your order has been recorded', 'wpshop' );
27
-__('Hello [customer_first_name] [customer_last_name], this email confirms that your order has been recorded (order date : [order_date]). Thank you for your loyalty. Have a good day.', 'wpshop' );
28
-__('User order confirmation', 'wpshop' );
26
+__('Your order has been recorded', 'wpshop');
27
+__('Hello [customer_first_name] [customer_last_name], this email confirms that your order has been recorded (order date : [order_date]). Thank you for your loyalty. Have a good day.', 'wpshop');
28
+__('User order confirmation', 'wpshop');
29 29
 
30
-__('Your order has been updated', 'wpshop' );
31
-__('Hello [customer_first_name] [customer_last_name], your order ([order_key]) has just been updated. Please login to your account to view details. Thank you for your loyalty. Have a good day.', 'wpshop' );
32
-__('Notify a customer when order is updated', 'wpshop' );
30
+__('Your order has been updated', 'wpshop');
31
+__('Hello [customer_first_name] [customer_last_name], your order ([order_key]) has just been updated. Please login to your account to view details. Thank you for your loyalty. Have a good day.', 'wpshop');
32
+__('Notify a customer when order is updated', 'wpshop');
33 33
 
34
-__('Your order has been canceled', 'wpshop' );
35
-__('Hello [customer_first_name] [customer_last_name], <br />this email confirms your order ( Order key : [order_key] - Date : [order_date] ) has been canceled.<br /><br /> Thank you for your loyalty. Have a good day.', 'wpshop' );
36
-__('Notify a customer when order is canceled', 'wpshop' );
34
+__('Your order has been canceled', 'wpshop');
35
+__('Hello [customer_first_name] [customer_last_name], <br />this email confirms your order ( Order key : [order_key] - Date : [order_date] ) has been canceled.<br /><br /> Thank you for your loyalty. Have a good day.', 'wpshop');
36
+__('Notify a customer when order is canceled', 'wpshop');
37 37
 
38
-__('A comment has been added to your order', 'wpshop' );
39
-__('Your order has been updated', 'wpshop' );
40
-__('Hello [customer_first_name] [customer_last_name], your order ([order_key]) has just been updated. A comment has been added:<br/><br/>[message].<br/><br/> Thank you for your loyalty. Have a good day.', 'wpshop' );
41
-__('Hello [customer_first_name] [customer_last_name], your order ([order_key]) has just been updated. A comment has been added:[message]. Thank you for your loyalty. Have a good day.', 'wpshop' );
42
-__('Private update on an order', 'wpshop' );
38
+__('A comment has been added to your order', 'wpshop');
39
+__('Your order has been updated', 'wpshop');
40
+__('Hello [customer_first_name] [customer_last_name], your order ([order_key]) has just been updated. A comment has been added:<br/><br/>[message].<br/><br/> Thank you for your loyalty. Have a good day.', 'wpshop');
41
+__('Hello [customer_first_name] [customer_last_name], your order ([order_key]) has just been updated. A comment has been added:[message]. Thank you for your loyalty. Have a good day.', 'wpshop');
42
+__('Private update on an order', 'wpshop');
43 43
 
44
-__('New order on your shop', 'wpshop' );
45
-__('Hello, New order on your shop ! Order Key : [order_key], Order date : [order_date], Order payment method : [order_payment_method], [order_content] [order_addresses] [order_customer_comments]', 'wpshop' );
46
-__('New order on shop sended to shop administrator', 'wpshop' );
44
+__('New order on your shop', 'wpshop');
45
+__('Hello, New order on your shop ! Order Key : [order_key], Order date : [order_date], Order payment method : [order_payment_method], [order_content] [order_addresses] [order_customer_comments]', 'wpshop');
46
+__('New order on shop sended to shop administrator', 'wpshop');
47 47
 
48
-__('New quotation on your shop', 'wpshop' );
49
-__('Hello, New quotation on your shop ! Quotation Key : [order_temporary_key], Quotation date : [order_date], [order_content] [order_addresses] [order_customer_comments]', 'wpshop' );
50
-__('New quotation on shop sended to shop administrator', 'wpshop' );
48
+__('New quotation on your shop', 'wpshop');
49
+__('Hello, New quotation on your shop ! Quotation Key : [order_temporary_key], Quotation date : [order_date], [order_content] [order_addresses] [order_customer_comments]', 'wpshop');
50
+__('New quotation on shop sended to shop administrator', 'wpshop');
51 51
 
52
-__('Your quotation has been recorded', 'wpshop' );
53
-__('Hello [customer_first_name] [customer_last_name], this email confirms that your order has been recorded (Quotation date : [order_date]). [order_content]', 'wpshop' );
54
-__('User quotation confirmation', 'wpshop' );
52
+__('Your quotation has been recorded', 'wpshop');
53
+__('Hello [customer_first_name] [customer_last_name], this email confirms that your order has been recorded (Quotation date : [order_date]). [order_content]', 'wpshop');
54
+__('User quotation confirmation', 'wpshop');
55 55
 
56
-__('Your quotation has been updated', 'wpshop' );
57
-__('Hello [customer_first_name] [customer_last_name], this email confirms that your quotation has been updated (Quotation date : [order_date]). [order_content]', 'wpshop' );
58
-__('Notify a customer when quotation is updated', 'wpshop' );
56
+__('Your quotation has been updated', 'wpshop');
57
+__('Hello [customer_first_name] [customer_last_name], this email confirms that your quotation has been updated (Quotation date : [order_date]). [order_content]', 'wpshop');
58
+__('Notify a customer when quotation is updated', 'wpshop');
59 59
 
60
-__('Your downloadable product is available', 'wpshop' );
61
-__('Hello [customer_first_name] [customer_last_name],<br/>this email confirms that your downloadable product is available : [download_product_link].<br/><br/>Thank you for your loyalty. Have a good day.', 'wpshop' );
62
-__('Notify a customer when downloadable file is available after an order', 'wpshop' );
60
+__('Your downloadable product is available', 'wpshop');
61
+__('Hello [customer_first_name] [customer_last_name],<br/>this email confirms that your downloadable product is available : [download_product_link].<br/><br/>Thank you for your loyalty. Have a good day.', 'wpshop');
62
+__('Notify a customer when downloadable file is available after an order', 'wpshop');
63 63
 
64 64
 
65
-__('Shop', 'wpshop' );
66
-__('shop', 'wpshop' );
67
-__('Display shop product list', 'wpshop' );
65
+__('Shop', 'wpshop');
66
+__('shop', 'wpshop');
67
+__('Display shop product list', 'wpshop');
68 68
 
69
-__('Cart', 'wpshop' );
70
-__('cart', 'wpshop' );
71
-__('Display the cart page', 'wpshop' );
69
+__('Cart', 'wpshop');
70
+__('cart', 'wpshop');
71
+__('Display the cart page', 'wpshop');
72 72
 
73
-__('Checkout', 'wpshop' );
74
-__('checkout', 'wpshop' );
75
-__('Display the checkout page', 'wpshop' );
73
+__('Checkout', 'wpshop');
74
+__('checkout', 'wpshop');
75
+__('Display the checkout page', 'wpshop');
76 76
 
77
-__('My account', 'wpshop' );
78
-__('myaccount', 'wpshop' );
79
-__('Display the user account page', 'wpshop' );
77
+__('My account', 'wpshop');
78
+__('myaccount', 'wpshop');
79
+__('Display the user account page', 'wpshop');
80 80
 
81
-__('Signup', 'wpshop' );
82
-__('signup', 'wpshop' );
83
-__('Display the signout page', 'wpshop' );
81
+__('Signup', 'wpshop');
82
+__('signup', 'wpshop');
83
+__('Display the signout page', 'wpshop');
84 84
 
85
-__('Payment return successfull', 'wpshop' );
86
-__('return', 'wpshop' );
87
-__('Page for succesfull payment return', 'wpshop' );
85
+__('Payment return successfull', 'wpshop');
86
+__('return', 'wpshop');
87
+__('Page for succesfull payment return', 'wpshop');
88 88
 
89
-__('Payment return unsuccessfull', 'wpshop' );
90
-__('unsuccessfull_payment_return', 'wpshop' );
91
-__('Page for unsuccesfull payment return', 'wpshop' );
89
+__('Payment return unsuccessfull', 'wpshop');
90
+__('unsuccessfull_payment_return', 'wpshop');
91
+__('Page for unsuccesfull payment return', 'wpshop');
92 92
 
93
-__('Terms of sale', 'wpshop' );
94
-__('terms-of-sale', 'wpshop' );
95
-__('Define the page for terms of sale', 'wpshop' );
93
+__('Terms of sale', 'wpshop');
94
+__('terms-of-sale', 'wpshop');
95
+__('Define the page for terms of sale', 'wpshop');
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
 __('Account creation confirmation', 'wpshop' );
3 5
 __('Hello [customer_first_name] [customer_last_name], this email confirms that your account has just been created. Thank you for your loyalty. Have a good day.', 'wpshop' );
4 6
 __( 'User account creation confirmation message', 'wpshop' );
Please login to merge, or discard this patch.
languages/alone_text.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
 * Plugin database options
4 6
 *
Please login to merge, or discard this patch.
core/module_management/module_management.php 2 patches
Spacing   +13 added lines, -13 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
  * Plugin Name: Gestion des modules internes / Internal module management
4 4
  * Description: Permet d'activer ou de désactiver les différents modules internes présents dans le dossier modules / Allow to activate or deactivate internal modules present into modules directory
@@ -14,32 +14,32 @@  discard block
 block discarded – undo
14 14
  */
15 15
 
16 16
 /*	Check if file is include. No direct access possible with file url	*/
17
-if ( !defined( 'WPSHOP_VERSION' ) ) {
18
-	die( __('Access is not allowed by this way', 'wpshop') );
17
+if (!defined('WPSHOP_VERSION')) {
18
+	die(__('Access is not allowed by this way', 'wpshop'));
19 19
 }
20 20
 
21
-if ( !defined( 'EOMODMAN_VERSION' ) ) {
21
+if (!defined('EOMODMAN_VERSION')) {
22 22
 
23 23
 	/**
24 24
 	 * Define the current version for the plugin. Interresting for clear cache for plugin style and script
25 25
 	 * @var string Plugin current version number
26 26
 	 */
27
-	DEFINE( 'EOMODMAN_VERSION', '1.0');
27
+	DEFINE('EOMODMAN_VERSION', '1.0');
28 28
 
29 29
 	/**	Définition des constantes pour le module / Define constant for module	*/
30
-	DEFINE( 'EOMODMAN_DIR', basename(dirname(__FILE__)));
31
-	DEFINE( 'EOMODMAN_PATH_TO_MODULE', str_replace( str_replace( "\\", "/", WP_PLUGIN_DIR ), "", str_replace( "\\", "/", plugin_dir_path( __FILE__ ) ) ) );
32
-	DEFINE( 'EOMODMAN_PATH', str_replace( "\\", "/", plugin_dir_path( __FILE__ ) ) );
33
-	DEFINE( 'EOMODMAN_URL', str_replace( str_replace( "\\", "/", ABSPATH), site_url() . '/', EOMODMAN_PATH ) );
30
+	DEFINE('EOMODMAN_DIR', basename(dirname(__FILE__)));
31
+	DEFINE('EOMODMAN_PATH_TO_MODULE', str_replace(str_replace("\\", "/", WP_PLUGIN_DIR), "", str_replace("\\", "/", plugin_dir_path(__FILE__))));
32
+	DEFINE('EOMODMAN_PATH', str_replace("\\", "/", plugin_dir_path(__FILE__)));
33
+	DEFINE('EOMODMAN_URL', str_replace(str_replace("\\", "/", ABSPATH), site_url() . '/', EOMODMAN_PATH));
34 34
 
35 35
 	/**	Appel des traductions pour le module / Call translation for module	*/
36
-	load_plugin_textdomain( 'eo-modmanager-i18n', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
36
+	load_plugin_textdomain('eo-modmanager-i18n', false, dirname(plugin_basename(__FILE__)) . '/languages/');
37 37
 
38 38
 	/**	Définition du chemin absolu vers les templates / Define the templates absolute directories	*/
39
-	DEFINE( 'EOMODMAN_TEMPLATES_MAIN_DIR', EOMODMAN_PATH . '/templates/');
39
+	DEFINE('EOMODMAN_TEMPLATES_MAIN_DIR', EOMODMAN_PATH . '/templates/');
40 40
 
41
-	include( EOMODMAN_PATH . '/controller/module_management.ctr.php' );
42
-	$eo_module_management  = new eo_module_management();
41
+	include(EOMODMAN_PATH . '/controller/module_management.ctr.php');
42
+	$eo_module_management = new eo_module_management();
43 43
 
44 44
 	eo_module_management::core_util();
45 45
 
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
  * Plugin Name: Gestion des modules internes / Internal module management
4 6
  * Description: Permet d'activer ou de désactiver les différents modules internes présents dans le dossier modules / Allow to activate or deactivate internal modules present into modules directory
Please login to merge, or discard this patch.
core/module_management/templates/backend/settings.php 2 patches
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -1,72 +1,72 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 <ul class="module-list" >
4 4
 	<li class="module-list-header" >
5 5
 		<!--
6
-		<span class="module-cb" ><?php _e( 'Activ', 'eo-modmanager-i18n' ); ?></span>
6
+		<span class="module-cb" ><?php _e('Activ', 'eo-modmanager-i18n'); ?></span>
7 7
 		 -->
8
-		<span class="module-name" ><?php _e( 'Module name', 'eo-modmanager-i18n' ); ?></span>
9
-		<span class="module-name" ><?php _e( 'Module description', 'eo-modmanager-i18n' ); ?></span>
10
-		<span class="module-info" ><?php _e( 'Module info', 'eo-modmanager-i18n' ); ?></span>
8
+		<span class="module-name" ><?php _e('Module name', 'eo-modmanager-i18n'); ?></span>
9
+		<span class="module-name" ><?php _e('Module description', 'eo-modmanager-i18n'); ?></span>
10
+		<span class="module-info" ><?php _e('Module info', 'eo-modmanager-i18n'); ?></span>
11 11
 	</li>
12 12
 
13 13
 <?php $i = 0; ?>
14
-<?php foreach ( $parent_folder_content as $folder ) : ?>
15
-	<?php if ( $folder && ( substr( $folder, 0, 1) != '.' ) && file_exists( $module_folder . $folder . '/' . $folder . '.php') ) : ?>
14
+<?php foreach ($parent_folder_content as $folder) : ?>
15
+	<?php if ($folder && (substr($folder, 0, 1) != '.') && file_exists($module_folder . $folder . '/' . $folder . '.php')) : ?>
16 16
 	<?php
17 17
 		$is_activ = false;
18
-		if ( !empty( $module_option ) && ( array_key_exists( $folder, $module_option ) && ( 'on' == $module_option[ $folder ][ 'activated' ] ) ) ) {
18
+		if (!empty($module_option) && (array_key_exists($folder, $module_option) && ('on' == $module_option[$folder]['activated']))) {
19 19
 			$is_activ = true;
20 20
 		}
21
-		$module_datas = get_plugin_data( $module_folder . $folder . '/' . $folder . '.php' );
21
+		$module_datas = get_plugin_data($module_folder . $folder . '/' . $folder . '.php');
22 22
 
23 23
 		$module_id = 'module' . $folder;
24 24
 	?>
25
-	<li class="<?php echo ( $i == 0 ? "odd" : "even" ); ?>" >
25
+	<li class="<?php echo ($i == 0 ? "odd" : "even"); ?>" >
26 26
 		<!--
27 27
 		<span class="module-cb module-cb-<?php echo $folder; ?>" >
28 28
 			<input type="hidden" name="wpshop_modules[<?php echo $folder; ?>][old_activated]" value="<?php echo $is_activ ? 'on' : 'off'; ?>" />
29
-			<input id="<?php echo $module_id; ?>" type="checkbox" name="wpshop_modules[<?php echo $folder; ?>][activated]" value="on" <?php checked( true, $is_activ, true); ?> />
29
+			<input id="<?php echo $module_id; ?>" type="checkbox" name="wpshop_modules[<?php echo $folder; ?>][activated]" value="on" <?php checked(true, $is_activ, true); ?> />
30 30
 		</span>
31 31
 		 -->
32 32
 		<span class="module-name module-name-<?php echo $folder; ?>" >
33
-			<label for="<?php echo $module_id; ?>" ><?php echo !empty( $module_datas ) && !empty( $module_datas[ 'Name' ] ) ? $module_datas[ 'Name' ] : $folder; ?></label>
33
+			<label for="<?php echo $module_id; ?>" ><?php echo !empty($module_datas) && !empty($module_datas['Name']) ? $module_datas['Name'] : $folder; ?></label>
34 34
 		</span>
35 35
 		<span class="module-description" >
36
-			<?php echo !empty( $module_datas ) && !empty( $module_datas[ 'Description' ] ) ? $module_datas[ 'Description' ] : ''; ?><br/>
36
+			<?php echo !empty($module_datas) && !empty($module_datas['Description']) ? $module_datas['Description'] : ''; ?><br/>
37 37
 
38
-			<?php echo !empty( $module_datas ) && !empty( $module_datas[ 'Version' ] ) ? $module_datas[ 'Version' ] : __( 'Unknown version', 'eo-modmanager-i18n' ); ?> |
39
-			<?php echo !empty( $module_datas ) && !empty( $module_datas[ 'Author' ] ) ? $module_datas[ 'Author' ] : __( 'Unknown author', 'eo-modmanager-i18n' ); ?>
40
-			<?php if ( !empty( $module_datas ) && !empty( $module_datas[ 'PluginURI' ] ) ) : ?> |
41
-				<?php echo $module_datas[ 'Title' ]; ?>
38
+			<?php echo !empty($module_datas) && !empty($module_datas['Version']) ? $module_datas['Version'] : __('Unknown version', 'eo-modmanager-i18n'); ?> |
39
+			<?php echo !empty($module_datas) && !empty($module_datas['Author']) ? $module_datas['Author'] : __('Unknown author', 'eo-modmanager-i18n'); ?>
40
+			<?php if (!empty($module_datas) && !empty($module_datas['PluginURI'])) : ?> |
41
+				<?php echo $module_datas['Title']; ?>
42 42
 			<?php endif; ?>
43 43
 		</span>
44 44
 		<span class="module-info module-info-<?php echo $folder; ?>" >
45 45
 			<?php
46
-				if ( 'auto' != $module_option[ $folder ][ 'author_on' ] ) :
47
-					$user = get_userdata( $module_option[ $folder ][ 'author_on' ] );
46
+				if ('auto' != $module_option[$folder]['author_on']) :
47
+					$user = get_userdata($module_option[$folder]['author_on']);
48 48
 					$author = $user->display_name;
49 49
 				else :
50
-					$author = __( 'automatic activation', 'eo-modmanager-i18n' );
50
+					$author = __('automatic activation', 'eo-modmanager-i18n');
51 51
 				endif;
52
-				printf( __( 'Last activation made on %1$s by %2$s', 'eo-modmanager-i18n' ), mysql2date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $module_option[ $folder ][ 'date_on' ], true ), $author);
52
+				printf(__('Last activation made on %1$s by %2$s', 'eo-modmanager-i18n'), mysql2date(get_option('date_format') . ' ' . get_option('time_format'), $module_option[$folder]['date_on'], true), $author);
53 53
 			?>
54
-			<?php if ( !empty( $module_option[ $folder ][ 'date_off' ] ) ) : ?>
54
+			<?php if (!empty($module_option[$folder]['date_off'])) : ?>
55 55
 			<br/>
56 56
 			<?php
57
-				$user = get_userdata( $module_option[ $folder ][ 'author_off' ] );
57
+				$user = get_userdata($module_option[$folder]['author_off']);
58 58
 				$author = $user->display_name;
59
-				printf( __( 'Last deactivation made on %1$s by %2$s', 'eo-modmanager-i18n' ), mysql2date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $module_option[ $folder ][ 'date_off' ], true ), $author);
59
+				printf(__('Last deactivation made on %1$s by %2$s', 'eo-modmanager-i18n'), mysql2date(get_option('date_format') . ' ' . get_option('time_format'), $module_option[$folder]['date_off'], true), $author);
60 60
 			?>
61 61
 			<?php endif; ?>
62 62
 
63
-			<?php apply_filters( 'wps-addon-extra-info', $folder ); ?>
63
+			<?php apply_filters('wps-addon-extra-info', $folder); ?>
64 64
 		</span>
65 65
 	</li>
66 66
 	<?php endif; ?>
67 67
 	<?php
68 68
 		$i++;
69
-		if ( $i > 1 ) :
69
+		if ($i > 1) :
70 70
 			$i = 0;
71 71
 		endif;
72 72
 	?>
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 ?>
3 5
 <ul class="module-list" >
4 6
 	<li class="module-list-header" >
@@ -46,8 +48,10 @@  discard block
 block discarded – undo
46 48
 				if ( 'auto' != $module_option[ $folder ][ 'author_on' ] ) :
47 49
 					$user = get_userdata( $module_option[ $folder ][ 'author_on' ] );
48 50
 					$author = $user->display_name;
49
-				else :
51
+				else {
52
+					:
50 53
 					$author = __( 'automatic activation', 'eo-modmanager-i18n' );
54
+				}
51 55
 				endif;
52 56
 				printf( __( 'Last activation made on %1$s by %2$s', 'eo-modmanager-i18n' ), mysql2date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $module_option[ $folder ][ 'date_on' ], true ), $author);
53 57
 			?>
Please login to merge, or discard this patch.
includes/modules/wps_wishlist/controller/wps_wishlist_ctr.php 2 patches
Spacing   +29 added lines, -29 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
 class wps_wishlist {
4 4
 	public function __construct() {
@@ -6,30 +6,30 @@  discard block
 block discarded – undo
6 6
 		//add_filter(  );
7 7
 
8 8
 		/** Add action wp_enqueue_scripts */
9
-		add_action ( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
9
+		add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'));
10 10
 
11 11
 		/** Add action ajax wps-load-modal */
12
-		add_action ( 'wp_ajax_wps-load-modal', array( $this, 'ajax_load_modal' ) );
13
-		add_action ( 'wp_ajax_nopriv_wps-load-modal', array( $this, 'ajax_load_modal' ) );
12
+		add_action('wp_ajax_wps-load-modal', array($this, 'ajax_load_modal'));
13
+		add_action('wp_ajax_nopriv_wps-load-modal', array($this, 'ajax_load_modal'));
14 14
 
15 15
 		/** Add action wps-create-wishlist-and-add-product-to-it */
16
-		add_action ( 'wp_ajax_wps-create-wishlist-and-add-product-to-it', array( $this, 'ajax_create_wishlist_and_add_product' ) );
17
-		add_action ( 'wp_ajax_nopriv_wps-create-wishlist-and-add-product-to-it', array( $this, 'ajax_create_wishlist_and_add_product' ) );
16
+		add_action('wp_ajax_wps-create-wishlist-and-add-product-to-it', array($this, 'ajax_create_wishlist_and_add_product'));
17
+		add_action('wp_ajax_nopriv_wps-create-wishlist-and-add-product-to-it', array($this, 'ajax_create_wishlist_and_add_product'));
18 18
 
19 19
 		/** Add action wps-add-to-wishlist */
20
-		add_action ('wp_ajax_wps-add-to-wishlist', array( $this, 'ajax_create_wishlist_and_add_product' ) );
21
-		add_action ('wp_ajax_nopriv_wps-add-to-wishlist', array( $this, 'ajax_create_wishlist_and_add_product' ) );
20
+		add_action('wp_ajax_wps-add-to-wishlist', array($this, 'ajax_create_wishlist_and_add_product'));
21
+		add_action('wp_ajax_nopriv_wps-add-to-wishlist', array($this, 'ajax_create_wishlist_and_add_product'));
22 22
 
23 23
 		/** Add action wps-load-wishlist */
24
-		add_action ('wp_ajax_wps-load-wishlist', array( $this, 'ajax_load_wishlist' ) );
25
-		add_action ('wp_ajax_nopriv_wps-get-login-form', array( $this, 'ajax_get_login_form') );
24
+		add_action('wp_ajax_wps-load-wishlist', array($this, 'ajax_load_wishlist'));
25
+		add_action('wp_ajax_nopriv_wps-get-login-form', array($this, 'ajax_get_login_form'));
26 26
 
27 27
 		/** Filter for display frontend */
28
-		add_filter( 'wps_my_account_extra_part_menu', array( $this, 'add_customer_wishlist_menu' ) );
29
-		add_filter( 'wps_my_account_extra_panel_content', array( $this, 'add_customer_wishlist_content' ), 10, 2 );
28
+		add_filter('wps_my_account_extra_part_menu', array($this, 'add_customer_wishlist_menu'));
29
+		add_filter('wps_my_account_extra_panel_content', array($this, 'add_customer_wishlist_content'), 10, 2);
30 30
 
31
-		add_filter( 'wps-below-add-to-cart', array( $this, 'filter_button_add_to_wishlist') );
32
-		add_filter( 'the_content', array( $this, 'filter_content' ), 2 );
31
+		add_filter('wps-below-add-to-cart', array($this, 'filter_button_add_to_wishlist'));
32
+		add_filter('the_content', array($this, 'filter_content'), 2);
33 33
 
34 34
 
35 35
 	}
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
 		$response = array();
49 49
 
50
-		if(get_current_user_id() == 0)
50
+		if (get_current_user_id() == 0)
51 51
 			$response['need_login'] = true;
52 52
 
53 53
 		$response['title'] = __('My wishlist', 'wps_wishlist_i18n');
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 		$user_meta = get_user_meta(get_current_user_id(), 'wpshop_user_wishlist', true);
58 58
 
59 59
 		ob_start();
60
-		require_once( wpshop_tools::get_template_part( WPS_WISHLIST_DIR, WPS_WISHLIST_TEMPLATE_DIR, "frontend", "wishlist-render.tpl" ) );
60
+		require_once(wpshop_tools::get_template_part(WPS_WISHLIST_DIR, WPS_WISHLIST_TEMPLATE_DIR, "frontend", "wishlist-render.tpl"));
61 61
 		$response['content'] = ob_get_clean();
62 62
 
63 63
 		wp_die(json_encode($response));
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
 
66 66
 	public function ajax_create_wishlist_and_add_product() {
67 67
 		$user_meta = get_user_meta(get_current_user_id(), 'wpshop_user_wishlist', true);
68
-		$name_wishlist = !empty( $_POST['name_wishlist'] ) ? sanitize_text_field( $_POST['name_wishlist'] ) : '';
69
-		$post_id = !empty( $_POST['id'] ) ? (int) $_POST['id'] : 0;
68
+		$name_wishlist = !empty($_POST['name_wishlist']) ? sanitize_text_field($_POST['name_wishlist']) : '';
69
+		$post_id = !empty($_POST['id']) ? (int)$_POST['id'] : 0;
70 70
 
71
-		if(empty($user_meta[$name_wishlist]) || (!empty($user_meta[$name_wishlist]) && !in_array($post_id, $user_meta[$name_wishlist])))
71
+		if (empty($user_meta[$name_wishlist]) || (!empty($user_meta[$name_wishlist]) && !in_array($post_id, $user_meta[$name_wishlist])))
72 72
 			$user_meta[$name_wishlist][] = $post_id;
73 73
 
74 74
 		update_user_meta(get_current_user_id(), 'wpshop_user_wishlist', $user_meta);
@@ -79,8 +79,8 @@  discard block
 block discarded – undo
79 79
 	 *
80 80
 	 * @param string $content The current content passed through filter definition
81 81
 	 */
82
-	function add_customer_wishlist_menu( $content ) {
83
-		require_once( wpshop_tools::get_template_part( WPS_WISHLIST_DIR, WPS_WISHLIST_TEMPLATE_DIR, 'frontend/menu', "wishlist-menu.tpl") );
82
+	function add_customer_wishlist_menu($content) {
83
+		require_once(wpshop_tools::get_template_part(WPS_WISHLIST_DIR, WPS_WISHLIST_TEMPLATE_DIR, 'frontend/menu', "wishlist-menu.tpl"));
84 84
 	}
85 85
 
86 86
 	/**
@@ -91,14 +91,14 @@  discard block
 block discarded – undo
91 91
 	 *
92 92
 	 * @return string THe html output to display into customer account dashboard
93 93
 	 */
94
-	function add_customer_wishlist_content( $output, $dashboard_part ) {
95
-		if ( 'my-wishlist' == $dashboard_part ) {
94
+	function add_customer_wishlist_content($output, $dashboard_part) {
95
+		if ('my-wishlist' == $dashboard_part) {
96 96
 			/** Get wishlist list */
97 97
 			$wishlist_list = get_user_meta(get_current_user_id(), 'wpshop_user_wishlist', true);
98 98
 
99 99
 			/**	Output current customer associated tasks	*/
100 100
 			ob_start();
101
-			require_once( wpshop_tools::get_template_part( WPS_WISHLIST_DIR, WPS_WISHLIST_TEMPLATE_DIR, 'frontend/menu', "wishlist-render.tpl" ) );
101
+			require_once(wpshop_tools::get_template_part(WPS_WISHLIST_DIR, WPS_WISHLIST_TEMPLATE_DIR, 'frontend/menu', "wishlist-render.tpl"));
102 102
 			$output = ob_get_contents();
103 103
 			ob_end_clean();
104 104
 		}
@@ -117,14 +117,14 @@  discard block
 block discarded – undo
117 117
 		$post = get_posts(get_current_user_id(), array('post_type' => WPSHOP_NEWTYPE_IDENTIFIER_CUSTOMERS));
118 118
 		$id_customer = $post[0]->ID;
119 119
 
120
-		$name_wishlist = sanitize_text_field( $_POST['name_wishlist'] );
120
+		$name_wishlist = sanitize_text_field($_POST['name_wishlist']);
121 121
 
122 122
 		$name_user = wp_get_current_user();
123 123
 
124 124
 		ob_start();
125 125
 		$current_user = wp_get_current_user();
126 126
 		$name_user = $current_user->user_login;
127
-		require_once( wpshop_tools::get_template_part( WPS_WISHLIST_DIR, WPS_WISHLIST_TEMPLATE_DIR, 'frontend/menu', 'wishlist-list.tpl'));
127
+		require_once(wpshop_tools::get_template_part(WPS_WISHLIST_DIR, WPS_WISHLIST_TEMPLATE_DIR, 'frontend/menu', 'wishlist-list.tpl'));
128 128
 
129 129
 		wp_die(ob_get_clean());
130 130
 	}
@@ -145,9 +145,9 @@  discard block
 block discarded – undo
145 145
 
146 146
 	/** Add filter - content */
147 147
 	function filter_content($content) {
148
-		$name_wishlist = !empty( $_GET['name_wishlist'] ) ? sanitize_text_field( $_GET['name_wishlist'] ) : '';
148
+		$name_wishlist = !empty($_GET['name_wishlist']) ? sanitize_text_field($_GET['name_wishlist']) : '';
149 149
 		// If post type customers
150
-		if(WPSHOP_NEWTYPE_IDENTIFIER_CUSTOMERS == get_post_type(get_the_ID()) && !empty($name_wishlist)) {
150
+		if (WPSHOP_NEWTYPE_IDENTIFIER_CUSTOMERS == get_post_type(get_the_ID()) && !empty($name_wishlist)) {
151 151
 			$post = get_posts(get_the_ID(), array('post_type' => WPSHOP_NEWTYPE_IDENTIFIER_CUSTOMERS));
152 152
 			$id_customer = $post[0]->post_author;
153 153
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 			$products = new wpshop_products();
158 158
 
159 159
 			ob_start();
160
-			require_once( wpshop_tools::get_template_part( WPS_WISHLIST_DIR, WPS_WISHLIST_TEMPLATE_DIR, 'frontend/menu', 'wishlist-list.tpl'));
160
+			require_once(wpshop_tools::get_template_part(WPS_WISHLIST_DIR, WPS_WISHLIST_TEMPLATE_DIR, 'frontend/menu', 'wishlist-list.tpl'));
161 161
 
162 162
 			$content .= ob_get_clean();
163 163
 
Please login to merge, or discard this patch.
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 
3 5
 class wps_wishlist {
4 6
 	public function __construct() {
@@ -47,8 +49,9 @@  discard block
 block discarded – undo
47 49
 
48 50
 		$response = array();
49 51
 
50
-		if(get_current_user_id() == 0)
51
-			$response['need_login'] = true;
52
+		if(get_current_user_id() == 0) {
53
+					$response['need_login'] = true;
54
+		}
52 55
 
53 56
 		$response['title'] = __('My wishlist', 'wps_wishlist_i18n');
54 57
 
@@ -68,8 +71,9 @@  discard block
 block discarded – undo
68 71
 		$name_wishlist = !empty( $_POST['name_wishlist'] ) ? sanitize_text_field( $_POST['name_wishlist'] ) : '';
69 72
 		$post_id = !empty( $_POST['id'] ) ? (int) $_POST['id'] : 0;
70 73
 
71
-		if(empty($user_meta[$name_wishlist]) || (!empty($user_meta[$name_wishlist]) && !in_array($post_id, $user_meta[$name_wishlist])))
72
-			$user_meta[$name_wishlist][] = $post_id;
74
+		if(empty($user_meta[$name_wishlist]) || (!empty($user_meta[$name_wishlist]) && !in_array($post_id, $user_meta[$name_wishlist]))) {
75
+					$user_meta[$name_wishlist][] = $post_id;
76
+		}
73 77
 
74 78
 		update_user_meta(get_current_user_id(), 'wpshop_user_wishlist', $user_meta);
75 79
 	}
Please login to merge, or discard this patch.
includes/modules/wps_download_file/wps_download_file.php 2 patches
Spacing   +2 added lines, -2 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
 * Plugin force download
4 4
 *
@@ -8,5 +8,5 @@  discard block
 block discarded – undo
8 8
 * @subpackage includes
9 9
 */
10 10
 
11
-require_once( dirname( __FILE__ ) . '/controller/wps_download_file_ctr.php' );
11
+require_once(dirname(__FILE__) . '/controller/wps_download_file_ctr.php');
12 12
 new wps_download_file_ctr();
13 13
\ No newline at end of file
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
 * Plugin force download
4 6
 *
Please login to merge, or discard this patch.
includes/modules/wps_customer/controller/wps_customer_group.php 3 patches
Braces   +10 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 class wps_customer_group {
3 5
 	function __construct() {
4 6
 		add_action('admin_menu', array( $this, 'register_customer_groups_submenu' ) );
@@ -47,8 +49,9 @@  discard block
 block discarded – undo
47 49
 
48 50
 					// Redirect
49 51
 					wpshop_tools::wpshop_safe_redirect(admin_url('admin.php?page='.WPSHOP_NEWTYPE_IDENTIFIER_GROUP.'&action=edit&code='.$code));
52
+				} else {
53
+					echo __('This group already exist','wpshop');
50 54
 				}
51
-				else echo __('This group already exist','wpshop');
52 55
 			}
53 56
 			// EDITION
54 57
 			elseif (!empty($editrole) && !empty($code)) {
@@ -67,8 +70,9 @@  discard block
 block discarded – undo
67 70
 					$this->unaffectUsersToGroup($code); // !important
68 71
 					$this->affectUsersToGroup($code, $group_users);
69 72
 				}
73
+			} else {
74
+				wpshop_tools::wpshop_safe_redirect(admin_url('admin.php?page='.WPSHOP_NEWTYPE_IDENTIFIER_GROUP));
70 75
 			}
71
-			else wpshop_tools::wpshop_safe_redirect(admin_url('admin.php?page='.WPSHOP_NEWTYPE_IDENTIFIER_GROUP));
72 76
 		}
73 77
 	}
74 78
 
@@ -295,10 +299,8 @@  discard block
 block discarded – undo
295 299
 									}
296 300
 								}
297 301
 							}
298
-						}
299
-						else {wpshop_tools::wpshop_safe_redirect(admin_url('admin.php?page='.WPSHOP_NEWTYPE_IDENTIFIER_GROUP));exit;}
300
-					}
301
-					else {wpshop_tools::wpshop_safe_redirect(admin_url('admin.php?page='.WPSHOP_NEWTYPE_IDENTIFIER_GROUP));exit;}
302
+						} else {wpshop_tools::wpshop_safe_redirect(admin_url('admin.php?page='.WPSHOP_NEWTYPE_IDENTIFIER_GROUP));exit;}
303
+					} else {wpshop_tools::wpshop_safe_redirect(admin_url('admin.php?page='.WPSHOP_NEWTYPE_IDENTIFIER_GROUP));exit;}
302 304
 
303 305
 					break;
304 306
 
@@ -350,8 +352,7 @@  discard block
 block discarded – undo
350 352
 				</form>
351 353
 			';
352 354
 
353
-		}
354
-		else {
355
+		} else {
355 356
 
356 357
 
357 358
 			$wpshop_list_table = new wpshop_groups_custom_List_table();
Please login to merge, or discard this patch.
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
 	/**
76 76
 	 * Affecte des utilisateurs � un role
77
-	 * @param $code identifiant du role
77
+	 * @param string $code identifiant du role
78 78
 	 * @param $users liste d'utilisateurs a affecter
79 79
 	 */
80 80
 	function affectUsersToGroup($code, $users)
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
 	/**
101 101
 	 * D�saffecte des utilisateurs � un role
102
-	 * @param $code identifiant du role
102
+	 * @param string $code identifiant du role
103 103
 	 */
104 104
 	function unaffectUsersToGroup($code)
105 105
 	{
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
 	/**
127 127
 	 * Enregistre les metas pour un role donn�
128
-	 * @param $code identifiant du role
128
+	 * @param string $code identifiant du role
129 129
 	 * @param $desc description du role
130 130
 	 * @param $parent parent du role
131 131
 	 */
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 
165 165
 	/**
166 166
 	 * Enregistre les droits pour un role donn�
167
-	 * @param $code identifiant du role
167
+	 * @param string $code identifiant du role
168 168
 	 * @param $role identifiant du role actuel sur lequel le role est bas�
169 169
 	 * @param $newrole identifiant du role sur lequel le role doit etre bas�
170 170
 	 */
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 
196 196
 	/**
197 197
 	 * Retourne les infos sur le role donn�
198
-	 * @param $code identifiant du role
198
+	 * @param string $code identifiant du role
199 199
 	 */
200 200
 	function getRole($code)
201 201
 	{
Please login to merge, or discard this patch.
Spacing   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 class wps_customer_group {
3 3
 	function __construct() {
4
-		add_action('admin_menu', array( $this, 'register_customer_groups_submenu' ) );
4
+		add_action('admin_menu', array($this, 'register_customer_groups_submenu'));
5 5
 	}
6 6
 
7 7
 	function register_customer_groups_submenu() {
@@ -14,13 +14,13 @@  discard block
 block discarded – undo
14 14
 	 * Gérer les actions $_POST
15 15
 	 */
16 16
 	function manage_post() {
17
-		$addrole = !empty( $_POST['addrole'] ) ? sanitize_text_field( $_POST['addrole'] ) : '';
18
-		$editrole = !empty( $_POST['editrole'] ) ? sanitize_text_field( $_POST['editrole'] ) : '';
19
-		$group_name = !empty( $_POST['group-name'] ) ? sanitize_text_field( $_POST['group-name'] ) : '';
20
-		$group_parent = !empty( $_POST['group-parent'] ) ? sanitize_text_field( $_POST['group-parent'] ) : '';
21
-		$group_description = !empty( $_POST['group-description'] ) ? sanitize_text_field( $_POST['group-description'] ) : '';
22
-		$group_users = !empty( $_POST['group-users'] ) ? (array) $_POST['group-users'] : array();
23
-		$code = !empty( $_GET['code'] ) ? sanitize_text_field( $_GET['code'] ) : '';
17
+		$addrole = !empty($_POST['addrole']) ? sanitize_text_field($_POST['addrole']) : '';
18
+		$editrole = !empty($_POST['editrole']) ? sanitize_text_field($_POST['editrole']) : '';
19
+		$group_name = !empty($_POST['group-name']) ? sanitize_text_field($_POST['group-name']) : '';
20
+		$group_parent = !empty($_POST['group-parent']) ? sanitize_text_field($_POST['group-parent']) : '';
21
+		$group_description = !empty($_POST['group-description']) ? sanitize_text_field($_POST['group-description']) : '';
22
+		$group_users = !empty($_POST['group-users']) ? (array)$_POST['group-users'] : array();
23
+		$code = !empty($_GET['code']) ? sanitize_text_field($_GET['code']) : '';
24 24
 
25 25
 		if ((!empty($addrole) || !empty($editrole)) && !empty($group_name)) {
26 26
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 			// AJOUT
31 31
 			if (!empty($addrole)) {
32 32
 
33
-				$code = 'wpshop_'.str_replace('-', '_', sanitize_title($group_name));
33
+				$code = 'wpshop_' . str_replace('-', '_', sanitize_title($group_name));
34 34
 
35 35
 				// Si le role n'existe pas
36 36
 				if (!isset($roles[$code])) {
@@ -40,15 +40,15 @@  discard block
 block discarded – undo
40 40
 					add_role($code, sanitize_text_field($group_name), $rights);
41 41
 
42 42
 					// On enregistre les metas du groupe
43
-					$this->setGroupMetas($code, sanitize_text_field( $group_description ), sanitize_text_field( $group_parent ) );
43
+					$this->setGroupMetas($code, sanitize_text_field($group_description), sanitize_text_field($group_parent));
44 44
 
45 45
 					// On affecte des utilisateurs au role
46 46
 					$this->affectUsersToGroup($code, $group_users);
47 47
 
48 48
 					// Redirect
49
-					wpshop_tools::wpshop_safe_redirect(admin_url('admin.php?page='.WPSHOP_NEWTYPE_IDENTIFIER_GROUP.'&action=edit&code='.$code));
49
+					wpshop_tools::wpshop_safe_redirect(admin_url('admin.php?page=' . WPSHOP_NEWTYPE_IDENTIFIER_GROUP . '&action=edit&code=' . $code));
50 50
 				}
51
-				else echo __('This group already exist','wpshop');
51
+				else echo __('This group already exist', 'wpshop');
52 52
 			}
53 53
 			// EDITION
54 54
 			elseif (!empty($editrole) && !empty($code)) {
@@ -58,17 +58,17 @@  discard block
 block discarded – undo
58 58
 
59 59
 					$current_role = $this->getRole($code);
60 60
 
61
-					$this->setNewRoleRights($code, $current_role['parent'], sanitize_text_field( $group_parent ) );
61
+					$this->setNewRoleRights($code, $current_role['parent'], sanitize_text_field($group_parent));
62 62
 
63 63
 					// On enregistre les metas du groupe
64
-					$this->setGroupMetas($code, sanitize_text_field( $group_description ) , sanitize_text_field( $group_parent ) );
64
+					$this->setGroupMetas($code, sanitize_text_field($group_description), sanitize_text_field($group_parent));
65 65
 
66 66
 					// On affecte des utilisateurs au role
67 67
 					$this->unaffectUsersToGroup($code); // !important
68 68
 					$this->affectUsersToGroup($code, $group_users);
69 69
 				}
70 70
 			}
71
-			else wpshop_tools::wpshop_safe_redirect(admin_url('admin.php?page='.WPSHOP_NEWTYPE_IDENTIFIER_GROUP));
71
+			else wpshop_tools::wpshop_safe_redirect(admin_url('admin.php?page=' . WPSHOP_NEWTYPE_IDENTIFIER_GROUP));
72 72
 		}
73 73
 	}
74 74
 
@@ -110,11 +110,11 @@  discard block
 block discarded – undo
110 110
 		if (isset($roles[$code])) {
111 111
 			$wps_customer_mdl = new wps_customer_mdl();
112 112
 			$users = $wps_customer_mdl->getUserList();
113
-			if( !empty($users) ) {
114
-				foreach($users as $user) {
113
+			if (!empty($users)) {
114
+				foreach ($users as $user) {
115 115
 					$u = new WP_User($user->ID);
116 116
 					// Si l'utilisateur poss�de le role, on le retire de sa liste de droits
117
-					if (isset($u->roles[0]) && $u->roles[0]==$code) {
117
+					if (isset($u->roles[0]) && $u->roles[0] == $code) {
118 118
 						$u->remove_role($u->roles[0]);
119 119
 						$u->add_role('subscriber');
120 120
 					}
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 			// On retire les anciens droits
178 178
 			$rights = $this->getRoleRights($role);
179 179
 			if (!empty($rights)) {
180
-				foreach($rights as $c => $b) {
180
+				foreach ($rights as $c => $b) {
181 181
 					$wp_roles->remove_cap($code, $c);
182 182
 				}
183 183
 			}
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 			// On ajoute les nouveaux droits
186 186
 			$rights = $this->getRoleRights($newrole);
187 187
 			if (!empty($rights)) {
188
-				foreach($rights as $c => $b) {
188
+				foreach ($rights as $c => $b) {
189 189
 					$wp_roles->add_cap($code, $c);
190 190
 				}
191 191
 			}
@@ -226,22 +226,22 @@  discard block
 block discarded – undo
226 226
 		self::manage_post();
227 227
 
228 228
 		ob_start();
229
-		wpshop_display::displayPageHeader(__('Groups', 'wpshop'), '', __('Groups', 'wpshop'), __('Groups', 'wpshop'), true, 'admin.php?page='.WPSHOP_NEWTYPE_IDENTIFIER_GROUP.'&action=add', '');
229
+		wpshop_display::displayPageHeader(__('Groups', 'wpshop'), '', __('Groups', 'wpshop'), __('Groups', 'wpshop'), true, 'admin.php?page=' . WPSHOP_NEWTYPE_IDENTIFIER_GROUP . '&action=add', '');
230 230
 		$content = ob_get_contents();
231 231
 		ob_end_clean();
232 232
 		$wps_customer_mdl = new wps_customer_mdl();
233
-		$action = !empty( $_GET['action'] ) ? sanitize_text_field( $_GET['action'] ) : '';
234
-		$code = !empty( $_GET['code'] ) ? sanitize_text_field( $_GET['code'] ) : '';
233
+		$action = !empty($_GET['action']) ? sanitize_text_field($_GET['action']) : '';
234
+		$code = !empty($_GET['code']) ? sanitize_text_field($_GET['code']) : '';
235 235
 		// Si on re�oit une action
236
-		if ( !empty( $action ) ) {
236
+		if (!empty($action)) {
237 237
 
238 238
 			$readonly_name_field = '';
239 239
 
240
-			switch ( $action ) {
240
+			switch ($action) {
241 241
 
242 242
 				case 'delete':
243 243
 
244
-					if ( !empty( $code ) ) {
244
+					if (!empty($code)) {
245 245
 
246 246
 						$roles = get_option('wp_user_roles', array());
247 247
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 						}
253 253
 					}
254 254
 
255
-					wpshop_tools::wpshop_safe_redirect(admin_url('admin.php?page='.WPSHOP_NEWTYPE_IDENTIFIER_GROUP));
255
+					wpshop_tools::wpshop_safe_redirect(admin_url('admin.php?page=' . WPSHOP_NEWTYPE_IDENTIFIER_GROUP));
256 256
 
257 257
 					break;
258 258
 
@@ -269,36 +269,36 @@  discard block
 block discarded – undo
269 269
 							$group_name = $role['name'];
270 270
 							$group_description = $role['description'];
271 271
 							$group_parent = $role['parent'];
272
-							$submit_button_value = __('Edit the group','wpshop');
272
+							$submit_button_value = __('Edit the group', 'wpshop');
273 273
 							$submit_button_name = 'editrole';
274 274
 
275 275
 							// ROLES
276 276
 							$roles = get_option('wp_user_roles', array());
277 277
 							$select_parent = '<option value="">--</option>';
278 278
 
279
-							foreach($roles as $code => $role) {
279
+							foreach ($roles as $code => $role) {
280 280
 								if ($code != $code) {
281
-									$selected = $group_parent==$code ? 'selected' : '';
282
-									$select_parent .= '<option value="'.$code.'" '.$selected.'>'.$role['name'].'</option>';
281
+									$selected = $group_parent == $code ? 'selected' : '';
282
+									$select_parent .= '<option value="' . $code . '" ' . $selected . '>' . $role['name'] . '</option>';
283 283
 								}
284 284
 							}
285 285
 
286 286
 							// USERS
287 287
 							$users = $wps_customer_mdl->getUserList();
288
-							if( !empty($users) ) {
288
+							if (!empty($users)) {
289 289
 								$select_users = '';
290
-								foreach($users as $user) {
290
+								foreach ($users as $user) {
291 291
 									if ($user->ID != 1) {
292 292
 										$u = new WP_User($user->ID);
293
-										$selected = isset($u->roles[0]) && $u->roles[0]==$code ? 'selected' : '';
294
-										$select_users .= '<option value="'.$user->ID.'" '.$selected.'>'.$user->user_login.'</option>';
293
+										$selected = isset($u->roles[0]) && $u->roles[0] == $code ? 'selected' : '';
294
+										$select_users .= '<option value="' . $user->ID . '" ' . $selected . '>' . $user->user_login . '</option>';
295 295
 									}
296 296
 								}
297 297
 							}
298 298
 						}
299
-						else {wpshop_tools::wpshop_safe_redirect(admin_url('admin.php?page='.WPSHOP_NEWTYPE_IDENTIFIER_GROUP));exit;}
299
+						else {wpshop_tools::wpshop_safe_redirect(admin_url('admin.php?page=' . WPSHOP_NEWTYPE_IDENTIFIER_GROUP)); exit; }
300 300
 					}
301
-					else {wpshop_tools::wpshop_safe_redirect(admin_url('admin.php?page='.WPSHOP_NEWTYPE_IDENTIFIER_GROUP));exit;}
301
+					else {wpshop_tools::wpshop_safe_redirect(admin_url('admin.php?page=' . WPSHOP_NEWTYPE_IDENTIFIER_GROUP)); exit; }
302 302
 
303 303
 					break;
304 304
 
@@ -306,23 +306,23 @@  discard block
 block discarded – undo
306 306
 
307 307
 
308 308
 					$group_name = $group_description = '';
309
-					$submit_button_value = __('Create the group','wpshop');
309
+					$submit_button_value = __('Create the group', 'wpshop');
310 310
 					$submit_button_name = 'addrole';
311 311
 
312 312
 					// ROLES
313 313
 					$roles = get_option('wp_user_roles', array());
314
-					$select_parent = '<option value="">--</option>';;
315
-					foreach($roles as $code => $role) {
316
-						$select_parent .= '<option value="'.$code.'">'.$role['name'].'</option>';
314
+					$select_parent = '<option value="">--</option>'; ;
315
+					foreach ($roles as $code => $role) {
316
+						$select_parent .= '<option value="' . $code . '">' . $role['name'] . '</option>';
317 317
 					}
318 318
 
319 319
 					// USERS
320 320
 					$users = $wps_customer_mdl->getUserList();
321 321
 					$select_users = '';
322
-					if( !empty($users) ) {
323
-						foreach($users as $user) {
322
+					if (!empty($users)) {
323
+						foreach ($users as $user) {
324 324
 							if ($user->ID != 1) {
325
-								$select_users .= '<option value="'.$user->ID.'">'.$user->user_login.'</option>';
325
+								$select_users .= '<option value="' . $user->ID . '">' . $user->user_login . '</option>';
326 326
 							}
327 327
 						}
328 328
 					}
@@ -332,21 +332,21 @@  discard block
 block discarded – undo
332 332
 
333 333
 			$content .= '
334 334
 				<form method="post">
335
-					<label>'.__('Name','wpshop').'</label><br /><input type="text" name="group-name" style="width:500px;" value="'.$group_name.'" '.$readonly_name_field.' /><br /><br />
335
+					<label>'.__('Name', 'wpshop') . '</label><br /><input type="text" name="group-name" style="width:500px;" value="' . $group_name . '" ' . $readonly_name_field . ' /><br /><br />
336 336
 
337
-					<label>'.__('Parent','wpshop').'</label><br />
337
+					<label>'.__('Parent', 'wpshop') . '</label><br />
338 338
 					<select name="group-parent" class="chosen_select" style="width:500px;">
339
-						'.$select_parent.'
339
+						'.$select_parent . '
340 340
 					</select><br /><br />
341 341
 
342
-					<label>'.__('Users','wpshop').'</label><br />
342
+					<label>'.__('Users', 'wpshop') . '</label><br />
343 343
 					<select name="group-users[]" class="chosen_select" multiple style="width:500px;">
344
-						'.$select_users.'
344
+						'.$select_users . '
345 345
 					</select><br /><br />
346 346
 
347
-					<label>'.__('Description','wpshop').'</label><br /><textarea name="group-description" style="width:500px;">'.$group_description.'</textarea><br /><br />
347
+					<label>'.__('Description', 'wpshop') . '</label><br /><textarea name="group-description" style="width:500px;">' . $group_description . '</textarea><br /><br />
348 348
 
349
-					<input type="submit" class="button-primary" name="'.$submit_button_name.'" value="'.$submit_button_value.'" /> &nbsp;&nbsp;&nbsp; <a href="admin.php?page='.WPSHOP_NEWTYPE_IDENTIFIER_GROUP.'">'.__('Cancel','wpshop').'</a>
349
+					<input type="submit" class="button-primary" name="'.$submit_button_name . '" value="' . $submit_button_value . '" /> &nbsp;&nbsp;&nbsp; <a href="admin.php?page=' . WPSHOP_NEWTYPE_IDENTIFIER_GROUP . '">' . __('Cancel', 'wpshop') . '</a>
350 350
 				</form>
351 351
 			';
352 352
 
@@ -356,32 +356,32 @@  discard block
 block discarded – undo
356 356
 
357 357
 			$wpshop_list_table = new wpshop_groups_custom_List_table();
358 358
 			//Fetch, prepare, sort, and filter our data...
359
-			$status="'valid'";
360
-			$attribute_status = !empty( $_REQUEST['attribute_status'] ) ? sanitize_text_field( $_REQUEST['attribute_status'] ) : '';
361
-			$orderby = !empty( $_REQUEST['orderby'] ) ? sanitize_text_field( $_REQUEST['orderby'] ) : '';
362
-			$order = !empty( $_REQUEST['order'] ) ? sanitize_text_field( $_REQUEST['order'] ) : '';
363
-			if(!empty($attribute_status)){
364
-				switch($attribute_status){
359
+			$status = "'valid'";
360
+			$attribute_status = !empty($_REQUEST['attribute_status']) ? sanitize_text_field($_REQUEST['attribute_status']) : '';
361
+			$orderby = !empty($_REQUEST['orderby']) ? sanitize_text_field($_REQUEST['orderby']) : '';
362
+			$order = !empty($_REQUEST['order']) ? sanitize_text_field($_REQUEST['order']) : '';
363
+			if (!empty($attribute_status)) {
364
+				switch ($attribute_status) {
365 365
 					case 'unactive':
366
-						$status="'moderated', 'notused'";
367
-						if(empty($orderby) && empty($order)){
368
-							$orderby ='status';
369
-							$order ='asc';
366
+						$status = "'moderated', 'notused'";
367
+						if (empty($orderby) && empty($order)) {
368
+							$orderby = 'status';
369
+							$order = 'asc';
370 370
 						}
371 371
 						break;
372 372
 					default:
373
-						$status="'".$attribute_status."'";
373
+						$status = "'" . $attribute_status . "'";
374 374
 						break;
375 375
 				}
376 376
 			}
377 377
 
378 378
 			$roles = get_option('wp_user_roles', array());
379 379
 
380
-			$i=0;
381
-			$attribute_set_list=array();
382
-			$group_not_to_display = array('administrator','editor','author','contributor','subscriber');
380
+			$i = 0;
381
+			$attribute_set_list = array();
382
+			$group_not_to_display = array('administrator', 'editor', 'author', 'contributor', 'subscriber');
383 383
 			$wpshop_groups_meta = get_option('wpshop_groups_meta', array());
384
-			foreach($roles as $code => $role) {
384
+			foreach ($roles as $code => $role) {
385 385
 				if (!in_array($code, $group_not_to_display)) {
386 386
 					$description = !empty($wpshop_groups_meta[$code]['description']) ? $wpshop_groups_meta[$code]['description'] : '--';
387 387
 					$attribute_set_list[$i]['name'] = $role['name'];
Please login to merge, or discard this patch.
includes/modules/wps_installer/templates/backend/about.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 
3
-$sub_page = !empty( $_GET['sub-page'] ) ? sanitize_text_field( $_GET['sub-page'] ) : '';
3
+$sub_page = !empty($_GET['sub-page']) ? sanitize_text_field($_GET['sub-page']) : '';
4 4
 
5 5
 ?>
6 6
 <div class="wrap about-wrap wps-about-wrap">
7
-	<h1><?php _e( 'Welcome to WPShop', 'wpshop'); ?></h1>
8
-	<div class="about-text"><?php _e( 'Thanks for using WPShop as your online shop solution. We hope that you will enjoy the features we develop for you.', 'wpshop'); ?></div>
9
-	<div class="wp-badge" ><?php printf( __( 'Version %s', 'wpshop'), WPSHOP_VERSION ); ?></div>
7
+	<h1><?php _e('Welcome to WPShop', 'wpshop'); ?></h1>
8
+	<div class="about-text"><?php _e('Thanks for using WPShop as your online shop solution. We hope that you will enjoy the features we develop for you.', 'wpshop'); ?></div>
9
+	<div class="wp-badge" ><?php printf(__('Version %s', 'wpshop'), WPSHOP_VERSION); ?></div>
10 10
 
11 11
 	<h2 class="nav-tab-wrapper">
12
-		<a class="nav-tab<?php echo !empty( $sub_page ) ? ' nav-tab-active' : ''; ?>" href="<?php echo admin_url( "admin.php?page=wpshop_about" ); ?>"><?php _e( 'Introduction to WPShop', 'wpshop'); ?></a>
12
+		<a class="nav-tab<?php echo !empty($sub_page) ? ' nav-tab-active' : ''; ?>" href="<?php echo admin_url("admin.php?page=wpshop_about"); ?>"><?php _e('Introduction to WPShop', 'wpshop'); ?></a>
13 13
 		<!--
14
-			<a class="nav-tab<?php echo ( !empty( $sub_page ) && ( "credits" == $sub_page ) ? ' nav-tab-active' : '' ); ?>" href="<?php echo admin_url( "admin.php?page=wpshop_about&sub-page=credits" ); ?>"><?php _e( 'Credits', 'wpshop'); ?></a>
14
+			<a class="nav-tab<?php echo (!empty($sub_page) && ("credits" == $sub_page) ? ' nav-tab-active' : ''); ?>" href="<?php echo admin_url("admin.php?page=wpshop_about&sub-page=credits"); ?>"><?php _e('Credits', 'wpshop'); ?></a>
15 15
 		 -->
16 16
 	</h2>
17 17
 
18 18
 <?php $about_sub_page = ''; ?>
19
-<?php if ( !empty( $sub_page ) ) : ?>
20
-	<?php $about_sub_page = sanitize_text_field( $sub_page ); ?>
19
+<?php if (!empty($sub_page)) : ?>
20
+	<?php $about_sub_page = sanitize_text_field($sub_page); ?>
21 21
 <?php else : ?>
22 22
 	<?php $about_sub_page = 'introduction'; ?>
23 23
 <?php endif; ?>
24 24
 
25
-<?php if ( !empty( $about_sub_page ) ) : ?>
26
-	<?php require( wpshop_tools::get_template_part( WPS_INSTALLER_DIR, WPSINSTALLER_TPL_DIR, "backend", "about", $about_sub_page ) ); ?>
25
+<?php if (!empty($about_sub_page)) : ?>
26
+	<?php require(wpshop_tools::get_template_part(WPS_INSTALLER_DIR, WPSINSTALLER_TPL_DIR, "backend", "about", $about_sub_page)); ?>
27 27
 <?php endif; ?>
28 28
 
29 29
 </div>
Please login to merge, or discard this patch.
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 
3 5
 $sub_page = !empty( $_GET['sub-page'] ) ? sanitize_text_field( $_GET['sub-page'] ) : '';
4 6
 
@@ -18,8 +20,11 @@  discard block
 block discarded – undo
18 20
 <?php $about_sub_page = ''; ?>
19 21
 <?php if ( !empty( $sub_page ) ) : ?>
20 22
 	<?php $about_sub_page = sanitize_text_field( $sub_page ); ?>
21
-<?php else : ?>
22
-	<?php $about_sub_page = 'introduction'; ?>
23
+<?php else {
24
+	: ?>
25
+	<?php $about_sub_page = 'introduction';
26
+}
27
+?>
23 28
 <?php endif; ?>
24 29
 
25 30
 <?php if ( !empty( $about_sub_page ) ) : ?>
Please login to merge, or discard this patch.