@@ -1,4 +1,6 @@ |
||
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 | * |
@@ -1,19 +1,19 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="wps-boxed" id="wps_login_form_first_step"> |
4 | - <span class="wps-h5"><?php _e ('Log in', 'wpshop'); ?> / <?php _e( 'Sign up', 'wpshop'); ?></span> |
|
4 | + <span class="wps-h5"><?php _e('Log in', 'wpshop'); ?> / <?php _e('Sign up', 'wpshop'); ?></span> |
|
5 | 5 | <div id="wps_login_first_error_container" class="wps-login-first-error"></div> |
6 | 6 | <div class="wps-form-group"> |
7 | 7 | <label for="wps_login_first_email_address"> |
8 | - <?php _e('Email address', 'wpshop');?> |
|
8 | + <?php _e('Email address', 'wpshop'); ?> |
|
9 | 9 | </label> |
10 | 10 | <span class="wps-help-inline"></span> |
11 | 11 | <div class="wps-form"> |
12 | - <input type="text" name="wps_login_user_login" id="wps_login_first_email_address" placeholder="<?php _e('Your email address', 'wpshop');?>" /> |
|
12 | + <input type="text" name="wps_login_user_login" id="wps_login_first_email_address" placeholder="<?php _e('Your email address', 'wpshop'); ?>" /> |
|
13 | 13 | </div> |
14 | 14 | </div> |
15 | 15 | <div class="wps-form-group"> |
16 | - <button class="wps-bton-first-alignRight-rounded" data-nonce="<?php echo wp_create_nonce( 'wps_login_first_request' ); ?>" id="wps_first_login_button"> |
|
16 | + <button class="wps-bton-first-alignRight-rounded" data-nonce="<?php echo wp_create_nonce('wps_login_first_request'); ?>" id="wps_first_login_button"> |
|
17 | 17 | <?php _e('Continue', 'wpshop'); ?> |
18 | 18 | </button> |
19 | 19 | </div> |
@@ -1,4 +1,6 @@ |
||
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 | * |
@@ -1,59 +1,59 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="wps-boxed" id="wps_signup_form_container"> |
4 | -<span class="wps-h5"><?php _e ('Sign up', 'wpshop'); ?></span> |
|
4 | +<span class="wps-h5"><?php _e('Sign up', 'wpshop'); ?></span> |
|
5 | 5 | <div id="wps_signup_error_container"></div> |
6 | 6 | <form action="<?php echo admin_url('admin-ajax.php'); ?>" method="post" id="wps_signup_form"> |
7 | - <?php if( !empty($args) ) : ?> |
|
7 | + <?php if (!empty($args)) : ?> |
|
8 | 8 | <input type="hidden" name="wps_sign_up_request_from_admin" value="admin" /> |
9 | 9 | <?php endif; ?> |
10 | 10 | |
11 | 11 | <input type="hidden" name="action" value="wps_signup_request" /> |
12 | - <?php wp_nonce_field( 'wps_save_signup_form' ); ?> |
|
12 | + <?php wp_nonce_field('wps_save_signup_form'); ?> |
|
13 | 13 | |
14 | 14 | <?php |
15 | - if( !empty($signup_fields) ) : |
|
15 | + if (!empty($signup_fields)) : |
|
16 | 16 | |
17 | 17 | $wpshop_billing_address = get_option('wpshop_billing_address'); |
18 | 18 | |
19 | - foreach( $signup_fields as $signup_field ) : |
|
20 | - if( isset( $signup_field->code ) && $signup_field->code == 'is_provider' ) { |
|
19 | + foreach ($signup_fields as $signup_field) : |
|
20 | + if (isset($signup_field->code) && $signup_field->code == 'is_provider') { |
|
21 | 21 | continue; |
22 | 22 | } |
23 | - $value = ( !empty($signup_field->frontend_input) && $signup_field->frontend_input != 'password' && !empty($_POST) && !empty($_POST['attribute']) && !empty($_POST['attribute'][$signup_field->data_type]) && !empty( $_POST['attribute'][$signup_field->data_type][$signup_field->code]) ) ? sanitize_text_field( $_POST['attribute'][$signup_field->data_type][$signup_field->code] ) : ''; |
|
24 | - $attribute_output_def = wpshop_attributes::get_attribute_field_definition( $signup_field, $value, array( 'from' => 'frontend', ) ); |
|
23 | + $value = (!empty($signup_field->frontend_input) && $signup_field->frontend_input != 'password' && !empty($_POST) && !empty($_POST['attribute']) && !empty($_POST['attribute'][$signup_field->data_type]) && !empty($_POST['attribute'][$signup_field->data_type][$signup_field->code])) ? sanitize_text_field($_POST['attribute'][$signup_field->data_type][$signup_field->code]) : ''; |
|
24 | + $attribute_output_def = wpshop_attributes::get_attribute_field_definition($signup_field, $value, array('from' => 'frontend',)); |
|
25 | 25 | ?> |
26 | 26 | <div class="wps-form-group"> |
27 | - <label for="<?php echo $signup_field->code; ?>"><?php _e( stripslashes($signup_field->frontend_label), 'wpshop'); ?> <?php echo ( ( !empty($attribute_output_def['required']) && $attribute_output_def['required'] == 'yes' ) ? '<em>*</em>' : '' ); ?></label> |
|
27 | + <label for="<?php echo $signup_field->code; ?>"><?php _e(stripslashes($signup_field->frontend_label), 'wpshop'); ?> <?php echo ((!empty($attribute_output_def['required']) && $attribute_output_def['required'] == 'yes') ? '<em>*</em>' : ''); ?></label> |
|
28 | 28 | <div id="<?php echo $signup_field->code; ?>" class="wps-form"><?php echo $attribute_output_def['output']; echo $attribute_output_def['options']; ?></div> |
29 | 29 | </div> |
30 | 30 | <?php |
31 | 31 | /** Check confirmation field **/ |
32 | 32 | $current_field_key = $signup_field->code; |
33 | - if ( $signup_field->_need_verification == 'yes' ) { |
|
34 | - $signup_field->code = $signup_field->code.'2'; |
|
35 | - $attribute_output_def = wpshop_attributes::get_attribute_field_definition( $signup_field, '', array() ); |
|
33 | + if ($signup_field->_need_verification == 'yes') { |
|
34 | + $signup_field->code = $signup_field->code . '2'; |
|
35 | + $attribute_output_def = wpshop_attributes::get_attribute_field_definition($signup_field, '', array()); |
|
36 | 36 | ?> |
37 | 37 | <div class="wps-form-group"> |
38 | - <label for="<?php echo $signup_field->code; ?>"><?php printf( __('Confirm %s', 'wpshop'), stripslashes( strtolower(__( $signup_field->frontend_label, 'wpshop')) ) ); ?> <?php echo ( ( !empty($attribute_output_def['required']) && $attribute_output_def['required'] == 'yes' ) ? '<em>*</em>' : '' ); ?></label> |
|
38 | + <label for="<?php echo $signup_field->code; ?>"><?php printf(__('Confirm %s', 'wpshop'), stripslashes(strtolower(__($signup_field->frontend_label, 'wpshop')))); ?> <?php echo ((!empty($attribute_output_def['required']) && $attribute_output_def['required'] == 'yes') ? '<em>*</em>' : ''); ?></label> |
|
39 | 39 | <div id="<?php echo $signup_field->code; ?>" class="wps-form"><?php echo $attribute_output_def['output']; echo $attribute_output_def['options']; ?></div> |
40 | 40 | </div> |
41 | 41 | <?php |
42 | 42 | } |
43 | 43 | |
44 | - if ( !empty($wpshop_billing_address['integrate_into_register_form']) && ($wpshop_billing_address['integrate_into_register_form'] == 'yes') && !empty($wpshop_billing_address['integrate_into_register_form_after_field']) && ($wpshop_billing_address['integrate_into_register_form_after_field'] == $current_field_key ) ) { |
|
44 | + if (!empty($wpshop_billing_address['integrate_into_register_form']) && ($wpshop_billing_address['integrate_into_register_form'] == 'yes') && !empty($wpshop_billing_address['integrate_into_register_form_after_field']) && ($wpshop_billing_address['integrate_into_register_form_after_field'] == $current_field_key)) { |
|
45 | 45 | $current_connected_user = null; |
46 | - if ( get_current_user_id() > 0 ) { |
|
47 | - $query = $wpdb->prepare ("SELECT * |
|
46 | + if (get_current_user_id() > 0) { |
|
47 | + $query = $wpdb->prepare("SELECT * |
|
48 | 48 | FROM " . $wpdb->posts . " |
49 | - WHERE post_type = '" .WPSHOP_NEWTYPE_IDENTIFIER_ADDRESS. "' |
|
49 | + WHERE post_type = '" .WPSHOP_NEWTYPE_IDENTIFIER_ADDRESS . "' |
|
50 | 50 | AND post_parent = %d |
51 | 51 | ORDER BY ID |
52 | - LIMIT 1", get_current_user_id() ); |
|
52 | + LIMIT 1", get_current_user_id()); |
|
53 | 53 | $current_connected_user = $wpdb->get_var($query); |
54 | 54 | } |
55 | 55 | $wps_address = new wps_address(); |
56 | - echo $wps_address->display_form_fields($wpshop_billing_address['choice'], '', 'true', '', array(), array( 'title' => false, 'address_title' => false, 'field_to_hide' => $wpshop_billing_address[ 'integrate_into_register_form_matching_field' ] ), array(), $current_connected_user); |
|
56 | + echo $wps_address->display_form_fields($wpshop_billing_address['choice'], '', 'true', '', array(), array('title' => false, 'address_title' => false, 'field_to_hide' => $wpshop_billing_address['integrate_into_register_form_matching_field']), array(), $current_connected_user); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | endforeach; |
@@ -1,4 +1,6 @@ |
||
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 | * |
@@ -1,8 +1,8 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="wps-boxed"> |
4 | 4 | <?php echo $attributes_sections_tpl; ?> |
5 | - <?php if( !$is_from_admin ) : ?> |
|
6 | - <div><button data-nonce="<?php echo wp_create_nonce( 'wps_fill_account_informations_modal' ); ?> " class="wps-link wps-alignright" id="wps_modal_account_informations_opener"><i class="wps-icon-pencil"></i><?php _e( 'Edit your account informations', 'wpshop')?></button></div> |
|
5 | + <?php if (!$is_from_admin) : ?> |
|
6 | + <div><button data-nonce="<?php echo wp_create_nonce('wps_fill_account_informations_modal'); ?> " class="wps-link wps-alignright" id="wps_modal_account_informations_opener"><i class="wps-icon-pencil"></i><?php _e('Edit your account informations', 'wpshop')?></button></div> |
|
7 | 7 | <?php endif; ?> |
8 | 8 | </div> |
@@ -1,4 +1,6 @@ |
||
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 | * |
@@ -1,33 +1,33 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div id="wps_signup_error_container"></div> |
4 | 4 | <form action="<?php echo admin_url('admin-ajax.php'); ?>" method="post" id="wps_account_informations_form"> |
5 | 5 | <input type="hidden" name="action" value="wps_save_account_informations" /> |
6 | 6 | <?php |
7 | - wp_nonce_field( 'wps_save_account_informations' ); |
|
7 | + wp_nonce_field('wps_save_account_informations'); |
|
8 | 8 | |
9 | - if( !empty($signup_fields) ) : |
|
10 | - foreach( $signup_fields as $signup_field ) : |
|
11 | - if( isset( $signup_field->code ) && $signup_field->code == 'is_provider' ) { |
|
9 | + if (!empty($signup_fields)) : |
|
10 | + foreach ($signup_fields as $signup_field) : |
|
11 | + if (isset($signup_field->code) && $signup_field->code == 'is_provider') { |
|
12 | 12 | continue; |
13 | 13 | } |
14 | - $query = $wpdb->prepare( 'SELECT value FROM '.WPSHOP_DBT_ATTRIBUTE_VALUES_PREFIX.strtolower($signup_field->data_type). ' WHERE entity_type_id = %d AND attribute_id = %d AND entity_id = %d ', $customer_entity_type_id, $signup_field->id, $cid ); |
|
14 | + $query = $wpdb->prepare('SELECT value FROM ' . WPSHOP_DBT_ATTRIBUTE_VALUES_PREFIX . strtolower($signup_field->data_type) . ' WHERE entity_type_id = %d AND attribute_id = %d AND entity_id = %d ', $customer_entity_type_id, $signup_field->id, $cid); |
|
15 | 15 | |
16 | - $value = $wpdb->get_var( $query ); |
|
17 | - $attribute_output_def = wpshop_attributes::get_attribute_field_definition( $signup_field, $value, array( 'from' => 'frontend', array( 'options' => array( 'original' => true, ), ) ) ); |
|
16 | + $value = $wpdb->get_var($query); |
|
17 | + $attribute_output_def = wpshop_attributes::get_attribute_field_definition($signup_field, $value, array('from' => 'frontend', array('options' => array('original' => true,),))); |
|
18 | 18 | ?> |
19 | 19 | <div class="wps-form-group"> |
20 | - <label for="<?php echo $signup_field->code; ?>"><?php _e( stripslashes($signup_field->frontend_label), 'wpshop'); ?> <?php echo ( ( !empty($attribute_output_def['required']) && $attribute_output_def['required'] == 'yes' ) ? '<em>*</em>' : '' ); ?></label> |
|
20 | + <label for="<?php echo $signup_field->code; ?>"><?php _e(stripslashes($signup_field->frontend_label), 'wpshop'); ?> <?php echo ((!empty($attribute_output_def['required']) && $attribute_output_def['required'] == 'yes') ? '<em>*</em>' : ''); ?></label> |
|
21 | 21 | <div id="<?php echo $signup_field->code; ?>" class="wps-form"><?php echo $attribute_output_def['output']; echo $attribute_output_def['options']; ?></div> |
22 | 22 | </div> |
23 | 23 | <?php |
24 | 24 | /** Check confirmation field **/ |
25 | - if ( $signup_field->_need_verification == 'yes' ) { |
|
26 | - $signup_field->code = $signup_field->code.'2'; |
|
27 | - $attribute_output_def = wpshop_attributes::get_attribute_field_definition( $signup_field, $value, array('from' => 'frontend',) ); |
|
25 | + if ($signup_field->_need_verification == 'yes') { |
|
26 | + $signup_field->code = $signup_field->code . '2'; |
|
27 | + $attribute_output_def = wpshop_attributes::get_attribute_field_definition($signup_field, $value, array('from' => 'frontend',)); |
|
28 | 28 | ?> |
29 | 29 | <div class="wps-form-group"> |
30 | - <label for="<?php echo $signup_field->code; ?>"><?php printf( __('Confirm %s', 'wpshop'), stripslashes( strtolower(__( $signup_field->frontend_label, 'wpshop')) ) ); ?> <?php echo ( ( !empty($attribute_output_def['required']) && $attribute_output_def['required'] == 'yes' ) ? '<em>*</em>' : '' ); ?></label> |
|
30 | + <label for="<?php echo $signup_field->code; ?>"><?php printf(__('Confirm %s', 'wpshop'), stripslashes(strtolower(__($signup_field->frontend_label, 'wpshop')))); ?> <?php echo ((!empty($attribute_output_def['required']) && $attribute_output_def['required'] == 'yes') ? '<em>*</em>' : ''); ?></label> |
|
31 | 31 | <div id="<?php echo $signup_field->code; ?>" class="wps-form"><?php echo $attribute_output_def['output']; echo $attribute_output_def['options']; ?></div> |
32 | 32 | </div> |
33 | 33 | <?php |
@@ -1,4 +1,6 @@ |
||
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 | * |
@@ -1,22 +1,22 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
2 | -$permalink_option = get_option( 'permalink_structure' ); |
|
3 | -$account_page_id = wpshop_tools::get_page_id( get_option( 'wpshop_myaccount_page_id' ) ); |
|
4 | -$account_dashboard_part = !empty( $_GET['account_dashboard_part'] ) ? sanitize_text_field( $_GET['account_dashboard_part'] ) : ''; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | +$permalink_option = get_option('permalink_structure'); |
|
3 | +$account_page_id = wpshop_tools::get_page_id(get_option('wpshop_myaccount_page_id')); |
|
4 | +$account_dashboard_part = !empty($_GET['account_dashboard_part']) ? sanitize_text_field($_GET['account_dashboard_part']) : ''; |
|
5 | 5 | ?> |
6 | 6 | |
7 | 7 | <?php $user_ID = get_current_user_id(); ?> |
8 | 8 | |
9 | -<?php if ( 0 !== $user_ID ) : ?> |
|
9 | +<?php if (0 !== $user_ID) : ?> |
|
10 | 10 | <div class="wps-user-dashboard"> |
11 | - <?php $account_user = get_userdata( $user_ID ); ?> |
|
11 | + <?php $account_user = get_userdata($user_ID); ?> |
|
12 | 12 | <span class="wps-user-name"> |
13 | - <?php _e( 'Hello', 'wpshop' ); ?> |
|
13 | + <?php _e('Hello', 'wpshop'); ?> |
|
14 | 14 | <strong><?php echo $account_user->data->user_login; ?></strong> |
15 | 15 | </span> |
16 | 16 | <span class="wps-user-thumbnail"> |
17 | - <?php echo get_avatar( $user_ID, 40 ); ?> |
|
17 | + <?php echo get_avatar($user_ID, 40); ?> |
|
18 | 18 | </span> |
19 | - <a href="<?php echo wp_logout_url( site_url() ); ?>" class="" title="<?php _e( 'Log out', 'wpshop' ); ?>"> |
|
19 | + <a href="<?php echo wp_logout_url(site_url()); ?>" class="" title="<?php _e('Log out', 'wpshop'); ?>"> |
|
20 | 20 | <i class="wps-icon-power"></i> |
21 | 21 | </a> |
22 | 22 | </div> |
@@ -25,50 +25,50 @@ discard block |
||
25 | 25 | <section class="wps-section-account"> |
26 | 26 | <div class="wps-section-taskbar"> |
27 | 27 | <ul> |
28 | - <li class="<?php echo ( ( empty($account_dashboard_part) || ( !empty($account_dashboard_part) && $account_dashboard_part == 'account' ) ) ? 'wps-activ' : '' ); ?>"> |
|
29 | - <a data-target="menu1" href="<?php echo get_permalink($account_page_id).( (!empty($permalink_option) ? '?' : '&' ).'account_dashboard_part=account' ); ?>" title="" class=""> |
|
28 | + <li class="<?php echo ((empty($account_dashboard_part) || (!empty($account_dashboard_part) && $account_dashboard_part == 'account')) ? 'wps-activ' : ''); ?>"> |
|
29 | + <a data-target="menu1" href="<?php echo get_permalink($account_page_id) . ((!empty($permalink_option) ? '?' : '&') . 'account_dashboard_part=account'); ?>" title="" class=""> |
|
30 | 30 | <i class="wps-icon-user"></i> |
31 | - <span><?php _e( 'My account', 'wpshop'); ?></span> |
|
31 | + <span><?php _e('My account', 'wpshop'); ?></span> |
|
32 | 32 | </a> |
33 | 33 | </li> |
34 | - <li class="<?php echo ( ( !empty($account_dashboard_part) && $account_dashboard_part == 'address') ? 'wps-activ' : '' ); ?>"> |
|
35 | - <a href="<?php echo get_permalink($account_page_id).( (!empty($permalink_option) ? '?' : '&' ).'account_dashboard_part=address' ); ?>" title="" class=""> |
|
34 | + <li class="<?php echo ((!empty($account_dashboard_part) && $account_dashboard_part == 'address') ? 'wps-activ' : ''); ?>"> |
|
35 | + <a href="<?php echo get_permalink($account_page_id) . ((!empty($permalink_option) ? '?' : '&') . 'account_dashboard_part=address'); ?>" title="" class=""> |
|
36 | 36 | <i class="wps-icon-address"></i> |
37 | - <span><?php _e( 'My addresses', 'wpshop'); ?></span> |
|
37 | + <span><?php _e('My addresses', 'wpshop'); ?></span> |
|
38 | 38 | </a> |
39 | 39 | </li> |
40 | - <li class="<?php echo ( ( !empty($account_dashboard_part) && $account_dashboard_part == 'order') ? 'wps-activ' : '' ); ?>"> |
|
41 | - <a href="<?php echo get_permalink($account_page_id).( (!empty($permalink_option) ? '?' : '&' ).'account_dashboard_part=order' ); ?>" title="" class=""> |
|
40 | + <li class="<?php echo ((!empty($account_dashboard_part) && $account_dashboard_part == 'order') ? 'wps-activ' : ''); ?>"> |
|
41 | + <a href="<?php echo get_permalink($account_page_id) . ((!empty($permalink_option) ? '?' : '&') . 'account_dashboard_part=order'); ?>" title="" class=""> |
|
42 | 42 | <i class="wps-icon-truck"></i> |
43 | - <span><?php _e( 'My orders', 'wpshop'); ?></span> |
|
43 | + <span><?php _e('My orders', 'wpshop'); ?></span> |
|
44 | 44 | </a> |
45 | 45 | </li> |
46 | - <li class="<?php echo ( ( !empty($account_dashboard_part) && $account_dashboard_part == 'coupon') ? 'wps-activ' : '' ); ?>"> |
|
47 | - <a href="<?php echo get_permalink($account_page_id).( (!empty($permalink_option) ? '?' : '&' ).'account_dashboard_part=coupon' ); ?>" title="" class=""> |
|
46 | + <li class="<?php echo ((!empty($account_dashboard_part) && $account_dashboard_part == 'coupon') ? 'wps-activ' : ''); ?>"> |
|
47 | + <a href="<?php echo get_permalink($account_page_id) . ((!empty($permalink_option) ? '?' : '&') . 'account_dashboard_part=coupon'); ?>" title="" class=""> |
|
48 | 48 | <i class="wps-icon-promo"></i> |
49 | - <span><?php _e( 'My coupons', 'wpshop'); ?></span> |
|
49 | + <span><?php _e('My coupons', 'wpshop'); ?></span> |
|
50 | 50 | </a> |
51 | 51 | </li> |
52 | - <?php $opinion_option = get_option( 'wps_opinion' ); |
|
53 | - if( !empty($opinion_option) && !empty($opinion_option['active']) ) : ?> |
|
54 | - <li class="<?php echo ( ( !empty($account_dashboard_part) && $account_dashboard_part == 'opinion') ? 'wps-activ' : '' ); ?>"> |
|
55 | - <a href="<?php echo get_permalink($account_page_id).( (!empty($permalink_option) ? '?' : '&' ).'account_dashboard_part=opinion' ); ?>" title="" class=""> |
|
52 | + <?php $opinion_option = get_option('wps_opinion'); |
|
53 | + if (!empty($opinion_option) && !empty($opinion_option['active'])) : ?> |
|
54 | + <li class="<?php echo ((!empty($account_dashboard_part) && $account_dashboard_part == 'opinion') ? 'wps-activ' : ''); ?>"> |
|
55 | + <a href="<?php echo get_permalink($account_page_id) . ((!empty($permalink_option) ? '?' : '&') . 'account_dashboard_part=opinion'); ?>" title="" class=""> |
|
56 | 56 | <i class="wps-icon-chat"></i> |
57 | - <span><?php _e( 'My opinions', 'wpshop'); ?></span> |
|
57 | + <span><?php _e('My opinions', 'wpshop'); ?></span> |
|
58 | 58 | </a> |
59 | 59 | </li> |
60 | 60 | <?php endif; ?> |
61 | - <li class="<?php echo ( ( !empty($account_dashboard_part) && $account_dashboard_part == 'messages') ? 'wps-activ' : '' ); ?>"> |
|
62 | - <a href="<?php echo get_permalink($account_page_id).( (!empty($permalink_option) ? '?' : '&' ).'account_dashboard_part=messages' ); ?>" title="" class=""> |
|
61 | + <li class="<?php echo ((!empty($account_dashboard_part) && $account_dashboard_part == 'messages') ? 'wps-activ' : ''); ?>"> |
|
62 | + <a href="<?php echo get_permalink($account_page_id) . ((!empty($permalink_option) ? '?' : '&') . 'account_dashboard_part=messages'); ?>" title="" class=""> |
|
63 | 63 | <i class="wps-icon-email"></i> |
64 | - <span><?php _e( 'My messages', 'wpshop' ); ?></span> |
|
64 | + <span><?php _e('My messages', 'wpshop'); ?></span> |
|
65 | 65 | </a> |
66 | 66 | </li> |
67 | 67 | <?php echo apply_filters('wps_my_account_extra_part_menu', ''); ?> |
68 | 68 | </ul> |
69 | 69 | </div> |
70 | 70 | <div class="wps-section-content"> |
71 | - <div class="wps-activ" id="wps_dashboard_content" data-nonce="<?php echo wp_create_nonce( 'wps_refresh_add_opinion_list' ); ?>"> |
|
71 | + <div class="wps-activ" id="wps_dashboard_content" data-nonce="<?php echo wp_create_nonce('wps_refresh_add_opinion_list'); ?>"> |
|
72 | 72 | <?php echo $content; ?> |
73 | 73 | </div> |
74 | 74 | </div> |
@@ -1,3 +1,3 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <p><?php echo $content; ?></p> |
4 | 4 | \ No newline at end of file |
@@ -1,3 +1,5 @@ |
||
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 |
@@ -1,4 +1,6 @@ |
||
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 | * |
@@ -1,26 +1,26 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="wps-customer-quick-add-alert-box wps-alert hidden" ></div> |
4 | 4 | <form id="create_new_customer_pos_addon" action="<?php echo admin_url('admin-ajax.php'); ?>" method="post" > |
5 | 5 | <input type="hidden" name="action" value="wps-customer-quick-add" /> |
6 | - <?php wp_nonce_field( 'create_customer' ); ?> |
|
6 | + <?php wp_nonce_field('create_customer'); ?> |
|
7 | 7 | <input type="hidden" name="wps-customer-account-set-id" value="wps-customer-quick-add" /> |
8 | 8 | |
9 | - <?php if ( !empty( $customer_attributes ) ) : ?> |
|
10 | - <?php foreach ( $customer_attributes as $customer_attribute_group ) : ?> |
|
9 | + <?php if (!empty($customer_attributes)) : ?> |
|
10 | + <?php foreach ($customer_attributes as $customer_attribute_group) : ?> |
|
11 | 11 | <div class="wps-boxed"> |
12 | - <span class="wps-h5"><?php echo stripslashes( $customer_attribute_group['name'] ); ?></span> |
|
12 | + <span class="wps-h5"><?php echo stripslashes($customer_attribute_group['name']); ?></span> |
|
13 | 13 | <?php |
14 | - foreach ( $customer_attribute_group[ 'attribut' ] as $attribute ) : |
|
15 | - $output = wpshop_attributes::display_attribute( $attribute->code ); |
|
16 | - echo $output[ 'field' ]; |
|
14 | + foreach ($customer_attribute_group['attribut'] as $attribute) : |
|
15 | + $output = wpshop_attributes::display_attribute($attribute->code); |
|
16 | + echo $output['field']; |
|
17 | 17 | endforeach; |
18 | 18 | ?> |
19 | 19 | </div> |
20 | 20 | <?php endforeach; ?> |
21 | 21 | <?php endif; ?> |
22 | 22 | |
23 | - <button class="wps-bton-first-mini-rounded alignRight" ><?php _e( 'Add customer', 'wpshop'); ?></button> |
|
23 | + <button class="wps-bton-first-mini-rounded alignRight" ><?php _e('Add customer', 'wpshop'); ?></button> |
|
24 | 24 | </form> |
25 | 25 | <script type="text/javascript" > |
26 | 26 | jQuery( document ).ready( function() { |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | } |
35 | 35 | } |
36 | 36 | if ( has_error ) { |
37 | - alert( wpshopConvertAccentTojs( "<?php _e( 'Please fill all fields mark as required', 'wpshop' ); ?>" ) ); |
|
37 | + alert( wpshopConvertAccentTojs( "<?php _e('Please fill all fields mark as required', 'wpshop'); ?>" ) ); |
|
38 | 38 | return false; |
39 | 39 | } |
40 | 40 | }, |
@@ -1,4 +1,4 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | /** |
3 | 3 | * Plugin database options |
4 | 4 | * |
@@ -1,4 +1,6 @@ |
||
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 | * |
@@ -1,4 +1,6 @@ |
||
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 | * |
@@ -1,55 +1,55 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | -<div class="wps-<?php echo $address_type; ?>-address" <?php if ( !empty( $first_address_checking ) && !$is_from_admin && ( $address_type == 'billing' ) ) { echo 'style="display: none;"'; } ?>> |
|
3 | +<div class="wps-<?php echo $address_type; ?>-address" <?php if (!empty($first_address_checking) && !$is_from_admin && ($address_type == 'billing')) { echo 'style="display: none;"'; } ?>> |
|
4 | 4 | <div class="wps-gridwrapper"> |
5 | 5 | <div class="wps-grid4x6"><span class="wps-h3"><?php echo $address_title; ?></span></div> |
6 | 6 | </div> |
7 | - <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; ?>"> |
|
8 | -<?php if( !empty($box_content) ): ?> |
|
7 | + <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; ?>"> |
|
8 | +<?php if (!empty($box_content)): ?> |
|
9 | 9 | <?php echo $box_content; ?> |
10 | 10 | <?php endif; ?> |
11 | 11 | </ul> |
12 | 12 | |
13 | 13 | <?php $hide_add_btn = true; |
14 | - if ( empty( $box_content ) && ( $address_type == 'shipping' ) ) : |
|
14 | + if (empty($box_content) && ($address_type == 'shipping')) : |
|
15 | 15 | $hide_add_btn = false; ?> |
16 | 16 | <div class="wps-address-first-address-creation-container" > |
17 | 17 | <div id="wps_address_error_container" ></div> |
18 | - <form id="wps_address_form_save_first_address" action="<?php echo admin_url( 'admin-ajax.php' ); ?>" method="post"> |
|
18 | + <form id="wps_address_form_save_first_address" action="<?php echo admin_url('admin-ajax.php'); ?>" method="post"> |
|
19 | 19 | <input type="hidden" name="action" value="wps_save_address" /> |
20 | - <?php wp_nonce_field( 'wps_save_address' ); ?> |
|
20 | + <?php wp_nonce_field('wps_save_address'); ?> |
|
21 | 21 | <input type="hidden" name="wps-address-save-the-first" value="<?php echo $address_type; ?>" /> |
22 | - <?php echo self::display_form_fields( $address_type_id, '', 'first', '', array(), array(), array(), get_current_user_id() ); ?> |
|
22 | + <?php echo self::display_form_fields($address_type_id, '', 'first', '', array(), array(), array(), get_current_user_id()); ?> |
|
23 | 23 | |
24 | 24 | <?php |
25 | 25 | /** Check if a billing address is already save **/ |
26 | - if ( $address_type_id == $shipping_option['choice'] ) : |
|
26 | + if ($address_type_id == $shipping_option['choice']) : |
|
27 | 27 | ?> |
28 | 28 | <label class="wps-form" > |
29 | 29 | <input name="wps-shipping-to-billing" id="wps-shipping_to_billing" checked="checked" type="checkbox" /> |
30 | - <?php _e( 'Use the same address for billing', 'wpshop' ); ?> |
|
30 | + <?php _e('Use the same address for billing', 'wpshop'); ?> |
|
31 | 31 | </label> |
32 | 32 | <?php endif; ?> |
33 | 33 | |
34 | 34 | <button class="wps_submit_address_form wps-bton-first-alignRight-rounded"><?php _e('Save', 'wpshop'); ?></button> |
35 | 35 | </form> |
36 | 36 | </div> |
37 | -<?php elseif ( empty( $box_content ) && ( $address_type == 'billing' ) && !$shipping_is_avalaible ) : |
|
37 | +<?php elseif (empty($box_content) && ($address_type == 'billing') && !$shipping_is_avalaible) : |
|
38 | 38 | $hide_add_btn = $shipping_is_avalaible; ?> |
39 | 39 | <div class="wps-address-first-address-creation-container" > |
40 | 40 | <div id="wps_address_error_container" ></div> |
41 | - <form id="wps_address_form_save_first_address" action="<?php echo admin_url( 'admin-ajax.php' ); ?>" method="post"> |
|
41 | + <form id="wps_address_form_save_first_address" action="<?php echo admin_url('admin-ajax.php'); ?>" method="post"> |
|
42 | 42 | <input type="hidden" name="action" value="wps_save_address" /> |
43 | 43 | <input type="hidden" name="wps-address-save-the-first" value="<?php echo $address_type; ?>" /> |
44 | - <?php echo self::display_form_fields( $address_type_id, '', 'first', '', array(), array(), array(), get_current_user_id() ); ?> |
|
44 | + <?php echo self::display_form_fields($address_type_id, '', 'first', '', array(), array(), array(), get_current_user_id()); ?> |
|
45 | 45 | |
46 | 46 | <?php |
47 | 47 | /** Check if a billing address is already save **/ |
48 | - if ( $address_type_id != $billing_option['choice'] ) : |
|
48 | + if ($address_type_id != $billing_option['choice']) : |
|
49 | 49 | ?> |
50 | 50 | <label class="wps-form" > |
51 | 51 | <input name="wps-shipping-to-billing" id="wps-shipping_to_billing" checked="checked" type="checkbox" /> |
52 | - <?php _e( 'Use the same address for billing', 'wpshop' ); ?> |
|
52 | + <?php _e('Use the same address for billing', 'wpshop'); ?> |
|
53 | 53 | </label> |
54 | 54 | <?php endif; ?> |
55 | 55 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | </div> |
59 | 59 | <?php endif; ?> |
60 | 60 | |
61 | - <?php if( !$is_from_admin ) : ?> |
|
62 | - <button data-nonce="<?php echo wp_create_nonce( 'wps_load_address_form_' . $address_type_id ); ?>" id="wps-add-an-address-<?php echo $address_type_id; ?>" class="wps-bton-third wps-add-an-address<?php echo ( empty( $box_content ) && !$hide_add_btn ? ' hidden' : '' ); ?>" ><i class="wps-icon-plus"></i><?php printf( __('Add a %s', 'wpshop' ), strtolower($address_title) ); ?></button> |
|
61 | + <?php if (!$is_from_admin) : ?> |
|
62 | + <button data-nonce="<?php echo wp_create_nonce('wps_load_address_form_' . $address_type_id); ?>" id="wps-add-an-address-<?php echo $address_type_id; ?>" class="wps-bton-third wps-add-an-address<?php echo (empty($box_content) && !$hide_add_btn ? ' hidden' : ''); ?>" ><i class="wps-icon-plus"></i><?php printf(__('Add a %s', 'wpshop'), strtolower($address_title)); ?></button> |
|
63 | 63 | <?php endif; ?> |
64 | 64 | </div> |