@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | class wps_customer_mdl { |
3 | 5 | |
4 | 6 | function __construct() { |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | class wps_customer_mdl { |
3 | 3 | |
4 | 4 | function __construct() { |
@@ -9,15 +9,15 @@ discard block |
||
9 | 9 | * Return users list |
10 | 10 | * @return array |
11 | 11 | */ |
12 | - function getUserList( $limit = null ) { |
|
12 | + function getUserList($limit = null) { |
|
13 | 13 | $args = array( |
14 | 14 | 'orderby' => 'user_email', |
15 | 15 | 'order' => 'ASC', |
16 | - 'number' => !empty( $limit ) ? $limit : "", |
|
16 | + 'number' => !empty($limit) ? $limit : "", |
|
17 | 17 | 'count_total' => false, |
18 | 18 | 'fields' => 'all' |
19 | 19 | ); |
20 | - return get_users( $args ); |
|
20 | + return get_users($args); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | /** |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | * |
31 | 31 | * @return WP_Query The complete query for customer list retrieving |
32 | 32 | */ |
33 | - function get_customer_list( $nb_per_page = 10, $offset = 0, $extra_args = array() ) { |
|
33 | + function get_customer_list($nb_per_page = 10, $offset = 0, $extra_args = array()) { |
|
34 | 34 | /** Define args for listing */ |
35 | 35 | $customer_list_args = array( |
36 | 36 | 'post_type' => WPSHOP_NEWTYPE_IDENTIFIER_CUSTOMERS, |
37 | - 'post_status' => array( 'pending', 'draft', 'publish', 'private' ), |
|
37 | + 'post_status' => array('pending', 'draft', 'publish', 'private'), |
|
38 | 38 | 'posts_per_page' => $nb_per_page, |
39 | 39 | ); |
40 | 40 | if ( -1 !== $nb_per_page ) { |
@@ -42,13 +42,13 @@ discard block |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | $wpshop_customer_search = new wpshop_customer_search(); |
45 | - add_filter( 'posts_where', array( $wpshop_customer_search, 'wpshop_search_where_in_customer' ) ); |
|
45 | + add_filter('posts_where', array($wpshop_customer_search, 'wpshop_search_where_in_customer')); |
|
46 | 46 | |
47 | 47 | /** Get customer list with builtin wordpress function */ |
48 | - $customer_list_query = new WP_Query( wp_parse_args( $extra_args, $customer_list_args ) ); |
|
48 | + $customer_list_query = new WP_Query(wp_parse_args($extra_args, $customer_list_args)); |
|
49 | 49 | |
50 | 50 | /** Remove previously added filter for search extension */ |
51 | - remove_filter( 'posts_where', array( $wpshop_customer_search, 'wpshop_search_where_in_customer' ) ); |
|
51 | + remove_filter('posts_where', array($wpshop_customer_search, 'wpshop_search_where_in_customer')); |
|
52 | 52 | |
53 | 53 | return $customer_list_query; |
54 | 54 | } |
@@ -61,17 +61,17 @@ discard block |
||
61 | 61 | * |
62 | 62 | * @return string The new query restriction with the user search parameters |
63 | 63 | */ |
64 | - function wps_customer_search_extend( $where, &$wp_query = "" ) { |
|
64 | + function wps_customer_search_extend($where, &$wp_query = "") { |
|
65 | 65 | global $wpdb; |
66 | 66 | |
67 | - $search_term = !empty( $_GET[ 'term' ] ) ? sanitize_text_field($_GET[ 'term' ] ) : ( !empty( $_GET[ 's' ] ) ? sanitize_text_field( $_GET[ 's' ] ) : '' ); |
|
68 | - if ( !empty( $search_term ) ) { |
|
67 | + $search_term = !empty($_GET['term']) ? sanitize_text_field($_GET['term']) : (!empty($_GET['s']) ? sanitize_text_field($_GET['s']) : ''); |
|
68 | + if (!empty($search_term)) { |
|
69 | 69 | $where .= " AND ( |
70 | - ( {$wpdb->posts}.post_title LIKE '%" . esc_sql( $wpdb->esc_like( $search_term ) ) . "%' ) |
|
70 | + ( {$wpdb->posts}.post_title LIKE '%" . esc_sql($wpdb->esc_like($search_term)) . "%' ) |
|
71 | 71 | OR |
72 | - ( {$wpdb->posts}.post_author IN ( SELECT ID FROM {$wpdb->users} WHERE display_name LIKE '%" . esc_sql( $wpdb->esc_like( $search_term ) ) . "%' OR user_email LIKE '%" . esc_sql( $wpdb->esc_like( $search_term ) ) . "%' OR user_nicename LIKE '%" . esc_sql( $wpdb->esc_like( $search_term ) ) . "%' ) ) |
|
72 | + ( {$wpdb->posts}.post_author IN ( SELECT ID FROM {$wpdb->users} WHERE display_name LIKE '%" . esc_sql($wpdb->esc_like($search_term)) . "%' OR user_email LIKE '%" . esc_sql($wpdb->esc_like($search_term)) . "%' OR user_nicename LIKE '%" . esc_sql($wpdb->esc_like($search_term)) . "%' ) ) |
|
73 | 73 | OR |
74 | - ( {$wpdb->posts}.post_author IN ( SELECT user_id FROM {$wpdb->usermeta} WHERE ( meta_key = 'first_name' AND meta_value LIKE '%" . esc_sql( $wpdb->esc_like( $search_term ) ) . "%' ) OR ( meta_key = 'last_name' AND meta_value LIKE '%" . esc_sql( $wpdb->esc_like( $search_term ) ) . "%' ) OR ( meta_key = 'nickname' AND meta_value LIKE '%" . esc_sql( $wpdb->esc_like( $search_term ) ) . "%' ) ) ) |
|
74 | + ( {$wpdb->posts}.post_author IN ( SELECT user_id FROM {$wpdb->usermeta} WHERE ( meta_key = 'first_name' AND meta_value LIKE '%" . esc_sql($wpdb->esc_like($search_term)) . "%' ) OR ( meta_key = 'last_name' AND meta_value LIKE '%" . esc_sql($wpdb->esc_like($search_term)) . "%' ) OR ( meta_key = 'nickname' AND meta_value LIKE '%" . esc_sql($wpdb->esc_like($search_term)) . "%' ) ) ) |
|
75 | 75 | )"; |
76 | 76 | } |
77 | 77 |
@@ -1,16 +1,16 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | |
3 | -DEFINE( 'WPSCLTQUICK_VERSION', 1.0 ); |
|
4 | -DEFINE( 'WPSCLTQUICK_DIR', basename( dirname( __FILE__ ) ) ); |
|
5 | -DEFINE( 'WPSCLTQUICK_PATH', str_replace( "\\", "/", plugin_dir_path( __FILE__ ) ) ); |
|
6 | -DEFINE( 'WPSCLTQUICK_URL', str_replace( str_replace( "\\", "/", ABSPATH), site_url() . '/', WPSCLTQUICK_PATH ) ); |
|
3 | +DEFINE('WPSCLTQUICK_VERSION', 1.0); |
|
4 | +DEFINE('WPSCLTQUICK_DIR', basename(dirname(__FILE__))); |
|
5 | +DEFINE('WPSCLTQUICK_PATH', str_replace("\\", "/", plugin_dir_path(__FILE__))); |
|
6 | +DEFINE('WPSCLTQUICK_URL', str_replace(str_replace("\\", "/", ABSPATH), site_url() . '/', WPSCLTQUICK_PATH)); |
|
7 | 7 | |
8 | 8 | /** Définition du chemin absolu vers les templates / Define the templates absolute directories */ |
9 | -DEFINE( 'WPSCLTQUICK_TEMPLATES_MAIN_DIR', WPSCLTQUICK_PATH . '/templates/'); |
|
9 | +DEFINE('WPSCLTQUICK_TEMPLATES_MAIN_DIR', WPSCLTQUICK_PATH . '/templates/'); |
|
10 | 10 | |
11 | 11 | |
12 | 12 | /** Inclusion des différents composants / Include plugin components */ |
13 | -require_once( WPSCLTQUICK_PATH . 'controller/wps_customer_quick_add.ctr.php' ); |
|
13 | +require_once(WPSCLTQUICK_PATH . 'controller/wps_customer_quick_add.ctr.php'); |
|
14 | 14 | /** Instanciation du controlleur principal / Main controller instanciation */ |
15 | 15 | $wps_customer_quick_add = new wps_customer_quick_add(); |
16 | 16 |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | |
3 | 5 | DEFINE( 'WPSCLTQUICK_VERSION', 1.0 ); |
4 | 6 | DEFINE( 'WPSCLTQUICK_DIR', basename( dirname( __FILE__ ) ) ); |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | /** |
3 | 3 | * WpShop Cart bootstrap file |
4 | 4 | * @author Jimmy LATOUR- Eoxia dev team <[email protected]> |
@@ -9,24 +9,24 @@ discard block |
||
9 | 9 | */ |
10 | 10 | |
11 | 11 | |
12 | -if ( !defined( 'WPSHOP_VERSION' ) ) { |
|
13 | - die( __("You are not allowed to use this service.", 'wpshop') ); |
|
12 | +if (!defined('WPSHOP_VERSION')) { |
|
13 | + die(__("You are not allowed to use this service.", 'wpshop')); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | /** Template Global vars **/ |
17 | 17 | DEFINE('WPS_WISHLIST_DIR', basename(dirname(__FILE__))); |
18 | -DEFINE('WPS_WISHLIST_PATH', str_replace( "\\", "/", str_replace( WPS_WISHLIST_DIR, "", dirname( __FILE__ ) ) ) ); |
|
19 | -DEFINE('WPS_WISHLIST_URL', str_replace( str_replace( "\\", "/", ABSPATH), site_url() . '/', WPS_WISHLIST_PATH ) ); |
|
20 | -DEFINE( 'WPS_WISHLIST_TEMPLATE_DIR', WPS_WISHLIST_PATH . WPS_WISHLIST_DIR . '/templates/'); |
|
21 | -load_plugin_textdomain( 'wps_wishlist_i18n', false, dirname(plugin_basename( __FILE__ )).'/languages/' ); |
|
18 | +DEFINE('WPS_WISHLIST_PATH', str_replace("\\", "/", str_replace(WPS_WISHLIST_DIR, "", dirname(__FILE__)))); |
|
19 | +DEFINE('WPS_WISHLIST_URL', str_replace(str_replace("\\", "/", ABSPATH), site_url() . '/', WPS_WISHLIST_PATH)); |
|
20 | +DEFINE('WPS_WISHLIST_TEMPLATE_DIR', WPS_WISHLIST_PATH . WPS_WISHLIST_DIR . '/templates/'); |
|
21 | +load_plugin_textdomain('wps_wishlist_i18n', false, dirname(plugin_basename(__FILE__)) . '/languages/'); |
|
22 | 22 | |
23 | 23 | // Include Controller |
24 | -include( plugin_dir_path( __FILE__ ).'controller/wps_wishlist_ctr.php' ); |
|
25 | -include( plugin_dir_path( __FILE__ ).'controller/wps_wishlist_settings_ctr.php' ); |
|
24 | +include(plugin_dir_path(__FILE__) . 'controller/wps_wishlist_ctr.php'); |
|
25 | +include(plugin_dir_path(__FILE__) . 'controller/wps_wishlist_settings_ctr.php'); |
|
26 | 26 | |
27 | 27 | // Init Controller |
28 | 28 | new wps_wishlist_settings(); |
29 | 29 | $wpshop_catalog_product_option = wps_wishlist_settings::get_option(); |
30 | -if( !empty($wpshop_catalog_product_option) ) { |
|
30 | +if (!empty($wpshop_catalog_product_option)) { |
|
31 | 31 | $wps_wishlist = new wps_wishlist(); |
32 | 32 | } |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * WpShop Cart bootstrap file |
4 | 6 | * @author Jimmy LATOUR- Eoxia dev team <[email protected]> |
@@ -1,9 +1,9 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | |
3 | 3 | class wps_wishlist_settings { |
4 | 4 | public static function get_option() { |
5 | 5 | $result = get_option('wpshop_catalog_product_option'); |
6 | - return ( !empty($result) && !empty($result['wps_wishlist_display']) ) ? $result['wps_wishlist_display'] : null; |
|
6 | + return (!empty($result) && !empty($result['wps_wishlist_display'])) ? $result['wps_wishlist_display'] : null; |
|
7 | 7 | } |
8 | 8 | public function __construct() { |
9 | 9 | add_action('wsphop_options', array($this, 'declare_options')); |
@@ -16,6 +16,6 @@ discard block |
||
16 | 16 | |
17 | 17 | function display_option() { |
18 | 18 | $wps_wishlist_display = self::get_option(); |
19 | - require_once( wpshop_tools::get_template_part( WPS_WISHLIST_DIR, WPS_WISHLIST_TEMPLATE_DIR, 'backend/settings', "wishlist_option" ) ); |
|
19 | + require_once(wpshop_tools::get_template_part(WPS_WISHLIST_DIR, WPS_WISHLIST_TEMPLATE_DIR, 'backend/settings', "wishlist_option")); |
|
20 | 20 | } |
21 | 21 | } |
22 | 22 | \ No newline at end of file |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | |
3 | 5 | class wps_wishlist_settings { |
4 | 6 | public static function get_option() { |
@@ -1,4 +1,4 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | -<input type="checkbox" id="wpshop_catalog_product_option_wishlist" name="wpshop_catalog_product_option[wps_wishlist_display]" <?php echo ( !empty($wps_wishlist_display) ) ? 'checked="checked"' : ''; ?> /> |
|
3 | +<input type="checkbox" id="wpshop_catalog_product_option_wishlist" name="wpshop_catalog_product_option[wps_wishlist_display]" <?php echo (!empty($wps_wishlist_display)) ? 'checked="checked"' : ''; ?> /> |
|
4 | 4 | <a class="wpshop_infobulle_marker" title="<?php echo __('Activate the possibility to have a wishlist', 'wps_wishlist_i18n'); ?>" href="#">?</a> |
5 | 5 | \ No newline at end of file |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <input type="checkbox" id="wpshop_catalog_product_option_wishlist" name="wpshop_catalog_product_option[wps_wishlist_display]" <?php echo ( !empty($wps_wishlist_display) ) ? 'checked="checked"' : ''; ?> /> |
4 | 6 | <a class="wpshop_infobulle_marker" title="<?php echo __('Activate the possibility to have a wishlist', 'wps_wishlist_i18n'); ?>" href="#">?</a> |
5 | 7 | \ No newline at end of file |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | /** |
3 | 3 | * Bootstrap file |
4 | 4 | * |
@@ -6,20 +6,20 @@ discard block |
||
6 | 6 | * @version 1.0 |
7 | 7 | */ |
8 | 8 | |
9 | -DEFINE( 'WPS_LOCALISATION_VERSION', '1.' ); |
|
10 | -DEFINE( 'WPS_LOCALISATION_DIR', basename(dirname(__FILE__))); |
|
11 | -DEFINE( 'WPS_ADDRESS_DIR', basename(dirname(__FILE__))); |
|
12 | -DEFINE( 'WPS_ADDRESS_PATH', dirname( __FILE__ ) ); |
|
13 | -DEFINE( 'WPS_ADDRESS_URL', str_replace( str_replace( "\\", "/", ABSPATH), site_url() . '/', str_replace( "\\", "/", WPS_ADDRESS_PATH ) ) ); |
|
9 | +DEFINE('WPS_LOCALISATION_VERSION', '1.'); |
|
10 | +DEFINE('WPS_LOCALISATION_DIR', basename(dirname(__FILE__))); |
|
11 | +DEFINE('WPS_ADDRESS_DIR', basename(dirname(__FILE__))); |
|
12 | +DEFINE('WPS_ADDRESS_PATH', dirname(__FILE__)); |
|
13 | +DEFINE('WPS_ADDRESS_URL', str_replace(str_replace("\\", "/", ABSPATH), site_url() . '/', str_replace("\\", "/", WPS_ADDRESS_PATH))); |
|
14 | 14 | |
15 | -DEFINE( 'WPS_LOCALISATION_TEMPLATES_MAIN_DIR', WPS_ADDRESS_PATH . '/templates/' ); |
|
15 | +DEFINE('WPS_LOCALISATION_TEMPLATES_MAIN_DIR', WPS_ADDRESS_PATH . '/templates/'); |
|
16 | 16 | |
17 | 17 | /** Load plugin translation */ |
18 | -load_plugin_textdomain( 'wpeo_geoloc', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); |
|
18 | +load_plugin_textdomain('wpeo_geoloc', false, dirname(plugin_basename(__FILE__)) . '/languages/'); |
|
19 | 19 | |
20 | 20 | /** Load wps address controller */ |
21 | -require_once( WPS_ADDRESS_PATH . '/controller/wps_address_ctr.php' ); |
|
22 | -require_once( WPS_ADDRESS_PATH . '/controller/wps_address_admin_ctr.php' ); |
|
21 | +require_once(WPS_ADDRESS_PATH . '/controller/wps_address_ctr.php'); |
|
22 | +require_once(WPS_ADDRESS_PATH . '/controller/wps_address_admin_ctr.php'); |
|
23 | 23 | |
24 | 24 | // Models |
25 | 25 | //require_once( WPS_ADDRESS_PATH . '/controller/wps_address_ctr.01.php' ); |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Bootstrap file |
4 | 6 | * |
@@ -1,11 +1,11 @@ discard block |
||
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 |
||
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 |
@@ -12,6 +12,9 @@ |
||
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 |
@@ -1,5 +1,5 @@ |
||
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 |
@@ -1,4 +1,6 @@ |
||
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" ); ?>' />"; |
@@ -1,27 +1,27 @@ |
||
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 |
@@ -1,12 +1,19 @@ |
||
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 | ?> |