Completed
Push — master ( 409d21...32c778 )
by
unknown
12:55
created
includes/modules/wps_address/templates/frontend/address-content.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,13 +16,11 @@
 block discarded – undo
16 16
 	if( !empty($selected_address) && $address_id == $selected_address ) {
17 17
 		$class = 'wps-activ';
18 18
 		$checked = 'checked="checked"';
19
-	}
20
-	else {
19
+	} else {
21 20
 		if( $i == 0 && empty($selected_address) ) {
22 21
 			$checked = 'checked="checked"';
23 22
 			$class = 'wps-activ';
24
-		}
25
-		else {
23
+		} else {
26 24
 			$checked = $class = '';
27 25
 		}
28 26
 	}
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,24 +1,24 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $i = 0;
3
-if ( !empty($list_addresses) ) :
4
-	foreach( $list_addresses as $address_id => $address ) :
3
+if (!empty($list_addresses)) :
4
+	foreach ($list_addresses as $address_id => $address) :
5 5
 	$name_to_display  = '';
6
-	$name_to_display .= ( !empty($address['address_last_name']) ) ? $address['address_last_name'].' ': '';
7
-	$name_to_display .= ( !empty($address['address_first_name']) ) ? $address['address_first_name'].' - ': '';
8
-	$name_to_display .= ( !empty($address['address']) ) ? $address['address'].' ': '';
9
-	$name_to_display .= ( !empty($address['postcode']) ) ? $address['postcode'].' ': '';
10
-	$name_to_display .= ( !empty($address['city']) ) ? $address['city'].' ': '';
6
+	$name_to_display .= (!empty($address['address_last_name'])) ? $address['address_last_name'] . ' ' : '';
7
+	$name_to_display .= (!empty($address['address_first_name'])) ? $address['address_first_name'] . ' - ' : '';
8
+	$name_to_display .= (!empty($address['address'])) ? $address['address'] . ' ' : '';
9
+	$name_to_display .= (!empty($address['postcode'])) ? $address['postcode'] . ' ' : '';
10
+	$name_to_display .= (!empty($address['city'])) ? $address['city'] . ' ' : '';
11 11
 
12 12
 	$class = $checked = '';
13 13
 
14
-	$selected_address = ( !empty($_SESSION[ $type.'_address' ] ) ) ? $_SESSION[ $type.'_address' ] : '';
14
+	$selected_address = (!empty($_SESSION[$type . '_address'])) ? $_SESSION[$type . '_address'] : '';
15 15
 
16
-	if( !empty($selected_address) && $address_id == $selected_address ) {
16
+	if (!empty($selected_address) && $address_id == $selected_address) {
17 17
 		$class = 'wps-activ';
18 18
 		$checked = 'checked="checked"';
19 19
 	}
20 20
 	else {
21
-		if( $i == 0 && empty($selected_address) ) {
21
+		if ($i == 0 && empty($selected_address)) {
22 22
 			$checked = 'checked="checked"';
23 23
 			$class = 'wps-activ';
24 24
 		}
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
 ?>
31 31
 		<li class="<?php echo $class; ?> wps-bloc-loader">
32 32
 			<span><input type="radio" class="wps_select_address" value="<?php echo $address_id; ?>" name="<?php echo $type; ?>_address_id" id="wps_select_address_<?php echo $address_id; ?>" <?php echo $checked; ?> /></span>
33
-			<span><strong><?php echo ( ( !empty($address['address_title']) ) ? $address['address_title'] : '' ); ?></strong></span>
33
+			<span><strong><?php echo ((!empty($address['address_title'])) ? $address['address_title'] : ''); ?></strong></span>
34 34
 			<span><?php echo $name_to_display; ?></span>
35 35
 			<span class="wps-itemList-tools">
36
-				<a href="" title="<?php _e( 'Edit this address', 'wpshop' ); ?>" class="wps-address-edit-address" id="wps-address-edit-address-<?php echo $address_id; ?>" data-address_type="<?php echo $address_type_id; ?>" data-nonce="<?php echo wp_create_nonce( 'wps_load_address_form_' . $address_type_id ); ?>" ><i class="wps-icon-pencil"></i></a>
37
-				<a href="" title="<?php _e( 'Delete this address', 'wpshop' ); ?>" class="wps-address-delete-address" id="wps-address-delete-address-<?php echo $address_id; ?>-<?php echo $address_type_id; ?>" data-nonce="<?php echo wp_create_nonce( 'wps_delete_an_address' ); ?>" ><i class="wps-icon-trash"></i></a>
36
+				<a href="" title="<?php _e('Edit this address', 'wpshop'); ?>" class="wps-address-edit-address" id="wps-address-edit-address-<?php echo $address_id; ?>" data-address_type="<?php echo $address_type_id; ?>" data-nonce="<?php echo wp_create_nonce('wps_load_address_form_' . $address_type_id); ?>" ><i class="wps-icon-pencil"></i></a>
37
+				<a href="" title="<?php _e('Delete this address', 'wpshop'); ?>" class="wps-address-delete-address" id="wps-address-delete-address-<?php echo $address_id; ?>-<?php echo $address_type_id; ?>" data-nonce="<?php echo wp_create_nonce('wps_delete_an_address'); ?>" ><i class="wps-icon-trash"></i></a>
38 38
 			</span>
39 39
 			<div class="wps-itemList-content">
40
-				<?php echo wps_address::display_an_address( $address, $address_id ); ?>
40
+				<?php echo wps_address::display_an_address($address, $address_id); ?>
41 41
 			</div>
42 42
 		</li>
43 43
 <?php
Please login to merge, or discard this patch.
includes/modules/wps_address/templates/backend/addresses.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1
-<?php if ( !empty($addresses) ) : ?>
1
+<?php if (!empty($addresses)) : ?>
2 2
 <ul class="wps-addresses-list" >
3 3
 	<?php
4
-		foreach ( $addresses as $address_type => $addresses_list_by_type ) :
5
-			foreach ( $addresses_list_by_type as $address_id => $address ) :
4
+		foreach ($addresses as $address_type => $addresses_list_by_type) :
5
+			foreach ($addresses_list_by_type as $address_id => $address) :
6 6
 	?>
7
-	<li id="wps-address-item-<?php echo $address_id ; ?>" >
8
-	<?php require( wpshop_tools::get_template_part( WPS_ADDRESS_DIR, WPS_LOCALISATION_TEMPLATES_MAIN_DIR, "backend", "address" ) ); ?>
7
+	<li id="wps-address-item-<?php echo $address_id; ?>" >
8
+	<?php require(wpshop_tools::get_template_part(WPS_ADDRESS_DIR, WPS_LOCALISATION_TEMPLATES_MAIN_DIR, "backend", "address")); ?>
9 9
 	</li>
10 10
 	<?php
11 11
 			endforeach;
@@ -13,5 +13,5 @@  discard block
 block discarded – undo
13 13
 	?>
14 14
 </ul>
15 15
 <?php else: ?>
16
-<span class="wps-addresses-list wps-no-result" ><?php _e( 'No addresses founded', 'wpeo_geoloc' ); ?></span>
16
+<span class="wps-addresses-list wps-no-result" ><?php _e('No addresses founded', 'wpeo_geoloc'); ?></span>
17 17
 <?php endif; ?>
18 18
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,6 +12,9 @@
 block discarded – undo
12 12
 		endforeach;
13 13
 	?>
14 14
 </ul>
15
-<?php else: ?>
16
-<span class="wps-addresses-list wps-no-result" ><?php _e( 'No addresses founded', 'wpeo_geoloc' ); ?></span>
15
+<?php else {
16
+	: ?>
17
+<span class="wps-addresses-list wps-no-result" ><?php _e( 'No addresses founded', 'wpeo_geoloc' );
18
+}
19
+?></span>
17 20
 <?php endif; ?>
18 21
\ No newline at end of file
Please login to merge, or discard this patch.
includes/modules/wps_address/templates/backend/js/header.js.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 <script type="text/javascript" >
4
-	var wps_address_loading_picture = "<img src='<?php echo admin_url( "images/loading.gif" ); ?>' />";
4
+	var wps_address_loading_picture = "<img src='<?php echo admin_url("images/loading.gif"); ?>' />";
5 5
 </script>
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,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 ?>
3 5
 <script type="text/javascript" >
4 6
 	var wps_address_loading_picture = "<img src='<?php echo admin_url( "images/loading.gif" ); ?>' />";
Please login to merge, or discard this patch.
includes/modules/wps_address/templates/backend/address-content.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
 global $post_id;
3 5
 $post_id = ( !empty($order_id) ) ? $order_id : $post_id;
4 6
 $order_infos = get_post_meta( $post_id, '_order_info', true );
@@ -27,8 +29,7 @@  discard block
 block discarded – undo
27 29
 	if( !empty($selected_address) && $address_id == $selected_address ) {
28 30
 		$class = 'wps-activ';
29 31
 		$checked = 'checked="checked"';
30
-	}
31
-	else {
32
+	} else {
32 33
 		if( $i == 0 && empty($selected_address) ) {
33 34
 			$checked = 'checked="checked"';
34 35
 			$class = 'wps-activ';
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,57 +1,57 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 global $post_id;
3
-$post_id = ( !empty($order_id) ) ? $order_id : $post_id;
4
-$order_infos = get_post_meta( $post_id, '_order_info', true );
5
-$order_meta = get_post_meta( $post_id, '_order_postmeta', true );
3
+$post_id = (!empty($order_id)) ? $order_id : $post_id;
4
+$order_infos = get_post_meta($post_id, '_order_info', true);
5
+$order_meta = get_post_meta($post_id, '_order_postmeta', true);
6 6
 $i = 0;
7 7
 
8
-if ( !empty($list_addresses) ) :
9
-	foreach( $list_addresses as $address_id => $address ) :
10
-	$adress_post = get_post( $address_id );
8
+if (!empty($list_addresses)) :
9
+	foreach ($list_addresses as $address_id => $address) :
10
+	$adress_post = get_post($address_id);
11 11
 	$name_to_display  = $customer_name = '';
12
-	$customer_name  = ( !empty($address['address_last_name']) ) ? $address['address_last_name'].' ': '';
13
-	$customer_name .= ( !empty($address['address_first_name']) ) ? $address['address_first_name'].' - ': '';
14
-	$name_to_display .= ( !empty($address['address']) ) ? $address['address'].' ': '';
15
-	$name_to_display .= ( !empty($address['postcode']) ) ? $address['postcode'].' ': '';
16
-	$name_to_display .= ( !empty($address['city']) ) ? $address['city'].' ': '';
17
-	$name_to_display .= ( !empty($address['country']) ) ? $address['country'].' ': '';
12
+	$customer_name  = (!empty($address['address_last_name'])) ? $address['address_last_name'] . ' ' : '';
13
+	$customer_name .= (!empty($address['address_first_name'])) ? $address['address_first_name'] . ' - ' : '';
14
+	$name_to_display .= (!empty($address['address'])) ? $address['address'] . ' ' : '';
15
+	$name_to_display .= (!empty($address['postcode'])) ? $address['postcode'] . ' ' : '';
16
+	$name_to_display .= (!empty($address['city'])) ? $address['city'] . ' ' : '';
17
+	$name_to_display .= (!empty($address['country'])) ? $address['country'] . ' ' : '';
18 18
 
19 19
 	$class = $checked = $selected_address = '';
20
-	if( !empty( $order_infos ) && !empty( $order_infos[$type]) && !empty($order_infos[$type]['address_id']) ) {
21
-		if( $adress_post->post_author == $customer_id && $customer_id == $order_meta['customer_id'] ) {
20
+	if (!empty($order_infos) && !empty($order_infos[$type]) && !empty($order_infos[$type]['address_id'])) {
21
+		if ($adress_post->post_author == $customer_id && $customer_id == $order_meta['customer_id']) {
22 22
 			$selected_address = $order_infos[$type]['address_id'];
23 23
 
24 24
 		}
25 25
 	}
26 26
 
27
-	if( !empty($selected_address) && $address_id == $selected_address ) {
27
+	if (!empty($selected_address) && $address_id == $selected_address) {
28 28
 		$class = 'wps-activ';
29 29
 		$checked = 'checked="checked"';
30 30
 	}
31 31
 	else {
32
-		if( $i == 0 && empty($selected_address) ) {
32
+		if ($i == 0 && empty($selected_address)) {
33 33
 			$checked = 'checked="checked"';
34 34
 			$class = 'wps-activ';
35 35
 		}
36 36
 	}
37 37
 
38 38
 	$url_separator = '?';
39
-	if ( strpos( admin_url( 'admin-ajax.php' ), '?' ) ) :
39
+	if (strpos(admin_url('admin-ajax.php'), '?')) :
40 40
 		$url_separator = '&';
41 41
 	endif;
42 42
 ?>
43 43
 		<li class="<?php echo $class; ?> wps-bloc-loader wps_address_li">
44 44
 			<span><input type="radio" class="wps_select_address" value="<?php echo $address_id; ?>" name="<?php echo $type; ?>_address_id" id="wps_select_address_<?php echo $address_id; ?>" <?php echo $checked; ?> /></span>
45
-			<span><strong><?php echo ( ( !empty($customer_name) ) ? $customer_name : '' ); ?></strong></span>
45
+			<span><strong><?php echo ((!empty($customer_name)) ? $customer_name : ''); ?></strong></span>
46 46
 			<span><?php echo $name_to_display; ?></span>
47 47
 			<span class="wps-itemList-tools">
48 48
 				<!-- wps_delete_an_address -->
49
-				<a href="<?php print wp_nonce_url( admin_url( 'admin-ajax.php' ) . $url_separator . 'action=wps_order_load_address_edit_form&address_id=' . $address_id . '&address_type=' . $address_type_id . '&customer_id=' . $customer_id . '&width=740&height=690', 'load_adress_edit_form', '_wpnonce' ); ?>" title="<?php _e( 'Edit this address', 'wpshop' ); ?>" class="wps-address-edit-address  thickbox" id="wps-address-edit-address-<?php echo $address_id; ?>"><i class="wps-icon-pencil"></i></a>
50
-				<a href="" data-nonce="<?php echo wp_create_nonce( 'delete_address_in_order_panel_' . $address_id . '-' . $address_type_id ); ?>" title="<?php _e( 'Delete this address', 'wpshop' ); ?>" class="wps-address-delete-address" id="wps-address-delete-address-<?php echo $address_id; ?>-<?php echo $address_type_id; ?>"><i class="wps-icon-trash"></i></a>
49
+				<a href="<?php print wp_nonce_url(admin_url('admin-ajax.php') . $url_separator . 'action=wps_order_load_address_edit_form&address_id=' . $address_id . '&address_type=' . $address_type_id . '&customer_id=' . $customer_id . '&width=740&height=690', 'load_adress_edit_form', '_wpnonce'); ?>" title="<?php _e('Edit this address', 'wpshop'); ?>" class="wps-address-edit-address  thickbox" id="wps-address-edit-address-<?php echo $address_id; ?>"><i class="wps-icon-pencil"></i></a>
50
+				<a href="" data-nonce="<?php echo wp_create_nonce('delete_address_in_order_panel_' . $address_id . '-' . $address_type_id); ?>" title="<?php _e('Delete this address', 'wpshop'); ?>" class="wps-address-delete-address" id="wps-address-delete-address-<?php echo $address_id; ?>-<?php echo $address_type_id; ?>"><i class="wps-icon-trash"></i></a>
51 51
 			</span>
52 52
 		</li>
53
-		<li class="wps_address_li_content"<?php echo ($checked) ? ' style="display: list-item;"' : '';?>>
54
-			<?php echo wps_address::display_an_address( $address, $address_id ); ?>
53
+		<li class="wps_address_li_content"<?php echo ($checked) ? ' style="display: list-item;"' : ''; ?>>
54
+			<?php echo wps_address::display_an_address($address, $address_id); ?>
55 55
 		</li>
56 56
 <?php
57 57
 		$i++;
Please login to merge, or discard this patch.
includes/modules/wps_address/templates/backend/address.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,27 +1,27 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 	<div class="wps-address-item-header">
4
-		<a href="#" class="<?php if (empty( $address_open )) : ?>wps-address-arrow-right<?php else: ?>wps-address-arrow-down<?php endif; ?>" >
5
-			<?php if ( array_key_exists( 'address_title', $address ) ) :?>
6
-				<?php echo $address[ 'address_title' ]; ?>
4
+		<a href="#" class="<?php if (empty($address_open)) : ?>wps-address-arrow-right<?php else: ?>wps-address-arrow-down<?php endif; ?>" >
5
+			<?php if (array_key_exists('address_title', $address)) :?>
6
+				<?php echo $address['address_title']; ?>
7 7
 			<?php else: ?>
8 8
 				<?php
9 9
 					global $wpdb;
10
-					$query = $wpdb->prepare( "SELECT name FROM " . WPSHOP_DBT_ATTRIBUTE_SET . " WHERE id = %d", $address_type );
11
-					echo __( $wpdb->get_var( $query ), 'wpshop' );
10
+					$query = $wpdb->prepare("SELECT name FROM " . WPSHOP_DBT_ATTRIBUTE_SET . " WHERE id = %d", $address_type);
11
+					echo __($wpdb->get_var($query), 'wpshop');
12 12
 				?>
13
-			<?php endif;?>
13
+			<?php endif; ?>
14 14
 		</a>
15 15
 		<span class="wps-address-actions-container alignright" >
16
-			<a href="#" class="wps-address-icon-black wps-address-icon-edit alignleft" id="wps-address-action-edit-for-<?php echo $address_id ; ?>" title="<?php _e( 'Edit address', 'wpeo_geoloc' ); ?>" ></a>
16
+			<a href="#" class="wps-address-icon-black wps-address-icon-edit alignleft" id="wps-address-action-edit-for-<?php echo $address_id; ?>" title="<?php _e('Edit address', 'wpeo_geoloc'); ?>" ></a>
17 17
 		</span>
18 18
 	</div>
19
-	<div class="wps-address-item-content"<?php if (empty( $address_open )) : ?> style="display:none;"<?php endif; ?> >
19
+	<div class="wps-address-item-content"<?php if (empty($address_open)) : ?> style="display:none;"<?php endif; ?> >
20 20
 		<div class="alignleft" >
21
-			<?php echo wps_address::display_an_address( $address ) ; ?>
21
+			<?php echo wps_address::display_an_address($address); ?>
22 22
 		</div>
23
-		<?php do_action( 'wps-address-display-hook', array(
23
+		<?php do_action('wps-address-display-hook', array(
24 24
 			'address_id' => $address_id,
25 25
 			'address' => $address,
26
-		) ); ?>
26
+		)); ?>
27 27
 	</div>
28 28
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +10 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,12 +1,19 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 ?>
3 5
 	<div class="wps-address-item-header">
4
-		<a href="#" class="<?php if (empty( $address_open )) : ?>wps-address-arrow-right<?php else: ?>wps-address-arrow-down<?php endif; ?>" >
6
+		<a href="#" class="<?php if (empty( $address_open )) : ?>wps-address-arrow-right<?php else {
7
+	: ?>wps-address-arrow-down<?php endif;
8
+}
9
+?>" >
5 10
 			<?php if ( array_key_exists( 'address_title', $address ) ) :?>
6 11
 				<?php echo $address[ 'address_title' ]; ?>
7
-			<?php else: ?>
12
+			<?php else {
13
+	: ?>
8 14
 				<?php
9 15
 					global $wpdb;
16
+}
10 17
 					$query = $wpdb->prepare( "SELECT name FROM " . WPSHOP_DBT_ATTRIBUTE_SET . " WHERE id = %d", $address_type );
11 18
 					echo __( $wpdb->get_var( $query ), 'wpshop' );
12 19
 				?>
Please login to merge, or discard this patch.
includes/modules/wps_address/templates/backend/admin-address-content.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
 <div class="wps-boxed summary_shipping_boxed">
4 4
 	<?php $first = true; ?>
@@ -6,16 +6,16 @@  discard block
 block discarded – undo
6 6
 	<div class="wps-form-group">
7 7
 		<div class="wps-form">
8 8
 		<select name="wps_order_address_<?php echo $address_type; ?>">
9
-			<?php foreach( $addresses_datas as $address_id => $address_data ) : ?>
10
-					<option value="<?php echo $address_id; ?>"><?php echo ( !empty($address_data['address_title']) ) ? $address_data['address_title'] : ''; ?></option>
9
+			<?php foreach ($addresses_datas as $address_id => $address_data) : ?>
10
+					<option value="<?php echo $address_id; ?>"><?php echo (!empty($address_data['address_title'])) ? $address_data['address_title'] : ''; ?></option>
11 11
 			<?php endforeach; ?>
12 12
 		</select>
13 13
 		</div>
14 14
 	<div>
15 15
 			<ul>
16
-				<?php foreach( $addresses_datas as $address_id => $address_data ) : ?>
17
-				<li class="<?php echo ( !$first ) ? 'wpshopHide' : ''; ?>">
18
-					<?php echo wps_address::display_an_address( $address_data, '', $address_type ); ?>
16
+				<?php foreach ($addresses_datas as $address_id => $address_data) : ?>
17
+				<li class="<?php echo (!$first) ? 'wpshopHide' : ''; ?>">
18
+					<?php echo wps_address::display_an_address($address_data, '', $address_type); ?>
19 19
 				</li>
20 20
 				<?php $first = false; ?>
21 21
 				<?php endforeach; ?>
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
 <div class="wps-boxed summary_shipping_boxed">
4 6
 	<?php $first = true; ?>
Please login to merge, or discard this patch.
wps_address/templates/backend/addresses_listtable/address_content.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
2
-if ( !empty( $address_meta ) && !empty( $address_meta[ '_wpshop_address_metadata' ] ) && !empty( $address_meta[ '_wpshop_address_metadata' ][ 0 ] ) ) : ?>
3
-	<?php $address = unserialize( $address_meta[ '_wpshop_address_metadata' ][ 0 ] ); ?>
4
-	<?php echo wps_address::display_an_address( $address, $post_id ); ?>
1
+<?php if (!defined('ABSPATH')) exit;
2
+if (!empty($address_meta) && !empty($address_meta['_wpshop_address_metadata']) && !empty($address_meta['_wpshop_address_metadata'][0])) : ?>
3
+	<?php $address = unserialize($address_meta['_wpshop_address_metadata'][0]); ?>
4
+	<?php echo wps_address::display_an_address($address, $post_id); ?>
5 5
 <?php else:  ?>
6
-	<div class="wps-alert-info"><?php _e( 'This address has no informations', 'wpshop'); ?></div>
6
+	<div class="wps-alert-info"><?php _e('This address has no informations', 'wpshop'); ?></div>
7 7
 <?php endif; ?>
8 8
\ 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,7 +1,12 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 if ( !empty( $address_meta ) && !empty( $address_meta[ '_wpshop_address_metadata' ] ) && !empty( $address_meta[ '_wpshop_address_metadata' ][ 0 ] ) ) : ?>
3 5
 	<?php $address = unserialize( $address_meta[ '_wpshop_address_metadata' ][ 0 ] ); ?>
4 6
 	<?php echo wps_address::display_an_address( $address, $post_id ); ?>
5
-<?php else:  ?>
6
-	<div class="wps-alert-info"><?php _e( 'This address has no informations', 'wpshop'); ?></div>
7
+<?php else {
8
+	:  ?>
9
+	<div class="wps-alert-info"><?php _e( 'This address has no informations', 'wpshop');
10
+}
11
+?></div>
7 12
 <?php endif; ?>
8 13
\ No newline at end of file
Please login to merge, or discard this patch.
wps_address/templates/backend/addresses_listtable/address_identifier.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<a href="<?php echo admin_url( 'post.php?post=' . $post_id . '&amp;action=edit' ); ?>" ><?php echo $post_id; ?></a>
1
+<a href="<?php echo admin_url('post.php?post=' . $post_id . '&amp;action=edit'); ?>" ><?php echo $post_id; ?></a>
2 2
 <div class="row-actions" >
3
-	<a href="<?php echo admin_url( 'post.php?post=' . $post_id . '&amp;action=edit' ); ?>" ><?php _e( 'Edit' ); ?></a>
3
+	<a href="<?php echo admin_url('post.php?post=' . $post_id . '&amp;action=edit'); ?>" ><?php _e('Edit'); ?></a>
4 4
 </div>
5 5
\ No newline at end of file
Please login to merge, or discard this patch.
modules/wps_address/templates/backend/addresses_listtable/address_type.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
2
- if ( !empty( $address_meta ) && !empty( $address_meta[ '_wpshop_address_attribute_set_id' ] ) && !empty( $address_meta[ '_wpshop_address_attribute_set_id' ][ 0 ] ) ) : ?>
3
-	<?php $address_attribute_set = wpshop_attributes_set::getElement( $address_meta[ '_wpshop_address_attribute_set_id' ][ 0 ], "'valid','deleted'" ); ?>
4
-	<a target="_wps_attribute_set_edition_page" href="<?php echo admin_url( 'admin.php?page=wpshop_attribute_group&action=edit&id=' . $address_attribute_set->id ); ?>" ><?php echo $address_attribute_set->name; ?></a>
1
+<?php if (!defined('ABSPATH')) exit;
2
+ if (!empty($address_meta) && !empty($address_meta['_wpshop_address_attribute_set_id']) && !empty($address_meta['_wpshop_address_attribute_set_id'][0])) : ?>
3
+	<?php $address_attribute_set = wpshop_attributes_set::getElement($address_meta['_wpshop_address_attribute_set_id'][0], "'valid','deleted'"); ?>
4
+	<a target="_wps_attribute_set_edition_page" href="<?php echo admin_url('admin.php?page=wpshop_attribute_group&action=edit&id=' . $address_attribute_set->id); ?>" ><?php echo $address_attribute_set->name; ?></a>
5 5
 <?php else:  ?>
6
-	<div class="wps-alert-info"><?php _e( 'No type setted for address', 'wpshop'); ?></div>
6
+	<div class="wps-alert-info"><?php _e('No type setted for address', 'wpshop'); ?></div>
7 7
 <?php endif; ?>
8 8
\ 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,7 +1,12 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
  if ( !empty( $address_meta ) && !empty( $address_meta[ '_wpshop_address_attribute_set_id' ] ) && !empty( $address_meta[ '_wpshop_address_attribute_set_id' ][ 0 ] ) ) : ?>
3 5
 	<?php $address_attribute_set = wpshop_attributes_set::getElement( $address_meta[ '_wpshop_address_attribute_set_id' ][ 0 ], "'valid','deleted'" ); ?>
4 6
 	<a target="_wps_attribute_set_edition_page" href="<?php echo admin_url( 'admin.php?page=wpshop_attribute_group&action=edit&id=' . $address_attribute_set->id ); ?>" ><?php echo $address_attribute_set->name; ?></a>
5
-<?php else:  ?>
6
-	<div class="wps-alert-info"><?php _e( 'No type setted for address', 'wpshop'); ?></div>
7
+<?php else {
8
+	:  ?>
9
+	<div class="wps-alert-info"><?php _e( 'No type setted for address', 'wpshop');
10
+}
11
+?></div>
7 12
 <?php endif; ?>
8 13
\ No newline at end of file
Please login to merge, or discard this patch.