Completed
Pull Request — master (#2)
by Jimmy
1216:52 queued 1185:43
created
includes/modules/wps_address/templates/backend/address-container.php 2 patches
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
 $box_content = wps_address::display_address_interface_content($address_type_id, $address_title, '', $address_type, $customer_id, true, $order_id );
3 5
 ?>
4 6
 
@@ -10,8 +12,11 @@  discard block
 block discarded – undo
10 12
 			<ul class="wps-itemList wps-address-container" id="wps-address-container-<?php echo $address_type_id; ?>">
11 13
 				<?php if( !empty($box_content) ): ?>
12 14
 				<?php echo $box_content; ?>
13
-				<?php else : ?>
14
-					<div class="wps-alert-info"><?php printf( __( 'You do not have create a %s', 'wpshop'), strtolower( $address_title ) ); ?></div>
15
+				<?php else {
16
+	: ?>
17
+					<div class="wps-alert-info"><?php printf( __( 'You do not have create a %s', 'wpshop'), strtolower( $address_title ) );
18
+}
19
+?></div>
15 20
 				<?php endif; ?>
16 21
 			</ul>
17 22
 		</div>
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
2
-$box_content = wps_address::display_address_interface_content($address_type_id, $address_title, '', $address_type, $customer_id, true, $order_id );
1
+<?php if (!defined('ABSPATH')) exit;
2
+$box_content = wps_address::display_address_interface_content($address_type_id, $address_title, '', $address_type, $customer_id, true, $order_id);
3 3
 ?>
4 4
 
5 5
 <div>
6 6
 	<div class="<?php echo $extra_class; ?> wps-boxed">
7
-		<span class="wps-h3"><?php echo $address_title; ?><a id="wps-add-an-address-<?php echo $address_type_id; ?>" class="add-new-h2 alignright thickbox" href="<?php print wp_nonce_url( admin_url( 'admin-ajax.php?action=wps_order_load_address_edit_form&address_type=' . $address_type_id . '&customer_id=' . $customer_id . '&width=740&height=690' ), 'load_adress_edit_form', '_wpnonce' ); ?>"><i class="wps-icon-plus"></i><?php printf( __('Create a %s', 'wpshop' ), strtolower($address_title) ); ?></a>
7
+		<span class="wps-h3"><?php echo $address_title; ?><a id="wps-add-an-address-<?php echo $address_type_id; ?>" class="add-new-h2 alignright thickbox" href="<?php print wp_nonce_url(admin_url('admin-ajax.php?action=wps_order_load_address_edit_form&address_type=' . $address_type_id . '&customer_id=' . $customer_id . '&width=740&height=690'), 'load_adress_edit_form', '_wpnonce'); ?>"><i class="wps-icon-plus"></i><?php printf(__('Create a %s', 'wpshop'), strtolower($address_title)); ?></a>
8 8
 		</span>
9 9
 		<div style="clear : both;">
10
-			<ul class="wps-itemList wps-address-container" data-nonce="<?php echo wp_create_nonce( 'wps_reload_address_interface' ); ?>" id="wps-address-container-<?php echo $address_type_id; ?>">
11
-				<?php if( !empty($box_content) ): ?>
10
+			<ul class="wps-itemList wps-address-container" data-nonce="<?php echo wp_create_nonce('wps_reload_address_interface'); ?>" id="wps-address-container-<?php echo $address_type_id; ?>">
11
+				<?php if (!empty($box_content)): ?>
12 12
 				<?php echo $box_content; ?>
13 13
 				<?php else : ?>
14
-					<div class="wps-alert-info"><?php printf( __( 'You do not have create a %s', 'wpshop'), strtolower( $address_title ) ); ?></div>
14
+					<div class="wps-alert-info"><?php printf(__('You do not have create a %s', 'wpshop'), strtolower($address_title)); ?></div>
15 15
 				<?php endif; ?>
16 16
 			</ul>
17 17
 		</div>
Please login to merge, or discard this patch.
includes/modules/wps_address/templates/backend/address-content.php 2 patches
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1,35 +1,35 @@  discard block
 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
 		}
@@ -38,18 +38,18 @@  discard block
 block discarded – undo
38 38
 ?>
39 39
 		<li class="<?php echo $class; ?> wps-bloc-loader wps_address_li">
40 40
 			<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>
41
-			<span><strong><?php echo ( ( !empty($customer_name) ) ? $customer_name : '' ); ?></strong></span>
41
+			<span><strong><?php echo ((!empty($customer_name)) ? $customer_name : ''); ?></strong></span>
42 42
 			<span><?php echo $name_to_display; ?></span>
43 43
 			<?php //if( !$is_from_admin ) : ?>
44 44
 			<span class="wps-itemList-tools">
45 45
 				<!-- wps_delete_an_address -->
46
-				<a href="<?php print wp_nonce_url( admin_url( 'admin-ajax.php?page=wps_order_load_address_edit_form&address_id=' . $address_id . '&address_type=' . $address_type_id . '&customer_id=' . $customer_id . '&width=740&height=690' ), 'wps_delete_an_address', '_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>
47
-				<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>
46
+				<a href="<?php print wp_nonce_url(admin_url('admin-ajax.php?page=wps_order_load_address_edit_form&address_id=' . $address_id . '&address_type=' . $address_type_id . '&customer_id=' . $customer_id . '&width=740&height=690'), 'wps_delete_an_address', '_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>
47
+				<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>
48 48
 			</span>
49 49
 			<?php //endif; ?>
50 50
 		</li>
51
-		<li class="wps_address_li_content"<?php echo ($checked) ? ' style="display: list-item;"' : '';?>>
52
-			<?php echo wps_address::display_an_address( $address, $address_id ); ?>
51
+		<li class="wps_address_li_content"<?php echo ($checked) ? ' style="display: list-item;"' : ''; ?>>
52
+			<?php echo wps_address::display_an_address($address, $address_id); ?>
53 53
 		</li>
54 54
 <?php
55 55
 		$i++;
Please login to merge, or discard this patch.
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.
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
  * Fichier de définition du modèle des taxinomies / File for term model definition
4 6
  *
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.
wps_address/templates/backend/addresses_listtable/address_element_name.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,3 +1,3 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 echo $element_main_infos; 
3
-?> ( <a target="_wps_address_parent_edition_page" href="<?php echo admin_url( 'post.php?post=' . $address_associated_element->parent_id . '&action=edit' ); ?>" ><?php _e( 'Edit element', 'wpshop' ); ?></a> )
4 3
\ No newline at end of file
4
+?> ( <a target="_wps_address_parent_edition_page" href="<?php echo admin_url('post.php?post=' . $address_associated_element->parent_id . '&action=edit'); ?>" ><?php _e('Edit element', 'wpshop'); ?></a> )
5 5
\ 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.
includes/modules/wps_address/templates/backend/address-form.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit; if ( empty($address_id) ) : ?>
2
-<div class="wps-address-item-header wps-address-creation-header"><?php _e( 'New address', 'wpeo_geoloc' ); ?></div>
1
+<?php if (!defined('ABSPATH')) exit; if (empty($address_id)) : ?>
2
+<div class="wps-address-item-header wps-address-creation-header"><?php _e('New address', 'wpeo_geoloc'); ?></div>
3 3
 <div class="wps-address-item-content">
4 4
 <?php endif; ?>
5
-	<form data-nonce="<?php echo wp_create_nonce( 'wps_address_display_an_address' ); ?>" action="<?php echo admin_url( "admin-ajax.php" ); ?>" method="POST" class="wps-address-form" >
5
+	<form data-nonce="<?php echo wp_create_nonce('wps_address_display_an_address'); ?>" action="<?php echo admin_url("admin-ajax.php"); ?>" method="POST" class="wps-address-form" >
6 6
 		<input type="hidden" value="wps-address-save-address" name="action" />
7 7
 		<input type="hidden" value="<?php echo $post_ID; ?>" name="post_ID" />
8
-		<?php echo self::display_form_fields( $address_type_id, $address_id ); ?>
9
-		<button ><?php _e( 'Save address', 'wpeo_geoloc' ); ?></button>
10
-		<button data-nonce="<?php echo wp_create_nonce( 'wps_address_display_an_address' ); ?>" type="reset" ><?php _e( 'Cancel', 'wpeo_geoloc' ); ?></button>
8
+		<?php echo self::display_form_fields($address_type_id, $address_id); ?>
9
+		<button ><?php _e('Save address', 'wpeo_geoloc'); ?></button>
10
+		<button data-nonce="<?php echo wp_create_nonce('wps_address_display_an_address'); ?>" type="reset" ><?php _e('Cancel', 'wpeo_geoloc'); ?></button>
11 11
 	</form>
12
-<?php if ( empty($address_id) ) : ?>
12
+<?php if (empty($address_id)) : ?>
13 13
 </div>
14 14
 <?php endif; ?>
15 15
 
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 			success: function( responseText, statusText, xhr, $form ){
26 26
 				if ( responseText[ 0 ] ) {
27 27
 					if ( 0 != <?php echo $address_id; ?> ) {
28
-						$form.closest( "div.wps-address-item-content" ).children( "#wps-overlay-load" ).html( '<div class="wps-alert wps-alert-success" ><?php _e( 'Address saved', 'wpeo_geoloc' ); ?></div>' );
28
+						$form.closest( "div.wps-address-item-content" ).children( "#wps-overlay-load" ).html( '<div class="wps-alert wps-alert-success" ><?php _e('Address saved', 'wpeo_geoloc'); ?></div>' );
29 29
 						var data = {
30 30
 							action: "wps-address-display-an-address",
31 31
 							_wpnonce: $form.data( "nonce" ),
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 						}, "1000");
37 37
 					}
38 38
 					else {
39
-						$form.closest( "div.wps-address-item-content" ).children( "#wps-overlay-load" ).html( '<div class="wps-alert wps-alert-success" ><?php _e( 'Address saved', 'wpeo_geoloc' ); ?></div>' );
39
+						$form.closest( "div.wps-address-item-content" ).children( "#wps-overlay-load" ).html( '<div class="wps-alert wps-alert-success" ><?php _e('Address saved', 'wpeo_geoloc'); ?></div>' );
40 40
 						wps_address_load_addresses_list( <?php echo $post_ID; ?> );
41 41
 					}
42 42
 	        	}
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		/**	Add listener when user click on form cancel button	*/
55 55
 		jQuery( ".wps-address-form button[type=reset]" ).click(function( e ){
56 56
 			e.preventDefault();
57
-			if ( confirm( wps_address_convert_html_accent( "<?php _e( 'Are you sure you want to cancel?', 'wpeo_geoloc' ); ?>" ) ) ) {
57
+			if ( confirm( wps_address_convert_html_accent( "<?php _e('Are you sure you want to cancel?', 'wpeo_geoloc'); ?>" ) ) ) {
58 58
 				if ( 0 != <?php echo $address_id; ?> ) {
59 59
 					jQuery( this ).closest( "div.wps-address-list-container" ).append( '<div id="wps-overlay" class="wps-overlay-background" ></div><div id="wps-overlay-load" ><img src="' + thickboxL10n.loadingAnimation + '" /></div>' );
60 60
 					var data = {
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,7 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit; if ( empty($address_id) ) : ?>
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
4
+if ( empty($address_id) ) : ?>
2 5
 <div class="wps-address-item-header wps-address-creation-header"><?php _e( 'New address', 'wpeo_geoloc' ); ?></div>
3 6
 <div class="wps-address-item-content">
4 7
 <?php endif; ?>
Please login to merge, or discard this patch.