Completed
Pull Request — master (#2)
by Jimmy
1216:52 queued 1185:43
created
templates/product_sheet.php 2 patches
Braces   +4 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
 /*	Wordpress - Ajax functionnality activation	*/
3 5
 DEFINE('DOING_AJAX', true);
4 6
 /*	Wordpress - Main bootstrap file that load wordpress basic files	*/
@@ -19,8 +21,7 @@  discard block
 block discarded – undo
19 21
 		$html2pdf->setDefaultFont('Arial');
20 22
 		$html2pdf->writeHTML($html_content);
21 23
 		$html2pdf->Output('product-' .$_GET['pid'].'-'.$product_post->post_name.'.pdf', 'D');
22
-	}
23
-	catch (HTML2PDF_exception $e) {
24
+	} catch (HTML2PDF_exception $e) {
24 25
 		echo $e;
25 26
 		exit;
26 27
 	}
Please login to merge, or discard this patch.
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
 /*	Wordpress - Ajax functionnality activation	*/
3 3
 DEFINE('DOING_AJAX', true);
4 4
 /*	Wordpress - Main bootstrap file that load wordpress basic files	*/
@@ -6,19 +6,19 @@  discard block
 block discarded – undo
6 6
 /*	Wordpress - Admin page that define some needed vars and include file	*/
7 7
 require_once(ABSPATH . 'wp-admin/includes/admin.php');
8 8
 
9
-$product_id = ( !empty($_GET['pid']) ) ? (int) $_GET['pid'] : null;
9
+$product_id = (!empty($_GET['pid'])) ? (int)$_GET['pid'] : null;
10 10
 $user_id = get_current_user_id();
11
-if( !empty($product_id) && get_post_type( $product_id ) == WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT && $user_id != 0 && current_user_can( 'manage_options' ) ) {
11
+if (!empty($product_id) && get_post_type($product_id) == WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT && $user_id != 0 && current_user_can('manage_options')) {
12 12
 	$wps_product_administration_ctr = new wps_product_administration_ctr();
13
-	$html_content = $wps_product_administration_ctr->generate_product_sheet_datas( $product_id );
14
-	$product_post = get_post( $product_id );
15
-	require_once(WPSHOP_LIBRAIRIES_DIR.'HTML2PDF/html2pdf.class.php');
13
+	$html_content = $wps_product_administration_ctr->generate_product_sheet_datas($product_id);
14
+	$product_post = get_post($product_id);
15
+	require_once(WPSHOP_LIBRAIRIES_DIR . 'HTML2PDF/html2pdf.class.php');
16 16
 	try {
17 17
 		$html2pdf = new HTML2PDF('P', 'A4', 'fr');
18 18
 		$html2pdf->pdf->SetDisplayMode('fullpage');
19 19
 		$html2pdf->setDefaultFont('Arial');
20 20
 		$html2pdf->writeHTML($html_content);
21
-		$html2pdf->Output('product-' .$product_id.'-'.$product_post->post_name.'.pdf', 'D');
21
+		$html2pdf->Output('product-' . $product_id . '-' . $product_post->post_name . '.pdf', 'D');
22 22
 	}
23 23
 	catch (HTML2PDF_exception $e) {
24 24
 		echo $e;
Please login to merge, or discard this patch.
templates/admin/wpshop_shortcodes_wysiwyg_dialog.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
 /*	Wordpress - Main bootstrap file that load wordpress basic files	*/
3 3
 require_once('../../../../../wp-load.php');
4 4
 header('Content-Type: text/html; charset=' . get_bloginfo('charset'));
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 $display_option_display_type = true;
11 11
 $display_option_grouped = true;
12 12
 $display_search_form = true;
13
-if ( !empty($type) ) {
13
+if (!empty($type)) {
14 14
 	switch ($type) {
15 15
 		case 'attribute_value':
16 16
 				$display_option_grouped = false;
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
 		case 'product':
38 38
 				$query = $wpdb->prepare("SELECT COUNT(ID) as WPSHOP_PRODUCT_NB FROM " . $wpdb->posts . " WHERE post_type=%s AND post_status=%s", WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT, 'publish');
39 39
 				$wpshop_product_nb = $wpdb->get_var($query);
40
-				$content = sprintf(__('Due to product number, you have to search for product or click on "%s" button', 'wpshop'), __('View all element','wpshop'));
41
-				if ( $wpshop_product_nb <= 100 ) {
40
+				$content = sprintf(__('Due to product number, you have to search for product or click on "%s" button', 'wpshop'), __('View all element', 'wpshop'));
41
+				if ($wpshop_product_nb <= 100) {
42 42
 					$content = wpshop_products::product_list(true);
43 43
 				}
44 44
 				$wpshop_wysiwyg_shortcode_inserter_shortcode_main_identifier = 'wpshop_products pid';
@@ -64,30 +64,30 @@  discard block
 block discarded – undo
64 64
 	<script type="text/javascript" src="<?php echo bloginfo('url'); ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
65 65
 	<script type="text/javascript" src="<?php echo bloginfo('url'); ?>/wp-includes/js/jquery/jquery.js"></script>
66 66
 	<?php wpshop_init::admin_print_js(); ?>
67
-	<script type="text/javascript" src="<?php echo WPSHOP_JS_URL; ?>pages/wpshop_wysiwyg.js?v=<?php echo WPSHOP_VERSION;?>" ></script>
68
-	<script type="text/javascript" src="<?php echo WPSHOP_JS_URL; ?>jquery-libs/chosen.jquery.min.js?v=<?php echo WPSHOP_VERSION;?>" ></script>
67
+	<script type="text/javascript" src="<?php echo WPSHOP_JS_URL; ?>pages/wpshop_wysiwyg.js?v=<?php echo WPSHOP_VERSION; ?>" ></script>
68
+	<script type="text/javascript" src="<?php echo WPSHOP_JS_URL; ?>jquery-libs/chosen.jquery.min.js?v=<?php echo WPSHOP_VERSION; ?>" ></script>
69 69
 	<script type="text/javascript">
70 70
 		var WPSHOP_AJAX_FILE_URL = "<?php echo admin_url('admin-ajax.php'); ?>";
71 71
 		var wpshop_wysiwyg_shortcode_insertion_search = "<?php echo wp_create_nonce('wpshop_element_search'); ?>";
72 72
 		var WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT = "<?php echo WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT; ?>";
73 73
 	</script>
74 74
 
75
-	<?php wp_admin_css( 'wp-admin', true ); ?>
76
-	<link rel='stylesheet' href="<?php echo WPSHOP_CSS_URL; ?>pages/wpshop_wysiwyg_dialog.css?v=<?php echo WPSHOP_VERSION;?>" type="text/css" media="all" />
77
-	<link rel='stylesheet' href="<?php echo WPSHOP_CSS_URL; ?>jquery-libs/chosen.css?v=<?php echo WPSHOP_VERSION;?>" type="text/css" media="all" />
75
+	<?php wp_admin_css('wp-admin', true); ?>
76
+	<link rel='stylesheet' href="<?php echo WPSHOP_CSS_URL; ?>pages/wpshop_wysiwyg_dialog.css?v=<?php echo WPSHOP_VERSION; ?>" type="text/css" media="all" />
77
+	<link rel='stylesheet' href="<?php echo WPSHOP_CSS_URL; ?>jquery-libs/chosen.css?v=<?php echo WPSHOP_VERSION; ?>" type="text/css" media="all" />
78 78
 </head>
79 79
 <body>
80 80
 	<form onsubmit="wpShop_Dialog_Action.insert();" action="#">
81 81
 		<input type="hidden" value="<?php echo $wpshop_wysiwyg_shortcode_inserter_shortcode_main_identifier; ?>" id="wpshop_wysiwyg_shortcode_inserter_shortcode_main_identifier" />
82 82
 		<input type="hidden" value="<?php echo $type; ?>" id="wpshop_wysiwyg_shortcode_inserter_type" />
83
-<?php if ( !empty($type) ) : ?>
83
+<?php if (!empty($type)) : ?>
84 84
 <?php
85 85
 		if ($display_search_form) {
86 86
 ?>
87 87
 		<div class="search_element_container" >
88
-			<input type="text" value="" placeholder="<?php _e('Search...','wpshop'); ?>"  id="search_element_text" />
89
-			<button type="button" name="search_element_button" id="search_element_button" ><?php _e('Search','wpshop'); ?></button>
90
-			<button type="button" name="view_all_element_button" id="view_all_element_button" ><?php _e('View all element','wpshop'); ?></button>
88
+			<input type="text" value="" placeholder="<?php _e('Search...', 'wpshop'); ?>"  id="search_element_text" />
89
+			<button type="button" name="search_element_button" id="search_element_button" ><?php _e('Search', 'wpshop'); ?></button>
90
+			<button type="button" name="view_all_element_button" id="view_all_element_button" ><?php _e('View all element', 'wpshop'); ?></button>
91 91
 		</div>
92 92
 <?php
93 93
 		}
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
 		if ($display_option_display_type) {
108 108
 ?>
109
-			<?php if ( !empty($specific_options) ) : ?><p><?php _e('Generic options', 'wpshop'); ?></p><?php endif; ?>
109
+			<?php if (!empty($specific_options)) : ?><p><?php _e('Generic options', 'wpshop'); ?></p><?php endif; ?>
110 110
 			<div class="wpshop_wysiwyg_shortcode_display_type_container" >
111 111
 				<?php _e('Display as', 'wpshop'); ?>
112 112
 				<input type="radio" name="wpshop_wysiwyg_shortcode_display_type" id="wpshop_wysiwyg_shortcode_display_type_grid" class="wpshop_wysiwyg_shortcode_display_option wpshop_wysiwyg_shortcode_display_type" value="grid" checked > <label for="wpshop_wysiwyg_shortcode_display_type_grid" ><?php _e('Grid', 'wpshop'); ?></label>
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
 /*	Wordpress - Main bootstrap file that load wordpress basic files	*/
3 5
 require_once('../../../../../wp-load.php');
4 6
 header('Content-Type: text/html; charset=' . get_bloginfo('charset'));
@@ -140,8 +142,11 @@  discard block
 block discarded – undo
140 142
 				<input type="button" id="insert" name="insert" value="{#insert}" onclick="wpShop_Dialog_Action.insert();" />
141 143
 			</div>
142 144
 		</div>
143
-<?php else: ?>
144
-		<span class="wpshop_wysiwyg_error_msg" ><?php _e('You are not allowed to continue here', 'wpshop'); ?></span>
145
+<?php else {
146
+	: ?>
147
+		<span class="wpshop_wysiwyg_error_msg" ><?php _e('You are not allowed to continue here', 'wpshop');
148
+}
149
+?></span>
145 150
 <?php endif; ?>
146 151
 	</form>
147 152
 </body>
Please login to merge, or discard this patch.
templates/bank_deposit.php 2 patches
Braces   +4 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
 	/*	Wordpress - Ajax functionnality activation	*/
4 6
 	DEFINE('DOING_AJAX', true);
@@ -216,8 +218,7 @@  discard block
 block discarded – undo
216 218
 			$html2pdf->writeHTML($html_content);
217 219
 	
218 220
 			$html2pdf->Output( __('Bank deposit', 'wpshop') . ' - ' . mysql2date( get_option( 'date_format' ), $_GET['fromdate'] ) . '.pdf', 'D');
219
-		}
220
-		catch (HTML2PDF_exception $e) {
221
+		} catch (HTML2PDF_exception $e) {
221 222
 			echo $e;
222 223
 			exit;
223 224
 		}
Please login to merge, or discard this patch.
Spacing   +41 added lines, -41 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
 	/*	Wordpress - Ajax functionnality activation	*/
4 4
 	DEFINE('DOING_AJAX', true);
@@ -7,23 +7,23 @@  discard block
 block discarded – undo
7 7
 	/*	Wordpress - Admin page that define some needed vars and include file	*/
8 8
 	require_once(ABSPATH . 'wp-admin/includes/admin.php');
9 9
 
10
-	$fromdate = empty( $fromdate ) ? date( 'Y-m-d' ) : sanitize_text_field( $_GET['fromdate'] );
11
-	$method = empty( $_GET['method'] ) ? 'all' : sanitize_text_field( $_GET['method'] );
12
-	$mode = !empty( $_GET['mode'] ) ? sanitize_text_field( $_GET['mode'] ) : '';
10
+	$fromdate = empty($fromdate) ? date('Y-m-d') : sanitize_text_field($_GET['fromdate']);
11
+	$method = empty($_GET['method']) ? 'all' : sanitize_text_field($_GET['method']);
12
+	$mode = !empty($_GET['mode']) ? sanitize_text_field($_GET['mode']) : '';
13 13
 
14 14
 	$valid_dates = array();
15 15
 	$valid_dates['relation'] = 'OR';
16 16
 
17
-	$from_to = !empty( $_GET['todate'] ) : sanitize_text_field( $_GET['todate'] ) : date( 'Y-m-d' );
17
+	$from_to = !empty($_GET['todate']) : sanitize_text_field($_GET['todate']) : date('Y-m-d');
18 18
 
19
-	$fromdate = DateTime::createFromFormat( 'Y-m-d', $fromdate );
20
-	$todate = DateTime::createFromFormat( 'Y-m-d', ($from_to) ? $from_to : $fromdate );
21
-	$datePeriod = new DatePeriod( $fromdate, new DateInterval('P1D'), $todate->modify('+1 day') );
19
+	$fromdate = DateTime::createFromFormat('Y-m-d', $fromdate);
20
+	$todate = DateTime::createFromFormat('Y-m-d', ($from_to) ? $from_to : $fromdate);
21
+	$datePeriod = new DatePeriod($fromdate, new DateInterval('P1D'), $todate->modify('+1 day'));
22 22
 
23
-	foreach($datePeriod as $date) {
23
+	foreach ($datePeriod as $date) {
24 24
 		$valid_dates[] = array(
25 25
 			'key'			=> '_order_postmeta',
26
-			'value' 		=> serialize( 'date' ) . 's:19:"' . $date->format( 'Y-m-d' ),
26
+			'value' 		=> serialize('date') . 's:19:"' . $date->format('Y-m-d'),
27 27
 			'compare' 		=> 'LIKE',
28 28
 		);
29 29
 	}
@@ -36,30 +36,30 @@  discard block
 block discarded – undo
36 36
 			'relation' 			=> 'AND',
37 37
 			array(
38 38
 					'key'			=> '_order_postmeta',
39
-					'value' 		=> serialize( 'order_status' ) . serialize( 'pos' ),
39
+					'value' 		=> serialize('order_status') . serialize('pos'),
40 40
 					'compare' 		=> 'LIKE',
41 41
 			),
42 42
 			$valid_dates,
43 43
 		),
44 44
 	);
45
-	if( $method != 'all' ) {
45
+	if ($method != 'all') {
46 46
 		$args['meta_query'][] = array(
47 47
 				'key'			=> '_order_postmeta',
48
-				'value' 		=> serialize( 'method' ) . serialize( $method ),
48
+				'value' 		=> serialize('method') . serialize($method),
49 49
 				'compare' 		=> 'LIKE',
50 50
 		);
51 51
 	}
52
-	$query = new WP_Query( $args );
52
+	$query = new WP_Query($args);
53 53
 
54 54
 	$orders = $query->posts;
55 55
 	$orders_date = array();
56 56
 
57
-	foreach( $orders as $order ) {
58
-		$order->_order_postmeta = get_post_meta( $order->ID, '_order_postmeta', true );
59
-		foreach( $order->_order_postmeta['order_payment']['received'] as $payment_received ) {
60
-			if( $payment_received['status'] == 'payment_received' ) {
57
+	foreach ($orders as $order) {
58
+		$order->_order_postmeta = get_post_meta($order->ID, '_order_postmeta', true);
59
+		foreach ($order->_order_postmeta['order_payment']['received'] as $payment_received) {
60
+			if ($payment_received['status'] == 'payment_received') {
61 61
 				$payment_received['order'] = $order;
62
-				if( !isset( $orders_date[$payment_received['method']] ) ) { $orders_date[$payment_received['method']]['amount_total'] = 0; }
62
+				if (!isset($orders_date[$payment_received['method']])) { $orders_date[$payment_received['method']]['amount_total'] = 0; }
63 63
 				@$orders_date[$payment_received['method']]['amount_total'] += $payment_received['received_amount'];
64 64
 				@$orders_date[$payment_received['method']]['list'][] = $payment_received;
65 65
 				@$orders_date['all']['amount_total'] += $payment_received['received_amount'];
@@ -143,18 +143,18 @@  discard block
 block discarded – undo
143 143
 				<td class="width-15"><?php echo $company['company_street']; ?></td>
144 144
 				<td class="valign-top width-075"><?php _e('Date', 'wpshop'); ?>:</td>
145 145
 				<td class="align-right width-075">
146
-				<?php if( $from_to ) { ?>
147
-					<span class="force-one-line"><?php echo __( 'From', 'wpshop' ) . ' ' . mysql2date( get_option( 'date_format' ), $fromdate, true ); ?></span>
148
-					<span class="force-one-line"><?php echo __( 'to', 'wpshop' ) . ' ' . mysql2date( get_option( 'date_format' ), $from_to, true ); ?></span>
146
+				<?php if ($from_to) { ?>
147
+					<span class="force-one-line"><?php echo __('From', 'wpshop') . ' ' . mysql2date(get_option('date_format'), $fromdate, true); ?></span>
148
+					<span class="force-one-line"><?php echo __('to', 'wpshop') . ' ' . mysql2date(get_option('date_format'), $from_to, true); ?></span>
149 149
 				<?php } else { ?>
150
-					<span class="force-one-line"><?php echo mysql2date( get_option( 'date_format' ), $fromdate, true ); ?></span>
150
+					<span class="force-one-line"><?php echo mysql2date(get_option('date_format'), $fromdate, true); ?></span>
151 151
 				<?php } ?>
152 152
 				</td>
153 153
 			</tr>
154 154
 			<tr>
155 155
 				<td class="width-15"><?php echo $company['company_postcode'] . ' ' . $company['company_country']; ?></td>
156
-				<td class="width-075"><?php _e('Method', 'wpshop' ); ?>:</td>
157
-				<td class="align-right width-075"><?php _e( $method, 'wpshop' ); ?></td>
156
+				<td class="width-075"><?php _e('Method', 'wpshop'); ?>:</td>
157
+				<td class="align-right width-075"><?php _e($method, 'wpshop'); ?></td>
158 158
 			</tr>
159 159
 		</table>
160 160
 		<br>
@@ -162,40 +162,40 @@  discard block
 block discarded – undo
162 162
 			<thead class="border">
163 163
 				<tr>
164 164
 					<th class="margin-sides"><?php _e('Invoice', 'wps-pos-i18n'); ?></th>
165
-					<th class="margin-sides"><?php echo ( $from_to ) ? __('Date', 'wps-pos-i18n') : __('Hour', 'wpshop'); ?></th>
165
+					<th class="margin-sides"><?php echo ($from_to) ? __('Date', 'wps-pos-i18n') : __('Hour', 'wpshop'); ?></th>
166 166
 					<th class="margin-sides"><?php _e('Order', 'wpshop'); ?></th>
167 167
 					<th class="width-100"><?php _e('Products', 'wpshop'); ?></th>
168 168
 					<th class="margin-sides"><?php _e('Amount', 'wps-pos-i18n'); ?></th>
169 169
 			 	</tr>
170 170
 			</thead>
171 171
 			<tbody class="border">
172
-				<?php if( empty( $orders_date[$method] ) ) { $orders_date[$method] = array(); $orders_date[$method]['list'] = array(); $orders_date[$method]['amount_total'] = 0; } ?>
173
-			 	<?php foreach( $orders_date[$method]['list'] as $payment_received ) : ?>
172
+				<?php if (empty($orders_date[$method])) { $orders_date[$method] = array(); $orders_date[$method]['list'] = array(); $orders_date[$method]['amount_total'] = 0; } ?>
173
+			 	<?php foreach ($orders_date[$method]['list'] as $payment_received) : ?>
174 174
 			    <tr>
175
-					<td class="margin-sides"><?php echo ( !empty($payment_received['invoice_ref']) ) ? $payment_received['invoice_ref'] : ''; ?></td>
176
-					<td class="force-one-line margin-sides"><?php echo ( !empty($payment_received['date']) ) ? ( $from_to ) ? mysql2date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $payment_received['date'], true ) : mysql2date( get_option( 'time_format' ), $payment_received['date'], true ) : ''; ?></td>
177
-					<td class="margin-sides"><?php echo ( !empty($payment_received['order']->_order_postmeta['order_key']) ) ? $payment_received['order']->_order_postmeta['order_key'] : ''; ?></td>
175
+					<td class="margin-sides"><?php echo (!empty($payment_received['invoice_ref'])) ? $payment_received['invoice_ref'] : ''; ?></td>
176
+					<td class="force-one-line margin-sides"><?php echo (!empty($payment_received['date'])) ? ($from_to) ? mysql2date(get_option('date_format') . ' ' . get_option('time_format'), $payment_received['date'], true) : mysql2date(get_option('time_format'), $payment_received['date'], true) : ''; ?></td>
177
+					<td class="margin-sides"><?php echo (!empty($payment_received['order']->_order_postmeta['order_key'])) ? $payment_received['order']->_order_postmeta['order_key'] : ''; ?></td>
178 178
 					<td class="max-width align-center force-one-line"><?php
179
-						if( !empty($payment_received['order']->_order_postmeta['order_items']) ) {
179
+						if (!empty($payment_received['order']->_order_postmeta['order_items'])) {
180 180
 							$first = true;
181
-							foreach( $payment_received['order']->_order_postmeta['order_items'] as $item ) {
182
-								if( $first ) {
181
+							foreach ($payment_received['order']->_order_postmeta['order_items'] as $item) {
182
+								if ($first) {
183 183
 									$first = !$first;
184 184
 									echo $item['item_name'];
185 185
 								} else {
186
-									echo ', ' .$item['item_name'];
186
+									echo ', ' . $item['item_name'];
187 187
 								}
188 188
 							}
189 189
 						}
190 190
 					?></td>
191
-					<td class="align-right margin-sides"><?php echo ( !empty($payment_received['received_amount']) ) ?  number_format( $payment_received['received_amount'], 2, '.', '' ) : ''; ?><?php echo wpshop_tools::wpshop_get_currency(); ?></td>
191
+					<td class="align-right margin-sides"><?php echo (!empty($payment_received['received_amount'])) ? number_format($payment_received['received_amount'], 2, '.', '') : ''; ?><?php echo wpshop_tools::wpshop_get_currency(); ?></td>
192 192
 				</tr>
193 193
 		   	 	<?php endforeach; ?>
194 194
 		   	 </tbody>
195 195
 		   	 <tfoot class="border">
196 196
 		   	 	<tr>
197 197
 		   	 		<td colspan="4" class="margin-sides bold"><?php _e('Bank deposit sum', 'wpshop'); ?></td>
198
-		   	 		<td class="align-right border margin-sides bold"><?php echo number_format( $orders_date[$method]['amount_total'], 2, '.', '' ) . wpshop_tools::wpshop_get_currency(); ?></td>
198
+		   	 		<td class="align-right border margin-sides bold"><?php echo number_format($orders_date[$method]['amount_total'], 2, '.', '') . wpshop_tools::wpshop_get_currency(); ?></td>
199 199
 		   	 	</tr>
200 200
 		   	 </tfoot>
201 201
 		</table>
@@ -203,8 +203,8 @@  discard block
 block discarded – undo
203 203
 	$content = ob_get_contents();
204 204
 	ob_end_clean();
205 205
 
206
-	if ( !empty( $mode ) && $mode == 'pdf') {
207
-		require_once(WPSHOP_LIBRAIRIES_DIR.'HTML2PDF/html2pdf.class.php');
206
+	if (!empty($mode) && $mode == 'pdf') {
207
+		require_once(WPSHOP_LIBRAIRIES_DIR . 'HTML2PDF/html2pdf.class.php');
208 208
 		try {
209 209
 			$html_content = $content_css . '<page>' . $content . '</page>';
210 210
 			$html2pdf = new HTML2PDF('P', 'A4', 'fr');
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 			$html2pdf->setDefaultFont('Arial');
213 213
 			$html2pdf->writeHTML($html_content);
214 214
 
215
-			$html2pdf->Output( __('Bank deposit', 'wpshop') . ' - ' . mysql2date( get_option( 'date_format' ), $fromdate ) . '.pdf', 'D');
215
+			$html2pdf->Output(__('Bank deposit', 'wpshop') . ' - ' . mysql2date(get_option('date_format'), $fromdate) . '.pdf', 'D');
216 216
 		}
217 217
 		catch (HTML2PDF_exception $e) {
218 218
 			echo $e;
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 <!--<![endif]-->
229 229
 	<head>
230 230
 		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
231
-		<title><?php _e('Bank deposit', 'wpshop'); ?> - <?php echo mysql2date( get_option( 'date_format' ), $fromdate ); ?></title>
231
+		<title><?php _e('Bank deposit', 'wpshop'); ?> - <?php echo mysql2date(get_option('date_format'), $fromdate); ?></title>
232 232
 		<?php echo $content_css; ?>
233 233
 	</head>
234 234
 	<body>
Please login to merge, or discard this patch.
templates/credit_slip.php 2 patches
Spacing   +8 added lines, -8 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
 /*	Wordpress - Ajax functionnality activation	*/
3 3
 DEFINE('DOING_AJAX', true);
4 4
 /*	Wordpress - Main bootstrap file that load wordpress basic files	*/
@@ -11,13 +11,13 @@  discard block
 block discarded – undo
11 11
 $mode = (!empty($_GET['mode'])) ? wpshop_tools::varSanitizer($_GET['mode']) : 'html';
12 12
 // $is_credit_slip = (!empty($_GET['credit_slip'])) ? wpshop_tools::varSanitizer($_GET['credit_slip']) : null;
13 13
 
14
-if ( !empty($order_id) ) {
14
+if (!empty($order_id)) {
15 15
 // 	/**	Order reading	*/
16 16
 	$order_postmeta = get_post_meta($order_id, '_order_postmeta', true);
17
-	$html_content = wps_credit::generate_credit_slip($order_id, $invoice_ref );
17
+	$html_content = wps_credit::generate_credit_slip($order_id, $invoice_ref);
18 18
 
19
-	if ( $mode == 'pdf') {
20
-		require_once(WPSHOP_LIBRAIRIES_DIR.'HTML2PDF/html2pdf.class.php');
19
+	if ($mode == 'pdf') {
20
+		require_once(WPSHOP_LIBRAIRIES_DIR . 'HTML2PDF/html2pdf.class.php');
21 21
 		try {
22 22
 			$html_content = wpshop_display::display_template_element('invoice_page_content_css', array(), array(), 'common') . '<page>' . $html_content . '</page>';
23 23
 			$html2pdf = new HTML2PDF('P', 'A4', 'fr');
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 			$html2pdf->setDefaultFont('Arial');
26 26
 			$html2pdf->writeHTML($html_content);
27 27
 
28
-			$html2pdf->Output('order_' .$order_id. '.pdf', 'D');
28
+			$html2pdf->Output('order_' . $order_id . '.pdf', 'D');
29 29
 		}
30 30
 		catch (HTML2PDF_exception $e) {
31 31
 			echo $e;
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
 		}
34 34
 	}
35 35
 	else {
36
-		$tpl_component['INVOICE_CSS'] =  wpshop_display::display_template_element('invoice_page_content_css', array(), array(), 'common');
36
+		$tpl_component['INVOICE_CSS'] = wpshop_display::display_template_element('invoice_page_content_css', array(), array(), 'common');
37 37
 		$tpl_component['INVOICE_MAIN_PAGE'] = $html_content;
38
-		$tpl_component['INVOICE_TITLE_PAGE'] = sprintf( __('Credit slip #%s for Order #%s', 'wpshop'), $invoice_ref, $order_postmeta['order_key']);
38
+		$tpl_component['INVOICE_TITLE_PAGE'] = sprintf(__('Credit slip #%s for Order #%s', 'wpshop'), $invoice_ref, $order_postmeta['order_key']);
39 39
 		echo wpshop_display::display_template_element('invoice_page', $tpl_component, array(), 'common');
40 40
 	}
41 41
 }
42 42
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +5 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
 /*	Wordpress - Ajax functionnality activation	*/
3 5
 DEFINE('DOING_AJAX', true);
4 6
 /*	Wordpress - Main bootstrap file that load wordpress basic files	*/
@@ -26,13 +28,11 @@  discard block
 block discarded – undo
26 28
 			$html2pdf->writeHTML($html_content);
27 29
 
28 30
 			$html2pdf->Output('order_' .$order_id. '.pdf', 'D');
29
-		}
30
-		catch (HTML2PDF_exception $e) {
31
+		} catch (HTML2PDF_exception $e) {
31 32
 			echo $e;
32 33
 			exit;
33 34
 		}
34
-	}
35
-	else {
35
+	} else {
36 36
 		$tpl_component['INVOICE_CSS'] =  wpshop_display::display_template_element('invoice_page_content_css', array(), array(), 'common');
37 37
 		$tpl_component['INVOICE_MAIN_PAGE'] = $html_content;
38 38
 		$tpl_component['INVOICE_TITLE_PAGE'] = sprintf( __('Credit slip #%s for Order #%s', 'wpshop'), $invoice_ref, $order_postmeta['order_key']);
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
 /**
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.
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
  * Fichier de définition du modèle des taxinomies / File for term model definition
4 6
  *
Please login to merge, or discard this patch.
core/wpeo_logs/wpeo_logs.php 2 patches
Spacing   +11 added lines, -11 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
  * Bootstrap file for plugin. Do main includes and create new instance for plugin components
4 4
  *
@@ -7,22 +7,22 @@  discard block
 block discarded – undo
7 7
  */
8 8
 
9 9
 global $wpeologs;
10
-if( !isset( $wpeologs ) ) {
10
+if (!isset($wpeologs)) {
11 11
 
12
-	DEFINE( 'WPEO_LOGS_VERSION', '1.1.0.0' );
13
-	DEFINE( 'WPEO_LOGS_DIR', basename(dirname(__FILE__)));
14
-	DEFINE( 'WPEO_LOGS_PATH', dirname( __FILE__ ) );
15
-	DEFINE( 'WPEO_LOGS_URL', str_replace( str_replace( "\\", "/", ABSPATH), site_url() . '/', str_replace( "\\", "/", WPEO_LOGS_PATH ) ) );
12
+	DEFINE('WPEO_LOGS_VERSION', '1.1.0.0');
13
+	DEFINE('WPEO_LOGS_DIR', basename(dirname(__FILE__)));
14
+	DEFINE('WPEO_LOGS_PATH', dirname(__FILE__));
15
+	DEFINE('WPEO_LOGS_URL', str_replace(str_replace("\\", "/", ABSPATH), site_url() . '/', str_replace("\\", "/", WPEO_LOGS_PATH)));
16 16
 
17 17
 	/**	Load plugin translation	*/
18
-	load_plugin_textdomain( 'wpeolog-i18n', false, dirname( plugin_basename( __FILE__ ) ) . '/language/' );
18
+	load_plugin_textdomain('wpeolog-i18n', false, dirname(plugin_basename(__FILE__)) . '/language/');
19 19
 
20 20
 	/**	Define the templates directories */
21
-	DEFINE( 'WPEO_LOGS_TEMPLATES_MAIN_DIR', WPEO_LOGS_PATH . '/template/');
21
+	DEFINE('WPEO_LOGS_TEMPLATES_MAIN_DIR', WPEO_LOGS_PATH . '/template/');
22 22
 
23
-	require_once( WPEO_LOGS_PATH . '/core/wpeo_util.01.php' );
24
-	require_once( WPEO_LOGS_PATH . '/core/wpeo_template.01.php' );
25
-	require_once( WPEO_LOGS_PATH . '/controller/log.controller.01.php' );
23
+	require_once(WPEO_LOGS_PATH . '/core/wpeo_util.01.php');
24
+	require_once(WPEO_LOGS_PATH . '/core/wpeo_template.01.php');
25
+	require_once(WPEO_LOGS_PATH . '/controller/log.controller.01.php');
26 26
 
27 27
 	$wpeologs = new wpeologs_ctr();
28 28
 }
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.
core/wpeo_logs/template/backend/chart.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit; ?>
1
+<?php if (!defined('ABSPATH')) exit; ?>
2 2
 
3
-<br /><h3><?php _e( 'Chart', 'wpeolog-i18n' ); ?></h3>
3
+<br /><h3><?php _e('Chart', 'wpeolog-i18n'); ?></h3>
4 4
 
5
-<?php if( empty( $count_error ) && empty( $count_info ) && empty( $count_warning ) ): ?>
6
-	<?php _e( 'No data for chart', 'wpeolog-i18n'); ?>
5
+<?php if (empty($count_error) && empty($count_info) && empty($count_warning)): ?>
6
+	<?php _e('No data for chart', 'wpeolog-i18n'); ?>
7 7
 <?php else: ?>
8 8
 	<canvas class="alignleft" id="myChart" width="200" height="200"></canvas>
9 9
 <?php endif; ?>
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,12 +1,18 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit; ?>
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
4
+?>
2 5
 
3 6
 <br /><h3><?php _e( 'Chart', 'wpeolog-i18n' ); ?></h3>
4 7
 
5 8
 <?php if( empty( $count_error ) && empty( $count_info ) && empty( $count_warning ) ): ?>
6 9
 	<?php _e( 'No data for chart', 'wpeolog-i18n'); ?>
7
-<?php else: ?>
10
+<?php else {
11
+	: ?>
8 12
 	<canvas class="alignleft" id="myChart" width="200" height="200"></canvas>
9
-<?php endif; ?>
13
+<?php endif;
14
+}
15
+?>
10 16
 
11 17
 <script type="text/javascript">
12 18
 jQuery( document ).ready( function() {
Please login to merge, or discard this patch.
core/wpeo_logs/template/backend/list-service-edit.php 2 patches
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -1,90 +1,90 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit; ?>
1
+<?php if (!defined('ABSPATH')) exit; ?>
2 2
 
3 3
 <div class="tablenav top">	
4 4
  	<div class="tablenav-pages">
5
-		<span class="displaying-num"><?php echo !empty( $array_service ) ? count( $array_service ) : 0; _e( ' item(s)', 'wpeolog-i18n' ); ?></span>
5
+		<span class="displaying-num"><?php echo !empty($array_service) ? count($array_service) : 0; _e(' item(s)', 'wpeolog-i18n'); ?></span>
6 6
 	</div>
7 7
 </div>
8 8
 
9 9
 
10
-<form action="<?php echo admin_url( 'admin-post.php' ); ?>" method="post">
10
+<form action="<?php echo admin_url('admin-post.php'); ?>" method="post">
11 11
 	<input type="hidden" name="action" value="edit_service" />
12 12
 
13 13
 	<table class="wp-list-table widefat fixed striped posts">
14 14
 		<thead>
15 15
 		<tr>			
16
-			<th scope="col" id="id" class="manage-column"><?php _e( 'ID', 'wpeolog-i18n' ); ?></th>
17
-			<th scope="col" id="active" class="manage-column"><?php _e( 'Active', 'wpeolog-i18n' ); ?></th>
16
+			<th scope="col" id="id" class="manage-column"><?php _e('ID', 'wpeolog-i18n'); ?></th>
17
+			<th scope="col" id="active" class="manage-column"><?php _e('Active', 'wpeolog-i18n'); ?></th>
18 18
 			<th scope="col" id="title" class="manage-column column-title column-primary sortable desc">
19
-				<?php _e( 'Name', 'wpeolog-i18n' ); ?></th>			
20
-			<th scope="col" id="size" class="manage-column"><?php _e( 'Size', 'wpeolog-i18n' ); ?></th>
21
-			<th scope="col" id="size-format" class="manage-column"><?php _e( 'File size', 'wpeolog-i18n' ); ?></th>
22
-			<th scope="col" id="rotate" class="manage-column"><?php _e( 'File rotate', 'wpeolog-i18n' ); ?></th>
23
-			<th scope="col" id="number-file" class="manage-column"><?php _e( 'Number file', 'wpeolog-i18n' ); ?></th>
19
+				<?php _e('Name', 'wpeolog-i18n'); ?></th>			
20
+			<th scope="col" id="size" class="manage-column"><?php _e('Size', 'wpeolog-i18n'); ?></th>
21
+			<th scope="col" id="size-format" class="manage-column"><?php _e('File size', 'wpeolog-i18n'); ?></th>
22
+			<th scope="col" id="rotate" class="manage-column"><?php _e('File rotate', 'wpeolog-i18n'); ?></th>
23
+			<th scope="col" id="number-file" class="manage-column"><?php _e('Number file', 'wpeolog-i18n'); ?></th>
24 24
 			</tr>
25 25
 		</thead>
26 26
 
27 27
 		<tbody id="the-list">
28
-			<?php if ( !empty( $array_service ) ): ?>
29
-				<?php foreach ( $array_service as $key => $service ): ?>
28
+			<?php if (!empty($array_service)): ?>
29
+				<?php foreach ($array_service as $key => $service): ?>
30 30
 					<tr>
31 31
 						<td><?php echo $key; ?></td>
32 32
 						<th scope="row">
33
-							<input type="hidden" name="service[<?php echo $key; ?>][created_date]" value="<?php echo !empty( $service['created_date'] ) ? $service['created_date'] : ''; ?>" />
34
-							<input type="checkbox" name="service[<?php echo $key; ?>][active]" <?php echo !empty( $service['active'] ) ? 'checked="checked"' : ''; ?> />
33
+							<input type="hidden" name="service[<?php echo $key; ?>][created_date]" value="<?php echo !empty($service['created_date']) ? $service['created_date'] : ''; ?>" />
34
+							<input type="checkbox" name="service[<?php echo $key; ?>][active]" <?php echo !empty($service['active']) ? 'checked="checked"' : ''; ?> />
35 35
 						</th>
36 36
 						<td>
37
-							<input type="text" name="service[<?php echo $key; ?>][name]" value="<?php echo !empty( $service['name'] ) ? $service['name'] : ''; ?>" />
37
+							<input type="text" name="service[<?php echo $key; ?>][name]" value="<?php echo !empty($service['name']) ? $service['name'] : ''; ?>" />
38 38
 							<div class="row-actions">
39
-								<span class="trash"><a class="submitdelete" title="<?php _e( 'Move this item to the Trash', 'wpeolog-i18n' ); ?>" href="<?php echo wp_nonce_url( admin_url( 'admin-post.php?service_id=' . $key . '&action=to_trash' ), 'to_trash_' . $key ); ?>"><?php _e( 'Trash', 'wpeolog-i18n' ); ?></a> </span>
39
+								<span class="trash"><a class="submitdelete" title="<?php _e('Move this item to the Trash', 'wpeolog-i18n'); ?>" href="<?php echo wp_nonce_url(admin_url('admin-post.php?service_id=' . $key . '&action=to_trash'), 'to_trash_' . $key); ?>"><?php _e('Trash', 'wpeolog-i18n'); ?></a> </span>
40 40
 							</div>
41 41
 						</td>
42
-						<td><input type="text" name="service[<?php echo $key; ?>][size]" value="<?php echo !empty( $service['size'] ) ? $this->convert_to( $service['size'], $service['format'] , false ) : ''; ?>" /></td>
42
+						<td><input type="text" name="service[<?php echo $key; ?>][size]" value="<?php echo !empty($service['size']) ? $this->convert_to($service['size'], $service['format'], false) : ''; ?>" /></td>
43 43
 						<td>
44 44
 							<select name="service[<?php echo $key; ?>][format]">
45
-						    	<?php if ( !empty( $array_size_format ) ): ?>
46
-						    		<?php foreach ( $array_size_format as $key_format => $value ): ?>
47
-						       			<option <?php echo selected( !empty( $service['format'] ) ? $service['format'] : 'oc', $key_format ); ?> value='<?php echo $key_format; ?>'><?php echo $value; ?></option>
45
+						    	<?php if (!empty($array_size_format)): ?>
46
+						    		<?php foreach ($array_size_format as $key_format => $value): ?>
47
+						       			<option <?php echo selected(!empty($service['format']) ? $service['format'] : 'oc', $key_format); ?> value='<?php echo $key_format; ?>'><?php echo $value; ?></option>
48 48
 						      		<?php endforeach; ?>
49 49
 						   	 	<?php endif; ?>
50 50
 							</select>
51 51
 						</td>
52 52
 						<td>
53 53
 							<select name="service[<?php echo $key; ?>][rotate]">
54
-								<?php if ( !empty( $array_file_rotate_dropdown ) ): ?>
55
-									<?php foreach ( $array_file_rotate_dropdown as $key_rotate => $value ): ?>
56
-										<option <?php echo selected( !empty( $service['rotate'] ) ? $service['rotate'] : 'on', $key_rotate ); ?> value='<?php echo $key_rotate; ?>'><?php echo $value; ?></option>
54
+								<?php if (!empty($array_file_rotate_dropdown)): ?>
55
+									<?php foreach ($array_file_rotate_dropdown as $key_rotate => $value): ?>
56
+										<option <?php echo selected(!empty($service['rotate']) ? $service['rotate'] : 'on', $key_rotate); ?> value='<?php echo $key_rotate; ?>'><?php echo $value; ?></option>
57 57
 									<?php endforeach; ?>
58 58
 								<?php endif; ?>
59 59
 							</select>
60 60
 						</td>
61
-						<td><input type="text" name="service[<?php echo $key; ?>][number]" value="<?php echo !empty( $service['number'] ) ? $service['number'] : 0; ?>" /></td>
61
+						<td><input type="text" name="service[<?php echo $key; ?>][number]" value="<?php echo !empty($service['number']) ? $service['number'] : 0; ?>" /></td>
62 62
 					</tr>
63 63
 				<?php endforeach; ?>
64 64
 			<?php else: ?>
65 65
 				<tr>
66
-					<td><?php _e( 'No services found.', 'wpeolog-i18n' ); ?></td>
66
+					<td><?php _e('No services found.', 'wpeolog-i18n'); ?></td>
67 67
 				</tr>
68 68
 			<?php endif; ?>
69 69
 		</tbody>
70 70
 
71 71
 		<tfoot>
72 72
 			<tr>			
73
-				<th scope="col" id="id" class="manage-column"><?php _e( 'ID', 'wpeolog-i18n' ); ?></th>
74
-				<th scope="col" id="active" class="manage-column"><?php _e( 'Active', 'wpeolog-i18n' ); ?></th>
75
-				<th scope="col" id="title" class="manage-column column-title column-primary sortable desc"><?php _e( 'Name', 'wpeolog-i18n' ); ?></th>			
76
-				<th scope="col" id="size" class="manage-column"><?php _e( 'Size', 'wpeolog-i18n' ); ?></th>
77
-				<th scope="col" id="size-format" class="manage-column"><?php _e( 'File size', 'wpeolog-i18n' ); ?></th>
78
-				<th scope="col" id="rotate" class="manage-column"><?php _e( 'File rotate', 'wpeolog-i18n' ); ?></th>
79
-				<th scope="col" id="number-file" class="manage-column"><?php _e( 'Number file', 'wpeolog-i18n' ); ?></th>
73
+				<th scope="col" id="id" class="manage-column"><?php _e('ID', 'wpeolog-i18n'); ?></th>
74
+				<th scope="col" id="active" class="manage-column"><?php _e('Active', 'wpeolog-i18n'); ?></th>
75
+				<th scope="col" id="title" class="manage-column column-title column-primary sortable desc"><?php _e('Name', 'wpeolog-i18n'); ?></th>			
76
+				<th scope="col" id="size" class="manage-column"><?php _e('Size', 'wpeolog-i18n'); ?></th>
77
+				<th scope="col" id="size-format" class="manage-column"><?php _e('File size', 'wpeolog-i18n'); ?></th>
78
+				<th scope="col" id="rotate" class="manage-column"><?php _e('File rotate', 'wpeolog-i18n'); ?></th>
79
+				<th scope="col" id="number-file" class="manage-column"><?php _e('Number file', 'wpeolog-i18n'); ?></th>
80 80
 			</tr>
81 81
 		</tfoot>
82 82
 	</table>
83 83
 	
84 84
 	<div class="tablenav bottom">
85 85
 		<div class="alignleft actions bulkactions">
86
-			<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e( 'Save Changes', 'wpeolog-i18n'); ?>" />
87
-			<a href="<?php echo admin_url( 'tools.php?page=wpeo-log-page' ); ?>" class="button"><?php _e( 'Back', 'wpeolog-i18n'); ?></a>
86
+			<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e('Save Changes', 'wpeolog-i18n'); ?>" />
87
+			<a href="<?php echo admin_url('tools.php?page=wpeo-log-page'); ?>" class="button"><?php _e('Back', 'wpeolog-i18n'); ?></a>
88 88
 		</div>
89 89
 	</div>
90 90
 
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,7 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit; ?>
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
4
+?>
2 5
 
3 6
 <div class="tablenav top">	
4 7
  	<div class="tablenav-pages">
@@ -61,9 +64,12 @@  discard block
 block discarded – undo
61 64
 						<td><input type="text" name="service[<?php echo $key; ?>][number]" value="<?php echo !empty( $service['number'] ) ? $service['number'] : 0; ?>" /></td>
62 65
 					</tr>
63 66
 				<?php endforeach; ?>
64
-			<?php else: ?>
67
+			<?php else {
68
+	: ?>
65 69
 				<tr>
66
-					<td><?php _e( 'No services found.', 'wpeolog-i18n' ); ?></td>
70
+					<td><?php _e( 'No services found.', 'wpeolog-i18n' );
71
+}
72
+?></td>
67 73
 				</tr>
68 74
 			<?php endif; ?>
69 75
 		</tbody>
Please login to merge, or discard this patch.