@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <div class="wps-boxed"> |
4 | 6 | <div id="wps_renew_password_error_container"></div> |
@@ -1,13 +1,13 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="wps-boxed"> |
4 | 4 | <div id="wps_renew_password_error_container"></div> |
5 | 5 | <form action="<?php echo admin_url('admin-ajax.php'); ?>" method="post" id="wps_forgot_password_form" > |
6 | 6 | <input type="hidden" name="action" value="wps_forgot_password_request" /> |
7 | - <?php wp_nonce_field( 'wps_forgot_password_request' ); ?> |
|
7 | + <?php wp_nonce_field('wps_forgot_password_request'); ?> |
|
8 | 8 | <div class="wps-form-group"> |
9 | - <label for="wps_login_email_address"><?php _e('Email address', 'wpshop');?></label> |
|
10 | - <div id="wps_login_email_address" class="wps-form"><input type="text" name="wps_user_login" id="wps_new_password_request" placeholder="<?php _e('Your email address', 'wpshop');?>" /></div> |
|
9 | + <label for="wps_login_email_address"><?php _e('Email address', 'wpshop'); ?></label> |
|
10 | + <div id="wps_login_email_address" class="wps-form"><input type="text" name="wps_user_login" id="wps_new_password_request" placeholder="<?php _e('Your email address', 'wpshop'); ?>" /></div> |
|
11 | 11 | </div> |
12 | 12 | <div class="wps-form-group"> |
13 | 13 | <?php do_action('lostpassword_form'); ?> |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <div id="wps_renew_password_error_container_true"></div> |
4 | 6 | <div class="wps-boxed" id="wps_password_renew"> |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div id="wps_renew_password_error_container_true"></div> |
4 | 4 | <div class="wps-boxed" id="wps_password_renew"> |
@@ -8,15 +8,15 @@ discard block |
||
8 | 8 | <input type="hidden" name="activation_key" value="<?php echo sanitize_text_field($_GET['key']); ?>" /> |
9 | 9 | <input type="hidden" name="user_login" value="<?php echo sanitize_text_field($_GET['login']); ?>" /> |
10 | 10 | <input type="hidden" name="action" value="wps_forgot_password_renew" /> |
11 | - <?php echo wp_nonce_field( 'wps_forgot_password_renew' ); ?> |
|
11 | + <?php echo wp_nonce_field('wps_forgot_password_renew'); ?> |
|
12 | 12 | |
13 | 13 | <div class="wps-form-group"> |
14 | - <label for="wps_login_email_address"><?php _e('New password', 'wpshop');?></label> |
|
15 | - <div id="wps_login_email_address" class="wps-form"><input type="password" name="pass1" id="wps_new_password_request" placeholder="<?php _e('New password', 'wpshop');?>" /></div> |
|
14 | + <label for="wps_login_email_address"><?php _e('New password', 'wpshop'); ?></label> |
|
15 | + <div id="wps_login_email_address" class="wps-form"><input type="password" name="pass1" id="wps_new_password_request" placeholder="<?php _e('New password', 'wpshop'); ?>" /></div> |
|
16 | 16 | </div> |
17 | 17 | <div class="wps-form-group"> |
18 | - <label for="wps_login_email_address"><?php _e('Confirm new password', 'wpshop');?></label> |
|
19 | - <div id="wps_login_email_address" class="wps-form"><input type="password" name="pass2" id="wps_new_password_request" placeholder="<?php _e('Confirm new password', 'wpshop');?>" /></div> |
|
18 | + <label for="wps_login_email_address"><?php _e('Confirm new password', 'wpshop'); ?></label> |
|
19 | + <div id="wps_login_email_address" class="wps-form"><input type="password" name="pass2" id="wps_new_password_request" placeholder="<?php _e('Confirm new password', 'wpshop'); ?>" /></div> |
|
20 | 20 | </div> |
21 | 21 | <div class="wps-form-group"> |
22 | 22 |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | if ( !$force_login ) : ?> |
3 | 5 | <?php echo do_shortcode( '[wps_first_login]' ); ?> |
4 | 6 |
@@ -1,41 +1,41 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
2 | - if ( !$force_login ) : ?> |
|
3 | -<?php echo do_shortcode( '[wps_first_login]' ); ?> |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | + if (!$force_login) : ?> |
|
3 | +<?php echo do_shortcode('[wps_first_login]'); ?> |
|
4 | 4 | |
5 | 5 | <?php endif; ?> |
6 | 6 | <?php global $post; ?> |
7 | 7 | <div class="wps-boxed" id="wps_login_form_container"> |
8 | - <span class="wps-h5"><?php _e ('Log in', 'wpshop'); ?></span> |
|
8 | + <span class="wps-h5"><?php _e('Log in', 'wpshop'); ?></span> |
|
9 | 9 | <div class="wp-form-group wps-welcome_back_message" id="welcome_back_message"> |
10 | 10 | <span class="welcome_back_message_hello_message"> |
11 | - <?php _e( 'Howdy', 'wpshop')?> |
|
12 | - </span> <strong id="user_firstname"></strong>, <br/><?php _e( 'we are happy to see you again', 'wpshop'); ?> !</div> |
|
11 | + <?php _e('Howdy', 'wpshop')?> |
|
12 | + </span> <strong id="user_firstname"></strong>, <br/><?php _e('we are happy to see you again', 'wpshop'); ?> !</div> |
|
13 | 13 | <div id="wps_login_error_container"></div> |
14 | 14 | <form action="<?php echo admin_url('admin-ajax.php'); ?>" method="post" id="wps_login_form"> |
15 | - <?php echo apply_filters( 'login_form_top', '', $args ); ?> |
|
15 | + <?php echo apply_filters('login_form_top', '', $args); ?> |
|
16 | 16 | <input type="hidden" name="action" value="wps_login_request" /> |
17 | - <?php wp_nonce_field( 'control_login_form_request' ); ?> |
|
17 | + <?php wp_nonce_field('control_login_form_request'); ?> |
|
18 | 18 | <input type="hidden" name="wps-checking-origin" value="<?php echo $post->ID; ?>" /> |
19 | 19 | <div class="wps-form-group"> |
20 | - <label for="wps_login_email_address"><?php _e('Email address', 'wpshop');?></label> |
|
20 | + <label for="wps_login_email_address"><?php _e('Email address', 'wpshop'); ?></label> |
|
21 | 21 | <span class="wps-help-inline wps-help-inline-title"></span> |
22 | - <div id="wps_login_email_address" class="wps-form"><input type="text" name="wps_login_user_login" id="wps_login_email" placeholder="<?php _e('Your email address', 'wpshop');?>" /></div> |
|
22 | + <div id="wps_login_email_address" class="wps-form"><input type="text" name="wps_login_user_login" id="wps_login_email" placeholder="<?php _e('Your email address', 'wpshop'); ?>" /></div> |
|
23 | 23 | </div> |
24 | 24 | |
25 | 25 | <div class="wps-form-group"> |
26 | - <label for="wps_login_password"><?php _e('Password', 'wpshop');?></label> |
|
27 | - <div id="wps_login_password" class="wps-form"><input type="password" name="wps_login_password" id="wps_login_password" placeholder="<?php _e('Your password', 'wpshop');?>" /></div> |
|
26 | + <label for="wps_login_password"><?php _e('Password', 'wpshop'); ?></label> |
|
27 | + <div id="wps_login_password" class="wps-form"><input type="password" name="wps_login_password" id="wps_login_password" placeholder="<?php _e('Your password', 'wpshop'); ?>" /></div> |
|
28 | 28 | </div> |
29 | 29 | <div class="wps-form-group"> |
30 | - <?php echo apply_filters( 'login_form_middle', '', $args ); ?> |
|
31 | - <?php do_action( 'login_form' ); ?> |
|
30 | + <?php echo apply_filters('login_form_middle', '', $args); ?> |
|
31 | + <?php do_action('login_form'); ?> |
|
32 | 32 | </div> |
33 | 33 | <div class="wps-form-group wps-password-reminder"> |
34 | - <a href="#" data-nonce="<?php echo wp_create_nonce( 'wps_fill_forgot_password_modal' ); ?>" class="wps-modal-forgot-password-opener wps-password-reminder-link"><?php _e( 'Forgotten password', 'wpshop'); ?> ?</a> <button class="wps-bton-first-alignRight-rounded" id="wps_login_button"><?php _e('Connexion', 'wpshop'); ?></button> |
|
34 | + <a href="#" data-nonce="<?php echo wp_create_nonce('wps_fill_forgot_password_modal'); ?>" class="wps-modal-forgot-password-opener wps-password-reminder-link"><?php _e('Forgotten password', 'wpshop'); ?> ?</a> <button class="wps-bton-first-alignRight-rounded" id="wps_login_button"><?php _e('Connexion', 'wpshop'); ?></button> |
|
35 | 35 | <div class="wps-password-reminder-content"> |
36 | 36 | |
37 | 37 | </div> |
38 | 38 | </div> |
39 | - <?php echo apply_filters( 'login_form_bottom', '', $args ); ?> |
|
39 | + <?php echo apply_filters('login_form_bottom', '', $args); ?> |
|
40 | 40 | </form> |
41 | 41 | </div> |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <div class="wps-boxed" id="wps_login_form_first_step"> |
4 | 6 | <span class="wps-h5"><?php _e ('Log in', 'wpshop'); ?> / <?php _e( 'Sign up', 'wpshop'); ?></span> |
@@ -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 | <div class="wps-boxed" id="wps_signup_form_container"> |
4 | 6 | <span class="wps-h5"><?php _e ('Sign up', 'wpshop'); ?></span> |
@@ -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 field-<?php echo $signup_field->code; ?>"> |
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 field-<?php echo $signup_field->code; ?>"> |
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 | <div class="wps-boxed"> |
4 | 6 | <?php echo $attributes_sections_tpl; ?> |
@@ -1,11 +1,11 @@ |
||
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 ( $customer_link ) : ?> |
|
6 | - <div><a href="<?php echo get_edit_post_link( $cid ); ?>"><?php esc_html_e( 'See customer', 'wpshop' ); ?></a></div> |
|
7 | - <?php apply_filters( 'wps_filter_customer_in_order', $cid, wps_customer_ctr::get_author_id_by_customer_id( $cid ) ); ?> |
|
8 | - <?php elseif ( ! is_admin() || strpos( $_SERVER['REQUEST_URI'], 'admin-ajax.php' ) ) : ?> |
|
9 | - <div><button data-nonce="<?php echo esc_attr( wp_create_nonce( 'wps_fill_account_informations_modal' ) ); ?>" data-customer-id="<?php echo esc_attr( $cid ); ?>" class="wps-link wps-alignright" id="wps_modal_account_informations_opener"><i class="wps-icon-pencil"></i><?php esc_html_e( 'Edit your account informations', 'wpshop' ); ?></button></div> |
|
5 | + <?php if ($customer_link) : ?> |
|
6 | + <div><a href="<?php echo get_edit_post_link($cid); ?>"><?php esc_html_e('See customer', 'wpshop'); ?></a></div> |
|
7 | + <?php apply_filters('wps_filter_customer_in_order', $cid, wps_customer_ctr::get_author_id_by_customer_id($cid)); ?> |
|
8 | + <?php elseif (!is_admin() || strpos($_SERVER['REQUEST_URI'], 'admin-ajax.php')) : ?> |
|
9 | + <div><button data-nonce="<?php echo esc_attr(wp_create_nonce('wps_fill_account_informations_modal')); ?>" data-customer-id="<?php echo esc_attr($cid); ?>" class="wps-link wps-alignright" id="wps_modal_account_informations_opener"><i class="wps-icon-pencil"></i><?php esc_html_e('Edit your account informations', 'wpshop'); ?></button></div> |
|
10 | 10 | <?php endif; ?> |
11 | 11 | </div> |
@@ -1,7 +1,7 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | |
3 | -if( isset( $attribute_def->code ) && $attribute_def->code != 'is_provider' ) { ?> |
|
3 | +if (isset($attribute_def->code) && $attribute_def->code != 'is_provider') { ?> |
|
4 | 4 | <div class="wps-form-group"> |
5 | - <?php echo stripslashes( $attribute_def->frontend_label ); ?> : <?php echo ( !empty($attribute_value) ) ? $attribute_value : ''; ?> |
|
5 | + <?php echo stripslashes($attribute_def->frontend_label); ?> : <?php echo (!empty($attribute_value)) ? $attribute_value : ''; ?> |
|
6 | 6 | </div> |
7 | 7 | <?php } ?> |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | |
3 | 5 | if( isset( $attribute_def->code ) && $attribute_def->code != 'is_provider' ) { ?> |
4 | 6 | <div class="wps-form-group"> |
@@ -1,15 +1,15 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="product" data-id="<?php echo $post->ID; ?>"> |
4 | 4 | <h1 data-id="<?php echo $post->ID; ?>"><a href="#"><?php echo $post->post_title; ?></a></h1><a data-id="<?php echo $post->ID; ?>" class="delete_provider_btn" href="#">delete</a><input type="hidden" data-id="<?php echo $post->ID; ?>" class="special_provider" name="wps_provider_product[<?php echo $post->ID; ?>][special_provider]" value="update"> |
5 | 5 | <div class="values" data-id="<?php echo $post->ID; ?>"> |
6 | 6 | <div class="wps-form-group"> |
7 | - <label><?php _e( 'Product title', 'wpshop'); ?></label> |
|
7 | + <label><?php _e('Product title', 'wpshop'); ?></label> |
|
8 | 8 | <div class="wps-form"><input type="text" name="wps_provider_product[<?php echo $post->ID; ?>][post_title]" value="<?php echo $post->post_title; ?>" /></div> |
9 | 9 | </div> |
10 | 10 | <div class="wps-form-group"> |
11 | - <label><?php _e( 'Product description', 'wpshop'); ?> :</label> |
|
12 | - <div class="wps-form"><textarea id="wps_product_description_<?php echo $post->ID; ?>" name="wps_provider_product[<?php echo $post->ID; ?>][post_content]"><?php echo nl2br( $post->post_content );?></textarea></div> |
|
11 | + <label><?php _e('Product description', 'wpshop'); ?> :</label> |
|
12 | + <div class="wps-form"><textarea id="wps_product_description_<?php echo $post->ID; ?>" name="wps_provider_product[<?php echo $post->ID; ?>][post_content]"><?php echo nl2br($post->post_content); ?></textarea></div> |
|
13 | 13 | </div> |
14 | 14 | <?php echo $attributes_display; ?> |
15 | 15 | </div> |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <div class="product" data-id="<?php echo $post->ID; ?>"> |
4 | 6 | <h1 data-id="<?php echo $post->ID; ?>"><a href="#"><?php echo $post->post_title; ?></a></h1><a data-id="<?php echo $post->ID; ?>" class="delete_provider_btn" href="#">delete</a><input type="hidden" data-id="<?php echo $post->ID; ?>" class="special_provider" name="wps_provider_product[<?php echo $post->ID; ?>][special_provider]" value="update"> |
@@ -1,6 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="wps-form-group"> |
4 | - <label><?php _e( $att['field_definition']['label'], 'wpshop' ); ?></label> |
|
5 | - <div class="wps-form"><?php echo str_replace( 'name="wpshop_product_attribute', 'name="wps_provider_product[' .$post->ID. '][' . WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT . '_attribute]', $att['field_definition']['output'] ); ?></div> |
|
4 | + <label><?php _e($att['field_definition']['label'], 'wpshop'); ?></label> |
|
5 | + <div class="wps-form"><?php echo str_replace('name="wpshop_product_attribute', 'name="wps_provider_product[' . $post->ID . '][' . WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT . '_attribute]', $att['field_definition']['output']); ?></div> |
|
6 | 6 | </div> |
7 | 7 | \ 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 | <div class="wps-form-group"> |
4 | 6 | <label><?php _e( $att['field_definition']['label'], 'wpshop' ); ?></label> |