Completed
Pull Request — master (#2)
by Jimmy
1003:35 queued 970:52
created
includes/modules/wps_dashboard/controller/wps_dashboard_ctr.php 2 patches
Spacing   +28 added lines, -28 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
  * File for installer control class definition
4 4
  *
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	}
25 25
 
26 26
 	function add_scripts() {
27
-		add_action( 'admin_print_scripts', array($this, 'admin_print_script') );
27
+		add_action('admin_print_scripts', array($this, 'admin_print_script'));
28 28
 	}
29 29
 	
30 30
 	function admin_print_script() {
@@ -44,16 +44,16 @@  discard block
 block discarded – undo
44 44
 	function display_dashboard() {
45 45
 		global $order_status, $wpdb;
46 46
 
47
-		require_once( wpshop_tools::get_template_part( WPS_DASHBOARD_DIR, WPSDASHBOARD_TPL_DIR, "backend", "dashboard" ) );
47
+		require_once(wpshop_tools::get_template_part(WPS_DASHBOARD_DIR, WPSDASHBOARD_TPL_DIR, "backend", "dashboard"));
48 48
 	}
49 49
 
50 50
 
51 51
 	function wpshop_dashboard_orders() {
52 52
 		$output = '';
53
-		$orders = get_posts( array( 'posts_per_page' => 10, 'post_type' => WPSHOP_NEWTYPE_IDENTIFIER_ORDER, 'post_status' => 'publish', 'orderby' => 'post_date', 'order' => 'DESC') );
53
+		$orders = get_posts(array('posts_per_page' => 10, 'post_type' => WPSHOP_NEWTYPE_IDENTIFIER_ORDER, 'post_status' => 'publish', 'orderby' => 'post_date', 'order' => 'DESC'));
54 54
 		// Display orders
55 55
 		ob_start();
56
-		require_once( wpshop_tools::get_template_part( WPS_DASHBOARD_DIR, WPSDASHBOARD_TPL_DIR, "backend", "wps_orders_on_dashboard" ) );
56
+		require_once(wpshop_tools::get_template_part(WPS_DASHBOARD_DIR, WPSDASHBOARD_TPL_DIR, "backend", "wps_orders_on_dashboard"));
57 57
 		$output = ob_get_contents();
58 58
 		ob_end_clean();
59 59
 		
@@ -64,24 +64,24 @@  discard block
 block discarded – undo
64 64
 
65 65
 	function wpshop_rss_feed() {
66 66
 		$output = '';
67
-		include_once( ABSPATH . WPINC . '/feed.php' );
67
+		include_once(ABSPATH . WPINC . '/feed.php');
68 68
 
69
-		$rss = fetch_feed( 'http://www.wpshop.fr/feed/' );
70
-		if( ! is_wp_error( $rss ) ){
71
-			$maxitems = $rss->get_item_quantity( 4 );
72
-			$rss_items = $rss->get_items( 0, $maxitems );
69
+		$rss = fetch_feed('http://www.wpshop.fr/feed/');
70
+		if (!is_wp_error($rss)) {
71
+			$maxitems = $rss->get_item_quantity(4);
72
+			$rss_items = $rss->get_items(0, $maxitems);
73 73
 		}
74 74
 		else {
75 75
 			$output .= '<p>' . __('WPShop News cannot be loaded', 'wpshop') . '</p>';
76 76
 		}
77 77
 
78
-		if ( $maxitems == 0 ) {
78
+		if ($maxitems == 0) {
79 79
 			$output .= '<p>' . __('No WPShop new has been found', 'wpshop') . '</p>';
80 80
 		}
81 81
 		else {
82 82
 			$output .= '<ul class="recent-orders">';
83
-			foreach ( $rss_items as $item ) {
84
-				$output .= '<li><a href="' .$item->get_permalink() . '" title="' .$item->get_title(). '" target="_blank">' .$item->get_title(). '</a><br/>';
83
+			foreach ($rss_items as $item) {
84
+				$output .= '<li><a href="' . $item->get_permalink() . '" title="' . $item->get_title() . '" target="_blank">' . $item->get_title() . '</a><br/>';
85 85
 				$output .= $item->get_content();
86 86
 				$output .= '</li>';
87 87
 			}
@@ -92,40 +92,40 @@  discard block
 block discarded – undo
92 92
 
93 93
 
94 94
 	function wpshop_rss_tutorial_videos() {
95
-		$ini_get_checking = ini_get( 'allow_url_fopen' );
95
+		$ini_get_checking = ini_get('allow_url_fopen');
96 96
 
97
-		if ( $ini_get_checking != 0 ) {
98
-			$content = @file_get_contents( 'http://www.wpshop.fr/rss_video.xml' );
99
-			$videos_rss = ( $content !== false ) ? new SimpleXmlElement( $content ) : null;
100
-			if ( !empty($videos_rss) && !empty($videos_rss->channel) ) {
97
+		if ($ini_get_checking != 0) {
98
+			$content = @file_get_contents('http://www.wpshop.fr/rss_video.xml');
99
+			$videos_rss = ($content !== false) ? new SimpleXmlElement($content) : null;
100
+			if (!empty($videos_rss) && !empty($videos_rss->channel)) {
101 101
 				$videos_items = array();
102
-				foreach( $videos_rss->channel->item as $i => $item ) {
102
+				foreach ($videos_rss->channel->item as $i => $item) {
103 103
 					$videos_items[] = $item;
104 104
 				}
105
-				$rand_element = array_rand( $videos_items );
105
+				$rand_element = array_rand($videos_items);
106 106
 
107 107
 				ob_start();
108
-				require_once( wpshop_tools::get_template_part( WPS_DASHBOARD_DIR, WPSDASHBOARD_TPL_DIR, "backend", "dashboard", "videos" ) );
108
+				require_once(wpshop_tools::get_template_part(WPS_DASHBOARD_DIR, WPSDASHBOARD_TPL_DIR, "backend", "dashboard", "videos"));
109 109
 				$output = ob_get_contents();
110 110
 				ob_end_clean();
111 111
 			}
112 112
 			else {
113
-				$output = __('No tutorial videos can be loaded', 'wpshop' );
113
+				$output = __('No tutorial videos can be loaded', 'wpshop');
114 114
 			}
115 115
 		}
116 116
 		else {
117
-			$output = __( 'Your servor doesn\'t allow to open external files', 'wpshop');
117
+			$output = __('Your servor doesn\'t allow to open external files', 'wpshop');
118 118
 		}
119 119
 
120 120
 		echo $output;
121 121
 	}
122 122
 
123 123
 	function wpshop_dashboard_get_changelog() {
124
-		$readme_file = fopen( WPSHOP_DIR.'/readme.txt', 'r' );
125
-		if ( $readme_file ) {
126
-			$txt = file_get_contents( WPSHOP_DIR.'/readme.txt' );
127
-			$pre_change_log = explode( '== Changelog ==', $txt );
128
-			$versions = explode( '= Version', $pre_change_log[1] );
124
+		$readme_file = fopen(WPSHOP_DIR . '/readme.txt', 'r');
125
+		if ($readme_file) {
126
+			$txt = file_get_contents(WPSHOP_DIR . '/readme.txt');
127
+			$pre_change_log = explode('== Changelog ==', $txt);
128
+			$versions = explode('= Version', $pre_change_log[1]);
129 129
 
130 130
 			echo $versions[1];
131 131
 		}
Please login to merge, or discard this patch.
Braces   +7 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
 /**
3 5
  * File for installer control class definition
4 6
  *
@@ -70,15 +72,13 @@  discard block
 block discarded – undo
70 72
 		if( ! is_wp_error( $rss ) ){
71 73
 			$maxitems = $rss->get_item_quantity( 4 );
72 74
 			$rss_items = $rss->get_items( 0, $maxitems );
73
-		}
74
-		else {
75
+		} else {
75 76
 			$output .= '<p>' . __('WPShop News cannot be loaded', 'wpshop') . '</p>';
76 77
 		}
77 78
 
78 79
 		if ( $maxitems == 0 ) {
79 80
 			$output .= '<p>' . __('No WPShop new has been found', 'wpshop') . '</p>';
80
-		}
81
-		else {
81
+		} else {
82 82
 			$output .= '<ul class="recent-orders">';
83 83
 			foreach ( $rss_items as $item ) {
84 84
 				$output .= '<li><a href="' .$item->get_permalink() . '" title="' .$item->get_title(). '" target="_blank">' .$item->get_title(). '</a><br/>';
@@ -108,12 +108,10 @@  discard block
 block discarded – undo
108 108
 				require_once( wpshop_tools::get_template_part( WPS_DASHBOARD_DIR, WPSDASHBOARD_TPL_DIR, "backend", "dashboard", "videos" ) );
109 109
 				$output = ob_get_contents();
110 110
 				ob_end_clean();
111
-			}
112
-			else {
111
+			} else {
113 112
 				$output = __('No tutorial videos can be loaded', 'wpshop' );
114 113
 			}
115
-		}
116
-		else {
114
+		} else {
117 115
 			$output = __( 'Your servor doesn\'t allow to open external files', 'wpshop');
118 116
 		}
119 117
 
Please login to merge, or discard this patch.
modules/wps_dashboard/templates/backend/wps_orders_on_dashboard.php 2 patches
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -1,46 +1,46 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
2
-if($orders) : 
3
-	$payment_status = unserialize( WPSHOP_ORDER_STATUS );
1
+<?php if (!defined('ABSPATH')) exit;
2
+if ($orders) : 
3
+	$payment_status = unserialize(WPSHOP_ORDER_STATUS);
4 4
 ?>
5 5
 <div class="wps-table">
6 6
 	<div class="wps-table-header wps-table-row">
7
-		<div class="wps-table-cell"><?php _e( 'Date', 'wpshop'); ?></div>
8
-		<div class="wps-table-cell"><?php _e( 'Customer', 'wpshop'); ?></div>
9
-		<div class="wps-table-cell"><?php _e( 'Total', 'wpshop'); ?></div>
10
-		<div class="wps-table-cell"><?php _e( 'Status', 'wpshop'); ?></div>
11
-		<div class="wps-table-cell"><?php _e( 'Details', 'wpshop'); ?></div>
12
-		<div class="wps-table-cell"><?php _e( 'Invoice', 'wpshop'); ?></div>
13
-		<div class="wps-table-cell"><?php _e( 'Shipping Slip', 'wpshop'); ?></div>
7
+		<div class="wps-table-cell"><?php _e('Date', 'wpshop'); ?></div>
8
+		<div class="wps-table-cell"><?php _e('Customer', 'wpshop'); ?></div>
9
+		<div class="wps-table-cell"><?php _e('Total', 'wpshop'); ?></div>
10
+		<div class="wps-table-cell"><?php _e('Status', 'wpshop'); ?></div>
11
+		<div class="wps-table-cell"><?php _e('Details', 'wpshop'); ?></div>
12
+		<div class="wps-table-cell"><?php _e('Invoice', 'wpshop'); ?></div>
13
+		<div class="wps-table-cell"><?php _e('Shipping Slip', 'wpshop'); ?></div>
14 14
 	</div>
15
-	<?php foreach( $orders as $order ) : 
16
-		$order_meta = get_post_meta( $order->ID, '_order_postmeta', true );
17
-		$order_info = get_post_meta( $order->ID, '_order_info', true );
18
-		if ( !empty($order_meta) ) :
15
+	<?php foreach ($orders as $order) : 
16
+		$order_meta = get_post_meta($order->ID, '_order_postmeta', true);
17
+		$order_info = get_post_meta($order->ID, '_order_info', true);
18
+		if (!empty($order_meta)) :
19 19
 	?>
20 20
 			<div class="wps-table-content wps-table-row">
21
-				<div class="wps-table-cell"><?php echo ( !empty($order_meta['order_date']) ) ? mysql2date('d F Y', $order_meta['order_date'], true) : ''; ?></div>
22
-				<div class="wps-table-cell"><?php echo ( !empty($order_info) && !empty($order_info['billing']) && !empty($order_info['billing']['address']) && !empty($order_info['billing']['address']['address_last_name']) && !empty($order_info['billing']['address']['address_first_name']) ) ? $order_info['billing']['address']['address_first_name'].' '.$order_info['billing']['address']['address_last_name'] : ''; ?></div>
23
-				<div class="wps-table-cell"><?php echo ( !empty($order_meta['order_grand_total']) ) ? number_format( $order_meta['order_grand_total'], 2, '.', '' ).' '.wpshop_tools::wpshop_get_currency( false ) : ''; ?></div>
24
-				<div class="wps-table-cell wps_dashboard_<?php echo $order_meta['order_status']; ?>"><?php _e($payment_status[ $order_meta['order_status'] ], 'wpshop' ) ?></div>
25
-				<div class="wps-table-cell"><a href="<?php echo admin_url('/post.php?post=' .$order->ID. '&action=edit'); ?>" role="button" class="wps-bton-first-mini-rounded"><?php _e( 'See', 'wpshop' ); ?></a></div>
21
+				<div class="wps-table-cell"><?php echo (!empty($order_meta['order_date'])) ? mysql2date('d F Y', $order_meta['order_date'], true) : ''; ?></div>
22
+				<div class="wps-table-cell"><?php echo (!empty($order_info) && !empty($order_info['billing']) && !empty($order_info['billing']['address']) && !empty($order_info['billing']['address']['address_last_name']) && !empty($order_info['billing']['address']['address_first_name'])) ? $order_info['billing']['address']['address_first_name'] . ' ' . $order_info['billing']['address']['address_last_name'] : ''; ?></div>
23
+				<div class="wps-table-cell"><?php echo (!empty($order_meta['order_grand_total'])) ? number_format($order_meta['order_grand_total'], 2, '.', '') . ' ' . wpshop_tools::wpshop_get_currency(false) : ''; ?></div>
24
+				<div class="wps-table-cell wps_dashboard_<?php echo $order_meta['order_status']; ?>"><?php _e($payment_status[$order_meta['order_status']], 'wpshop') ?></div>
25
+				<div class="wps-table-cell"><a href="<?php echo admin_url('/post.php?post=' . $order->ID . '&action=edit'); ?>" role="button" class="wps-bton-first-mini-rounded"><?php _e('See', 'wpshop'); ?></a></div>
26 26
 				<div class="wps-table-cell">
27 27
 					<?php 
28 28
 					$invoice_ref = '';
29
-					if ( !empty($order_meta['order_invoice_ref']) ) {
29
+					if (!empty($order_meta['order_invoice_ref'])) {
30 30
 						$invoice_ref = $order_meta['order_invoice_ref'];
31 31
 					}
32
-					if ( !empty($invoice_ref) ) {
33
-						if( !empty($order_meta) && !empty($order_meta['order_payment']) && !empty($order_meta['order_payment']['received']) ) {
34
-							$invoice_ref = $order_meta['order_payment']['received'][ count($order_meta['order_payment']['received']) - 1 ]['invoice_ref'];
32
+					if (!empty($invoice_ref)) {
33
+						if (!empty($order_meta) && !empty($order_meta['order_payment']) && !empty($order_meta['order_payment']['received'])) {
34
+							$invoice_ref = $order_meta['order_payment']['received'][count($order_meta['order_payment']['received']) - 1]['invoice_ref'];
35 35
 						}
36 36
 					}
37
-					if ( ( $order_meta['order_status'] == 'partially_paid' || $order_meta['order_status'] == 'completed' || $order_meta['order_status'] == 'shipped' ) && !empty($invoice_ref) ) : ?>
38
-						<a href="<?php echo WPSHOP_TEMPLATES_URL; ?>invoice.php?order_id=<?php echo $order->ID; ?>&amp;mode=pdf" role="button" class="wps-bton-second-mini-rounded"><?php _e( 'Download', 'wpshop' ); ?></a>
37
+					if (($order_meta['order_status'] == 'partially_paid' || $order_meta['order_status'] == 'completed' || $order_meta['order_status'] == 'shipped') && !empty($invoice_ref)) : ?>
38
+						<a href="<?php echo WPSHOP_TEMPLATES_URL; ?>invoice.php?order_id=<?php echo $order->ID; ?>&amp;mode=pdf" role="button" class="wps-bton-second-mini-rounded"><?php _e('Download', 'wpshop'); ?></a>
39 39
 					<?php endif; ?>
40 40
 				</div>
41 41
 				<div class="wps-table-cell">
42
-				<?php if ( $order_meta['order_status'] == 'shipped' ) : ?>
43
-					<a href="<?php echo WPSHOP_TEMPLATES_URL; ?>invoice.php?order_id=<?php echo $order->ID; ?>&amp;bon_colisage=ok&amp;mode=pdf" role="button" class="wps-bton-third-mini-rounded"><?php _e( 'Download', 'wpshop' ); ?></a>
42
+				<?php if ($order_meta['order_status'] == 'shipped') : ?>
43
+					<a href="<?php echo WPSHOP_TEMPLATES_URL; ?>invoice.php?order_id=<?php echo $order->ID; ?>&amp;bon_colisage=ok&amp;mode=pdf" role="button" class="wps-bton-third-mini-rounded"><?php _e('Download', 'wpshop'); ?></a>
44 44
 				<?php endif; ?>
45 45
 				</div>
46 46
 				
@@ -49,5 +49,5 @@  discard block
 block discarded – undo
49 49
 	<?php endforeach; ?>
50 50
 </div>
51 51
 <?php else : ?>
52
-<div class="wps-alert-info"><?php _e( 'No orders has been created on your shop', 'wpshop'); ?></div>
52
+<div class="wps-alert-info"><?php _e('No orders has been created on your shop', 'wpshop'); ?></div>
53 53
 <?php endif; ?>
54 54
\ No newline at end of file
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
 if($orders) : 
3 5
 	$payment_status = unserialize( WPSHOP_ORDER_STATUS );
4 6
 ?>
@@ -48,6 +50,9 @@  discard block
 block discarded – undo
48 50
 		<?php endif; ?>
49 51
 	<?php endforeach; ?>
50 52
 </div>
51
-<?php else : ?>
52
-<div class="wps-alert-info"><?php _e( 'No orders has been created on your shop', 'wpshop'); ?></div>
53
+<?php else {
54
+	: ?>
55
+<div class="wps-alert-info"><?php _e( 'No orders has been created on your shop', 'wpshop');
56
+}
57
+?></div>
53 58
 <?php endif; ?>
54 59
\ No newline at end of file
Please login to merge, or discard this patch.
includes/modules/wps_dashboard/templates/backend/dashboard-videos.php 2 patches
Spacing   +4 added lines, -4 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 3
 <div>
4
-	<div class="wps-h6"><?php echo $videos_items[ $rand_element ]->title; ?></div>
5
-	<div><center><iframe width="400" height="290" src="<?php echo $videos_items[ $rand_element ]->embed_link; ?>" frameborder="0" allowfullscreen></iframe></center></div>
6
-	<div><?php echo $videos_items[ $rand_element ]->description; ?></div>
4
+	<div class="wps-h6"><?php echo $videos_items[$rand_element]->title; ?></div>
5
+	<div><center><iframe width="400" height="290" src="<?php echo $videos_items[$rand_element]->embed_link; ?>" frameborder="0" allowfullscreen></iframe></center></div>
6
+	<div><?php echo $videos_items[$rand_element]->description; ?></div>
7 7
 </div>
8 8
\ 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
  * Fichier de définition du modèle des taxinomies / File for term model definition
4 6
  *
Please login to merge, or discard this patch.
includes/modules/wps_dashboard/wps_dashboard.php 2 patches
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
  * Module bootstrap file
4 4
  * @author Development team <[email protected]>
@@ -13,13 +13,13 @@  discard block
 block discarded – undo
13 13
 
14 14
 /** Template Global vars **/
15 15
 DEFINE('WPS_DASHBOARD_DIR', basename(dirname(__FILE__)));
16
-DEFINE('WPS_DASHBOARD_PATH_TO_MODULE', str_replace( str_replace( "\\", "/", WP_PLUGIN_DIR ), "", str_replace( "\\", "/", plugin_dir_path( __FILE__ ) ) ) );
17
-DEFINE('WPS_DASHBOARD_PATH', str_replace( "\\", "/", str_replace( WPS_DASHBOARD_DIR, "", dirname( __FILE__ ) ) ) );
18
-DEFINE('WPS_DASHBOARD_URL', str_replace( str_replace( "\\", "/", ABSPATH), site_url() . '/', WPS_DASHBOARD_PATH ) );
16
+DEFINE('WPS_DASHBOARD_PATH_TO_MODULE', str_replace(str_replace("\\", "/", WP_PLUGIN_DIR), "", str_replace("\\", "/", plugin_dir_path(__FILE__))));
17
+DEFINE('WPS_DASHBOARD_PATH', str_replace("\\", "/", str_replace(WPS_DASHBOARD_DIR, "", dirname(__FILE__))));
18
+DEFINE('WPS_DASHBOARD_URL', str_replace(str_replace("\\", "/", ABSPATH), site_url() . '/', WPS_DASHBOARD_PATH));
19 19
 
20
-include( WPS_DASHBOARD_PATH . WPS_DASHBOARD_DIR . '/config/config.php' );
20
+include(WPS_DASHBOARD_PATH . WPS_DASHBOARD_DIR . '/config/config.php');
21 21
 
22
-include( WPS_DASHBOARD_PATH . WPS_DASHBOARD_DIR . '/controller/wps_dashboard_ctr.php' );
22
+include(WPS_DASHBOARD_PATH . WPS_DASHBOARD_DIR . '/controller/wps_dashboard_ctr.php');
23 23
 
24 24
 global $wps_dashboard_ctr;
25 25
 $wps_dashboard_ctr = new wps_dashboard_ctr();
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 /**
3 5
  * Fichier de définition du modèle des taxinomies / File for term model definition
4 6
  *
Please login to merge, or discard this patch.
includes/modules/wps_installer/wps_installer.php 2 patches
Spacing   +9 added lines, -9 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
  * Module bootstrap file
4 4
  * @author Development team <[email protected]>
@@ -13,17 +13,17 @@  discard block
 block discarded – undo
13 13
 
14 14
 /** Template Global vars **/
15 15
 DEFINE('WPS_INSTALLER_DIR', basename(dirname(__FILE__)));
16
-DEFINE('WPS_INSTALLER_PATH_TO_MODULE', str_replace( str_replace( "\\", "/", WP_PLUGIN_DIR ), "", str_replace( "\\", "/", plugin_dir_path( __FILE__ ) ) ) );
17
-DEFINE('WPS_INSTALLER_PATH', str_replace( "\\", "/", str_replace( WPS_INSTALLER_DIR, "", dirname( __FILE__ ) ) ) );
18
-DEFINE('WPS_INSTALLER_URL', str_replace( str_replace( "\\", "/", ABSPATH), site_url() . '/', WPS_INSTALLER_PATH ) );
16
+DEFINE('WPS_INSTALLER_PATH_TO_MODULE', str_replace(str_replace("\\", "/", WP_PLUGIN_DIR), "", str_replace("\\", "/", plugin_dir_path(__FILE__))));
17
+DEFINE('WPS_INSTALLER_PATH', str_replace("\\", "/", str_replace(WPS_INSTALLER_DIR, "", dirname(__FILE__))));
18
+DEFINE('WPS_INSTALLER_URL', str_replace(str_replace("\\", "/", ABSPATH), site_url() . '/', WPS_INSTALLER_PATH));
19 19
 
20
-load_plugin_textdomain( 'wps_installer', false, dirname(plugin_basename(__FILE__)).'/languages/');
20
+load_plugin_textdomain('wps_installer', false, dirname(plugin_basename(__FILE__)) . '/languages/');
21 21
 
22
-include( WPS_INSTALLER_PATH . WPS_INSTALLER_DIR . '/config/config.php' );
22
+include(WPS_INSTALLER_PATH . WPS_INSTALLER_DIR . '/config/config.php');
23 23
 
24
-include( WPS_INSTALLER_PATH . WPS_INSTALLER_DIR . '/controller/wps_installer_ctr.php' );
25
-include( WPS_INSTALLER_PATH . WPS_INSTALLER_DIR . '/model/wps_installer_model.php' );
24
+include(WPS_INSTALLER_PATH . WPS_INSTALLER_DIR . '/controller/wps_installer_ctr.php');
25
+include(WPS_INSTALLER_PATH . WPS_INSTALLER_DIR . '/model/wps_installer_model.php');
26 26
 
27
-$wps_installer_ctr  = new wps_installer_ctr();
27
+$wps_installer_ctr = new wps_installer_ctr();
28 28
 
29 29
 ?>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 /**
3 5
  * Fichier de définition du modèle des taxinomies / File for term model definition
4 6
  *
Please login to merge, or discard this patch.
includes/modules/wps_installer/config/config.php 2 patches
Spacing   +7 added lines, -7 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
  * Main plugin configuration file
4 4
  *
@@ -9,14 +9,14 @@  discard block
 block discarded – undo
9 9
  */
10 10
 
11 11
 /** Define librairies directory */
12
-DEFINE( 'WPSINSTALLER_LIBS_DIR', plugin_dir_path( __FILE__ ) . '/' . WPS_INSTALLER_DIR . '/');
12
+DEFINE('WPSINSTALLER_LIBS_DIR', plugin_dir_path(__FILE__) . '/' . WPS_INSTALLER_DIR . '/');
13 13
 
14 14
 /** Define template directory */
15
-DEFINE( 'WPSINSTALLER_TPL_DIR', WPS_INSTALLER_PATH . WPS_INSTALLER_DIR . '/templates/');
16
-DEFINE( 'WPSINSTALLER_TPL_URL', WPS_INSTALLER_URL . WPS_INSTALLER_DIR . '/templates/');
15
+DEFINE('WPSINSTALLER_TPL_DIR', WPS_INSTALLER_PATH . WPS_INSTALLER_DIR . '/templates/');
16
+DEFINE('WPSINSTALLER_TPL_URL', WPS_INSTALLER_URL . WPS_INSTALLER_DIR . '/templates/');
17 17
 
18
-$installation_step = array( __( 'Your society informations', 'wpshop'), __( 'Shop type', 'wpshop'), __( 'Have fun', 'wpshop') );
19
-DEFINE( 'WPSINSTALLER_STEPS', serialize( $installation_step ) );
20
-DEFINE( 'WPSINSTALLER_STEPS_COUNT', count( $installation_step ) );
18
+$installation_step = array(__('Your society informations', 'wpshop'), __('Shop type', 'wpshop'), __('Have fun', 'wpshop'));
19
+DEFINE('WPSINSTALLER_STEPS', serialize($installation_step));
20
+DEFINE('WPSINSTALLER_STEPS_COUNT', count($installation_step));
21 21
 
22 22
 ?>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 /**
3 5
  * Fichier de définition du modèle des taxinomies / File for term model definition
4 6
  *
Please login to merge, or discard this patch.
includes/modules/wps_installer/templates/backend/step_one.php 2 patches
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
-<h4><?php _e( 'Those informations will be used into invoice and to display your contact informations', 'wpshop'); ?></h4>
3
+<h4><?php _e('Those informations will be used into invoice and to display your contact informations', 'wpshop'); ?></h4>
4 4
 <?php
5
-	do_settings_sections( 'wpshop_company_info' );
5
+	do_settings_sections('wpshop_company_info');
6 6
 ?>
7 7
 
8 8
 <table class="form-table" >
9 9
 	<tr>
10
-		<th><?php _e( 'The logo for emails and invoices', 'wpshop'); ?></th>
10
+		<th><?php _e('The logo for emails and invoices', 'wpshop'); ?></th>
11 11
 		<td><?php wpshop_general_options::wpshop_logo_field(); ?></td>
12 12
 	</tr>
13 13
 </table>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 /**
3 5
  * Fichier de définition du modèle des taxinomies / File for term model definition
4 6
  *
Please login to merge, or discard this patch.
includes/modules/wps_installer/templates/backend/welcome.php 2 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,38 +1,38 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 <!-- <div id="welcome-panel" class="welcome-panel wps-welcome-panel" >
4 4
 	<input id="wps_installer_welcome_close_nonce" type="hidden" value="<?php echo wp_create_nonce("wps-installer-welcome-panel-close"); ?>" name="wps_installer_welcome_close_nonce">
5
-	<a class="welcome-panel-close wps-welcome-panel-close" href="<?php echo admin_url( 'admin.php?page=wpshop_dashboard?welcome=0' ); ?>"><?php _e( 'Close', 'wpshop'); ?></a>
5
+	<a class="welcome-panel-close wps-welcome-panel-close" href="<?php echo admin_url('admin.php?page=wpshop_dashboard?welcome=0'); ?>"><?php _e('Close', 'wpshop'); ?></a>
6 6
 
7 7
 	<div class="welcome-panel-content">
8
-		<h3><?php _e( 'Welcome to WPShop', 'wpshop'); ?></h3>
9
-		<p class="about-description"><?php _e( 'You will find some useful links in order to start using WPShop', 'wpshop'); ?></p>
8
+		<h3><?php _e('Welcome to WPShop', 'wpshop'); ?></h3>
9
+		<p class="about-description"><?php _e('You will find some useful links in order to start using WPShop', 'wpshop'); ?></p>
10 10
 
11 11
 		<div class="welcome-panel-column-container">
12 12
 			<div class="welcome-panel-column">
13
-				<h4><?php _e( 'Have fun with WPShop !', 'wpshop'); ?></h4>
14
-				<a href="<?php echo admin_url( 'options-general.php?page=wpshop_option' ); ?>" class="button button-primary button-hero"><?php _e( 'Configure your shop', 'wpshop'); ?></a>
13
+				<h4><?php _e('Have fun with WPShop !', 'wpshop'); ?></h4>
14
+				<a href="<?php echo admin_url('options-general.php?page=wpshop_option'); ?>" class="button button-primary button-hero"><?php _e('Configure your shop', 'wpshop'); ?></a>
15 15
 			</div>
16 16
 			<div class="welcome-panel-column">
17
-				<h4><?php _e( 'Next step', 'wpshop'); ?></h4>
17
+				<h4><?php _e('Next step', 'wpshop'); ?></h4>
18 18
 				<ul>
19
-					<?php if ( 0 >= $nb_products ) : ?>
20
-						<li><div class="dashicons dashicons-welcome-write-blog"></div><a href="<?php echo admin_url( 'post-new.php?post_type=' . WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT ); ?>" ><?php _e( 'Create your first product', 'wpshop');?></a></li>
19
+					<?php if (0 >= $nb_products) : ?>
20
+						<li><div class="dashicons dashicons-welcome-write-blog"></div><a href="<?php echo admin_url('post-new.php?post_type=' . WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT); ?>" ><?php _e('Create your first product', 'wpshop'); ?></a></li>
21 21
 					<?php endif; ?>
22 22
 
23
-					<?php if ( ( "sale" == $shop_type ) && $no_payment_mode_configurated ) : ?>
24
-						<li><div class="dashicons dashicons-admin-generic"></div><a href="<?php echo admin_url('options-general.php?page='.WPSHOP_URL_SLUG_OPTION.'#wpshop_payments_option'); ?>" ><?php _e( 'Configure a payment method', 'wpshop');?></a></li>
23
+					<?php if (("sale" == $shop_type) && $no_payment_mode_configurated) : ?>
24
+						<li><div class="dashicons dashicons-admin-generic"></div><a href="<?php echo admin_url('options-general.php?page=' . WPSHOP_URL_SLUG_OPTION . '#wpshop_payments_option'); ?>" ><?php _e('Configure a payment method', 'wpshop'); ?></a></li>
25 25
 					<?php endif; ?>
26 26
 
27
-					<li><div class="dashicons dashicons-email-alt"></div><a href="<?php echo admin_url('edit.php?post_type=wpshop_shop_message'); ?>" ><?php _e( 'Configure emails', 'wpshop');?></a></li>
27
+					<li><div class="dashicons dashicons-email-alt"></div><a href="<?php echo admin_url('edit.php?post_type=wpshop_shop_message'); ?>" ><?php _e('Configure emails', 'wpshop'); ?></a></li>
28 28
 				</ul>
29 29
 			</div>
30 30
 			<div class="welcome-panel-column">
31
-				<h4><?php _e( 'Go further', 'wpshop'); ?></h4>
31
+				<h4><?php _e('Go further', 'wpshop'); ?></h4>
32 32
 				<ul>
33
-					<li><div class="dashicons dashicons-welcome-view-site"></div><a href="<?php echo get_permalink( get_option( 'wpshop_product_page_id' ) ); ?>" ><?php _e( 'View your shop', 'wpshop');?></a></li>
34
-					<li><div class="dashicons dashicons-book-alt"></div><?php printf( __( 'More about WPShop %s or %s', 'wpshop'), sprintf( __( 'with %sonline documentation%s', 'wpshop'), '<a target="_blank" href="http://www.wpshop.fr/documentations/presentation-wpshop/" >', '</a>'), sprintf( __( 'on %sthe forum%s', 'wpshop'), '<a target="_blank" href="http://forums.eoxia.com/forum/wpshop" >', '</a>') ); ?></li>
35
-					<li><div class="dashicons dashicons-admin-plugins"></div><?php printf( __( 'Extend WPShop functionnalities with %saddons%s', 'wpshop'), '<a target="_blank" href="http://www.wpshop.fr/shop-theme/" >', '</a>'); ?></li>
33
+					<li><div class="dashicons dashicons-welcome-view-site"></div><a href="<?php echo get_permalink(get_option('wpshop_product_page_id')); ?>" ><?php _e('View your shop', 'wpshop'); ?></a></li>
34
+					<li><div class="dashicons dashicons-book-alt"></div><?php printf(__('More about WPShop %s or %s', 'wpshop'), sprintf(__('with %sonline documentation%s', 'wpshop'), '<a target="_blank" href="http://www.wpshop.fr/documentations/presentation-wpshop/" >', '</a>'), sprintf(__('on %sthe forum%s', 'wpshop'), '<a target="_blank" href="http://forums.eoxia.com/forum/wpshop" >', '</a>')); ?></li>
35
+					<li><div class="dashicons dashicons-admin-plugins"></div><?php printf(__('Extend WPShop functionnalities with %saddons%s', 'wpshop'), '<a target="_blank" href="http://www.wpshop.fr/shop-theme/" >', '</a>'); ?></li>
36 36
 				</ul>
37 37
 			</div>
38 38
 		</div>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 /**
3 5
  * Fichier de définition du modèle des taxinomies / File for term model definition
4 6
  *
Please login to merge, or discard this patch.
includes/modules/wps_installer/templates/backend/about-credits.php 2 patches
Spacing   +3 added lines, -3 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
-<p class="about-description"><?php _e( 'WPShop is mainly maintained by a french web-agency based in Montpellier, south of France.', 'wps_installer'); ?></p>
4
-<a href="http://www.eoxia.com" target="_eoxia_website" class="wps-installer-eoxia-link" ><img src="<?php echo WPS_INSTALLER_URL . WPS_INSTALLER_DIR . '/assets/medias/logo_eoxia.png'; ?>" alt="<?php _e( 'Go on eoxia website', 'wpshop'); ?>" title="<?php _e( 'Go on eoxia website', 'wpshop'); ?>" /></a>
5 3
\ No newline at end of file
4
+<p class="about-description"><?php _e('WPShop is mainly maintained by a french web-agency based in Montpellier, south of France.', 'wps_installer'); ?></p>
5
+<a href="http://www.eoxia.com" target="_eoxia_website" class="wps-installer-eoxia-link" ><img src="<?php echo WPS_INSTALLER_URL . WPS_INSTALLER_DIR . '/assets/medias/logo_eoxia.png'; ?>" alt="<?php _e('Go on eoxia website', 'wpshop'); ?>" title="<?php _e('Go on eoxia website', 'wpshop'); ?>" /></a>
6 6
\ 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,3 +1,5 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 ?>
3 5
 <p><?php echo $content; ?></p>
4 6
\ No newline at end of file
Please login to merge, or discard this patch.