@@ -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,6 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="wps-alert wpshopHide" id="wps-pos-order-content-alert" ></div> |
4 | -<div id="wps_cart_container" data-nonce="<?php echo wp_create_nonce( 'wps_pos_order_content' ); ?>" class="wps-bloc-loader"> |
|
4 | +<div id="wps_cart_container" data-nonce="<?php echo wp_create_nonce('wps_pos_order_content'); ?>" class="wps-bloc-loader"> |
|
5 | 5 | <?php echo $this->display_wps_pos_order_content(); ?> |
6 | 6 | </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,7 +1,7 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <h2><?php _e('Payments summary', 'wps-pos-i18n'); ?></h2> |
4 | -<?php if ( !empty( $order_postmeta ) && !empty( $order_postmeta['order_payment'] ) && !empty( $order_postmeta['order_payment']['received'] ) && is_array( $order_postmeta['order_payment']['received'] ) ) : ?> |
|
4 | +<?php if (!empty($order_postmeta) && !empty($order_postmeta['order_payment']) && !empty($order_postmeta['order_payment']['received']) && is_array($order_postmeta['order_payment']['received'])) : ?> |
|
5 | 5 | <table id="wps-pos-order-payment-summary" > |
6 | 6 | <tr> |
7 | 7 | <th><?php _e('Date', 'wps-pos-i18n'); ?></th> |
@@ -9,29 +9,29 @@ discard block |
||
9 | 9 | <th><?php _e('Amount', 'wps-pos-i18n'); ?></th> |
10 | 10 | <th><?php _e('Invoice', 'wps-pos-i18n'); ?></th> |
11 | 11 | </tr> |
12 | - <?php foreach( $order_postmeta['order_payment']['received'] as $payment_received ) : ?> |
|
12 | + <?php foreach ($order_postmeta['order_payment']['received'] as $payment_received) : ?> |
|
13 | 13 | <tr> |
14 | - <td><?php echo ( !empty($payment_received['date']) ) ? mysql2date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $payment_received['date'], true ) : ''; ?></td> |
|
15 | - <td><?php echo ( !empty($payment_received['method']) ) ? __( $payment_received['method'], 'wpshop' ) : ''; ?></td> |
|
16 | - <td><?php echo ( !empty($payment_received['received_amount']) ) ? number_format( $payment_received['received_amount'], 2, '.', '' ) : ''; ?><?php echo wpshop_tools::wpshop_get_currency(); ?></td> |
|
14 | + <td><?php echo (!empty($payment_received['date'])) ? mysql2date(get_option('date_format') . ' ' . get_option('time_format'), $payment_received['date'], true) : ''; ?></td> |
|
15 | + <td><?php echo (!empty($payment_received['method'])) ? __($payment_received['method'], 'wpshop') : ''; ?></td> |
|
16 | + <td><?php echo (!empty($payment_received['received_amount'])) ? number_format($payment_received['received_amount'], 2, '.', '') : ''; ?><?php echo wpshop_tools::wpshop_get_currency(); ?></td> |
|
17 | 17 | <td> |
18 | - <a class="wps-bton-third-mini-rounded" href="<?php echo WPSHOP_TEMPLATES_URL . 'invoice.php?order_id=' . $order_id . '&mode=pdf' . ( !empty( $payment_received['invoice_ref'] ) ? '&invoice_ref=' . $payment_received['invoice_ref'] : '' ); ?>" ><?php _e( 'Download', 'wpshop' ); ?></a> |
|
19 | - <a class="wps-bton-third-mini-rounded" target="_blank" href="<?php echo WPSHOP_TEMPLATES_URL . 'invoice.php?order_id=' . $order_id . ( !empty( $payment_received['invoice_ref'] ) ? '&invoice_ref=' . $payment_received['invoice_ref'] : '' ); ?>" ><?php _e( 'View', 'wpshop' ); ?></a> |
|
18 | + <a class="wps-bton-third-mini-rounded" href="<?php echo WPSHOP_TEMPLATES_URL . 'invoice.php?order_id=' . $order_id . '&mode=pdf' . (!empty($payment_received['invoice_ref']) ? '&invoice_ref=' . $payment_received['invoice_ref'] : ''); ?>" ><?php _e('Download', 'wpshop'); ?></a> |
|
19 | + <a class="wps-bton-third-mini-rounded" target="_blank" href="<?php echo WPSHOP_TEMPLATES_URL . 'invoice.php?order_id=' . $order_id . (!empty($payment_received['invoice_ref']) ? '&invoice_ref=' . $payment_received['invoice_ref'] : ''); ?>" ><?php _e('View', 'wpshop'); ?></a> |
|
20 | 20 | </td> |
21 | 21 | </tr> |
22 | 22 | <?php endforeach; ?> |
23 | 23 | </table> |
24 | 24 | <?php endif; ?> |
25 | 25 | |
26 | -<?php if ( ( 'money' == $payment_method ) && ( number_format( (float)$received_payment_amount, 2, '.', '') > number_format( (float)$payment_amount, 2, '.', '') ) ) : ?> |
|
26 | +<?php if (('money' == $payment_method) && (number_format((float)$received_payment_amount, 2, '.', '') > number_format((float)$payment_amount, 2, '.', ''))) : ?> |
|
27 | 27 | <div class="alignright wps-alert wps-alert-info" id="wpspos-back-cash" > |
28 | - <?php _e( 'Change due', 'wps-pos-i18n' ); ?> : <span class="wpspos-due-change" ><?php echo ( number_format( (float)$received_payment_amount, 2, '.', '') - number_format( (float)$payment_amount, 2, '.', '') );?></span> |
|
28 | + <?php _e('Change due', 'wps-pos-i18n'); ?> : <span class="wpspos-due-change" ><?php echo (number_format((float)$received_payment_amount, 2, '.', '') - number_format((float)$payment_amount, 2, '.', '')); ?></span> |
|
29 | 29 | </div> |
30 | 30 | <?php endif; ?> |
31 | 31 | |
32 | 32 | <div class="wps-pos-order-completion-button" > |
33 | - <a href="<?php echo admin_url( $new_order ? 'admin.php?page=wps-pos&new_order=yes' : 'admin.php?page=wps-pos' ); ?>" class="wps-bton-first-rounded alignright" role="button"><?php echo $new_order ? __('Create a new order', 'wps-pos-i18n') : __('Return to current order', 'wps-pos-i18n'); ?></a> |
|
34 | - <?php if ( !empty( $order_postmeta ) && !empty( $order_postmeta['order_status'] ) && ( 'completed' != $order_postmeta['order_status'] ) ) : ?> |
|
35 | - <a title="<?php _e( 'New payment', 'wps-pos-i18n' ); ?>" href="<?php print wp_nonce_url( admin_url( 'admin-ajax.php?action=wpspos-finalize-order&order_id=' . $order_id . '&width=560&height=420' ), 'wps_pos_finalize_order', '_wpnonce' ); ?>" class="thickbox wps-bton-third-rounded alignright" ><?php _e( 'New payment', 'wps-pos-i18n' ); ?></a> |
|
33 | + <a href="<?php echo admin_url($new_order ? 'admin.php?page=wps-pos&new_order=yes' : 'admin.php?page=wps-pos'); ?>" class="wps-bton-first-rounded alignright" role="button"><?php echo $new_order ? __('Create a new order', 'wps-pos-i18n') : __('Return to current order', 'wps-pos-i18n'); ?></a> |
|
34 | + <?php if (!empty($order_postmeta) && !empty($order_postmeta['order_status']) && ('completed' != $order_postmeta['order_status'])) : ?> |
|
35 | + <a title="<?php _e('New payment', 'wps-pos-i18n'); ?>" href="<?php print wp_nonce_url(admin_url('admin-ajax.php?action=wpspos-finalize-order&order_id=' . $order_id . '&width=560&height=420'), 'wps_pos_finalize_order', '_wpnonce'); ?>" class="thickbox wps-bton-third-rounded alignright" ><?php _e('New payment', 'wps-pos-i18n'); ?></a> |
|
36 | 36 | <?php endif; ?> |
37 | 37 | </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,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 | <?php |
6 | 6 | global $wpdb; |
7 | - $query = $wpdb->prepare( "SELECT id FROM " . WPSHOP_DBT_ATTRIBUTE_SET . " WHERE name = %s", __( 'Billing address', 'wpshop' ) ); |
|
8 | - $attribute_set_id = $wpdb->get_var( $query ); |
|
7 | + $query = $wpdb->prepare("SELECT id FROM " . WPSHOP_DBT_ATTRIBUTE_SET . " WHERE name = %s", __('Billing address', 'wpshop')); |
|
8 | + $attribute_set_id = $wpdb->get_var($query); |
|
9 | 9 | ?> |
10 | 10 | <input type="hidden" name="action" value="wpspos-customer-quick-add" /> |
11 | - <?php wp_nonce_field( 'create_customer' ); ?> |
|
11 | + <?php wp_nonce_field('create_customer'); ?> |
|
12 | 12 | <input type="hidden" name="wps-customer-account-set-id" value="<?php echo $attribute_set_id; ?>" /> |
13 | 13 | |
14 | - <?php if ( !empty( $customer_attributes ) ) : ?> |
|
15 | - <?php foreach ( $customer_attributes as $customer_attribute_group ) : ?> |
|
14 | + <?php if (!empty($customer_attributes)) : ?> |
|
15 | + <?php foreach ($customer_attributes as $customer_attribute_group) : ?> |
|
16 | 16 | <div class="wps-boxed"> |
17 | - <span class="wps-h5"><?php echo stripslashes( $customer_attribute_group['name'] ); ?></span> |
|
17 | + <span class="wps-h5"><?php echo stripslashes($customer_attribute_group['name']); ?></span> |
|
18 | 18 | <?php |
19 | - foreach ( $customer_attribute_group[ 'attribut' ] as $attribute ) : |
|
20 | - if( !empty($attribute->code) ) { |
|
21 | - $output = wpshop_attributes::display_attribute( $attribute->code ); |
|
22 | - if( empty($output['field_definition']['type']) || $output['field_definition']['type'] != 'hidden' ) { |
|
23 | - echo $output[ 'field' ]; |
|
19 | + foreach ($customer_attribute_group['attribut'] as $attribute) : |
|
20 | + if (!empty($attribute->code)) { |
|
21 | + $output = wpshop_attributes::display_attribute($attribute->code); |
|
22 | + if (empty($output['field_definition']['type']) || $output['field_definition']['type'] != 'hidden') { |
|
23 | + echo $output['field']; |
|
24 | 24 | } |
25 | 25 | } |
26 | 26 | endforeach; |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | <?php endforeach; ?> |
30 | 30 | <?php endif; ?> |
31 | 31 | |
32 | - <button class="wps-bton-first-mini-rounded alignRight wps-bton-loader" id="wps-customer-quick-creation-button" ><?php _e( 'Add customer', 'wpshop'); ?></button> |
|
32 | + <button class="wps-bton-first-mini-rounded alignRight wps-bton-loader" id="wps-customer-quick-creation-button" ><?php _e('Add customer', 'wpshop'); ?></button> |
|
33 | 33 | </form> |
34 | 34 | <script type="text/javascript" > |
35 | 35 | jQuery( document ).ready( function() { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | } |
45 | 45 | } |
46 | 46 | if ( has_error ) { |
47 | - alert( wpshopConvertAccentTojs( "<?php _e( 'Please fill all fields mark as required', 'wpshop' ); ?>" ) ); |
|
47 | + alert( wpshopConvertAccentTojs( "<?php _e('Please fill all fields mark as required', 'wpshop'); ?>" ) ); |
|
48 | 48 | return false; |
49 | 49 | } |
50 | 50 | }, |
@@ -1,19 +1,19 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div id="wps-product-quick-creation-form-attributes" class="wps-bloc-loader" > |
4 | - <?php $attribute_list = wpshop_attributes_set::getAttributeSetDetails( $chosen_set ); ?> |
|
5 | - <?php if ( !empty( $attribute_list ) ) : ?> |
|
6 | - <?php foreach( $attribute_list as $attribute_set ) : ?> |
|
4 | + <?php $attribute_list = wpshop_attributes_set::getAttributeSetDetails($chosen_set); ?> |
|
5 | + <?php if (!empty($attribute_list)) : ?> |
|
6 | + <?php foreach ($attribute_list as $attribute_set) : ?> |
|
7 | 7 | <?php |
8 | 8 | $attributes = ''; |
9 | - foreach($attribute_set['attribut'] as $attribute_key => $attribute) { |
|
10 | - if( !empty( $attribute_key ) && ( $attribute->status == 'valid' ) && ( 'yes' == $attribute->is_used_in_quick_add_form ) ) { |
|
11 | - $output = wpshop_attributes::display_attribute( $attribute->code ); |
|
9 | + foreach ($attribute_set['attribut'] as $attribute_key => $attribute) { |
|
10 | + if (!empty($attribute_key) && ($attribute->status == 'valid') && ('yes' == $attribute->is_used_in_quick_add_form)) { |
|
11 | + $output = wpshop_attributes::display_attribute($attribute->code); |
|
12 | 12 | $attributes .= $output['field']; |
13 | 13 | } |
14 | 14 | } |
15 | 15 | ?> |
16 | - <?php if ( !empty( $attributes ) ) : ?> |
|
16 | + <?php if (!empty($attributes)) : ?> |
|
17 | 17 | <div class="wps-boxed"> |
18 | 18 | <span class="wps-h5"><?php echo $attribute_set['name']; ?></span> |
19 | 19 | <?php echo $attributes; ?> |
@@ -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,14 +1,14 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | -<form id="wps_product_quick_add_form" method="post" action="<?php echo admin_url( 'admin-ajax.php' ); ?>" > |
|
3 | +<form id="wps_product_quick_add_form" method="post" action="<?php echo admin_url('admin-ajax.php'); ?>" > |
|
4 | 4 | <input type="hidden" name="action" value="wpspos-product-quick-add"> |
5 | - <?php wp_nonce_field( 'create_product' ); ?> |
|
5 | + <?php wp_nonce_field('create_product'); ?> |
|
6 | 6 | <div class="wps-boxed" style="margin-top:10px;" > |
7 | - <span class="wps-h5"><?php _e( 'Product', 'wpshop'); ?></span> |
|
7 | + <span class="wps-h5"><?php _e('Product', 'wpshop'); ?></span> |
|
8 | 8 | |
9 | 9 | <div class="wpshop_cls" > |
10 | 10 | <div class="wpshop_form_label _product_title_label alignleft" > |
11 | - <label for="attribute_product_title" ><?php _e( 'Product name', 'wpshop'); ?> <span class="wpshop_required" >*</span></label> |
|
11 | + <label for="attribute_product_title" ><?php _e('Product name', 'wpshop'); ?> <span class="wpshop_required" >*</span></label> |
|
12 | 12 | </div> |
13 | 13 | <div class="wpshop_form_input_element _product_title_input alignleft" > |
14 | 14 | <input type="text" name="post_title" id="post_title" value="" class="wpshop_product_attribute_post_title wpshop_attributes_display" required > |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | <div class="wpshop_cls" > |
19 | 19 | <div class="wpshop_form_label _description_label alignleft" > |
20 | - <label for="attribute_description" ><?php _e( 'Description', 'wpshop'); ?></label> |
|
20 | + <label for="attribute_description" ><?php _e('Description', 'wpshop'); ?></label> |
|
21 | 21 | </div> |
22 | 22 | <div class="wpshop_form_input_element _description_input alignleft" > |
23 | 23 | <textarea name="post_content" id="post_content" class="wpshop_product_post_content wpshop_attributes_display" rows="2"></textarea> |
@@ -27,35 +27,35 @@ discard block |
||
27 | 27 | |
28 | 28 | <?php |
29 | 29 | /** Get the attribute set list */ |
30 | - $attribute_set_list = wpshop_attributes_set::get_attribute_set_list_for_entity( wpshop_entities::get_entity_identifier_from_code( 'wpshop_product' ) ); |
|
30 | + $attribute_set_list = wpshop_attributes_set::get_attribute_set_list_for_entity(wpshop_entities::get_entity_identifier_from_code('wpshop_product')); |
|
31 | 31 | $default_set = 0; |
32 | - if ( 1 == count( $attribute_set_list ) ) { |
|
33 | - $default_set = $attribute_set_list[ 0 ]->id; |
|
32 | + if (1 == count($attribute_set_list)) { |
|
33 | + $default_set = $attribute_set_list[0]->id; |
|
34 | 34 | } |
35 | 35 | ?> |
36 | 36 | <?php /** Check if attribute set list is not empty in order to display a dropdown for sélection */ ?> |
37 | - <?php if ( !empty( $attribute_set_list ) && ( 1 <= count( $attribute_set_list ) ) ) : ?> |
|
37 | + <?php if (!empty($attribute_set_list) && (1 <= count($attribute_set_list))) : ?> |
|
38 | 38 | <div style=" width:80%; margin: 0 auto 10px auto; " > |
39 | - <?php _e( 'Product type to create', 'wpshop' ); ?> : |
|
40 | - <select name="wps-product-attribute-set" data-nonce="<?php echo wp_create_nonce( 'attribute_list_reload' ); ?>" > |
|
41 | - <?php foreach( $attribute_set_list as $attribute_set ) : ?> |
|
39 | + <?php _e('Product type to create', 'wpshop'); ?> : |
|
40 | + <select name="wps-product-attribute-set" data-nonce="<?php echo wp_create_nonce('attribute_list_reload'); ?>" > |
|
41 | + <?php foreach ($attribute_set_list as $attribute_set) : ?> |
|
42 | 42 | <?php $is_default_set = false; ?> |
43 | - <?php if ( !empty( $attribute_set->default_set ) && strtolower( __( 'Yes', 'wpshop' ) ) == strtolower( __( $attribute_set->default_set, 'wpshop' ) ) ) : ?> |
|
43 | + <?php if (!empty($attribute_set->default_set) && strtolower(__('Yes', 'wpshop')) == strtolower(__($attribute_set->default_set, 'wpshop'))) : ?> |
|
44 | 44 | <?php $is_default_set = true; ?> |
45 | 45 | <?php $default_set = $attribute_set->id; ?> |
46 | 46 | <?php endif; ?> |
47 | - <option value="<?php echo $attribute_set->id; ?>" <?php selected( ( !empty( $chosen_set ) ? true : $is_default_set ) , true, true ); ?> ><?php echo $attribute_set->name; ?></option> |
|
47 | + <option value="<?php echo $attribute_set->id; ?>" <?php selected((!empty($chosen_set) ? true : $is_default_set), true, true); ?> ><?php echo $attribute_set->name; ?></option> |
|
48 | 48 | <?php endforeach; ?> |
49 | 49 | </select> |
50 | 50 | </div> |
51 | 51 | <?php endif; ?> |
52 | 52 | |
53 | 53 | <?php /** If default set or if there is a selected set get existing attributes list for this set */ ?> |
54 | - <?php if ( !empty( $default_set ) || !empty( $chosen_set ) ) : ?> |
|
55 | - <?php $this->display_attribute( !empty( $chosen_set ) ? $chosen_set : ( !empty( $default_set ) ? $default_set : 0 ) ); ?> |
|
54 | + <?php if (!empty($default_set) || !empty($chosen_set)) : ?> |
|
55 | + <?php $this->display_attribute(!empty($chosen_set) ? $chosen_set : (!empty($default_set) ? $default_set : 0)); ?> |
|
56 | 56 | <?php endif; ?> |
57 | 57 | |
58 | - <button class="wps-bton-first-mini-rounded alignRight wps-bton-loader" id="wps-product-quick-creation-button" ><?php _e( 'Add product', 'wpshop'); ?></button> |
|
58 | + <button class="wps-bton-first-mini-rounded alignRight wps-bton-loader" id="wps-product-quick-creation-button" ><?php _e('Add product', 'wpshop'); ?></button> |
|
59 | 59 | </form> |
60 | 60 | <script type="text/javascript" > |
61 | 61 | jQuery( document ).ready( function() { |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | } |
94 | 94 | } |
95 | 95 | if ( has_error ) { |
96 | - alert( wpshopConvertAccentTojs( "<?php _e( 'Please fill all fields mark as required', 'wpshop' ); ?>" ) ); |
|
96 | + alert( wpshopConvertAccentTojs( "<?php _e('Please fill all fields mark as required', 'wpshop'); ?>" ) ); |
|
97 | 97 | return false; |
98 | 98 | } |
99 | 99 | }, |
@@ -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,39 +1,39 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="wps-table wps-my-message"> |
4 | 4 | <div class="wps-table-header wps-table-row"> |
5 | - <div class="wps-table-cell"><?php _e( 'Message title', 'wpshop' ); ?></div> |
|
6 | - <div class="wps-table-cell"><?php _e( 'Send date', 'wpshop' ); ?></div> |
|
5 | + <div class="wps-table-cell"><?php _e('Message title', 'wpshop'); ?></div> |
|
6 | + <div class="wps-table-cell"><?php _e('Send date', 'wpshop'); ?></div> |
|
7 | 7 | </div> |
8 | - <?php if( !empty($messages_data) && is_array($messages_data) ) :?> |
|
9 | - <?php foreach( $messages_data as $meta_id => $message ) : ?> |
|
8 | + <?php if (!empty($messages_data) && is_array($messages_data)) :?> |
|
9 | + <?php foreach ($messages_data as $meta_id => $message) : ?> |
|
10 | 10 | |
11 | - <div class="wps-table-content wps-table-row" data-nonce="<?php echo wp_create_nonce( 'get_content_message' ); ?>" data-id="<?php echo $meta_id; ?>" data-date="<?php echo substr($message[0]['mess_dispatch_date'][0], 0, 7); ?>"> |
|
11 | + <div class="wps-table-content wps-table-row" data-nonce="<?php echo wp_create_nonce('get_content_message'); ?>" data-id="<?php echo $meta_id; ?>" data-date="<?php echo substr($message[0]['mess_dispatch_date'][0], 0, 7); ?>"> |
|
12 | 12 | <div class="wps-table-cell"> |
13 | 13 | <span class="wps-message-title"><?php echo $message[0]['mess_title']; ?></span> |
14 | - <?php if( !empty($message[0]['mess_object_id']) ) { |
|
15 | - $order_meta = get_post_meta( $message[0]['mess_object_id'], '_order_postmeta', true ); |
|
16 | - $comments = get_post_meta( $message[0]['mess_object_id'], '_order_private_comments', true); |
|
17 | - if(!empty($comments)) { |
|
18 | - foreach ( $comments as $comment ) { |
|
19 | - $user_data = get_userdata( $comment['author'] ); |
|
14 | + <?php if (!empty($message[0]['mess_object_id'])) { |
|
15 | + $order_meta = get_post_meta($message[0]['mess_object_id'], '_order_postmeta', true); |
|
16 | + $comments = get_post_meta($message[0]['mess_object_id'], '_order_private_comments', true); |
|
17 | + if (!empty($comments)) { |
|
18 | + foreach ($comments as $comment) { |
|
19 | + $user_data = get_userdata($comment['author']); |
|
20 | 20 | echo '<br><b>' . $order_meta['order_key'] . '</b> <i>'; |
21 | - printf( __( '%s says on', 'wpshop'), $user_data->user_login ); |
|
22 | - echo ' ' . mysql2date( get_option('links_updated_date_format'), $comment['comment_date'], true ) . '</i> : <br>' . $comment['comment']; |
|
21 | + printf(__('%s says on', 'wpshop'), $user_data->user_login); |
|
22 | + echo ' ' . mysql2date(get_option('links_updated_date_format'), $comment['comment_date'], true) . '</i> : <br>' . $comment['comment']; |
|
23 | 23 | } |
24 | 24 | } |
25 | 25 | } ?> |
26 | 26 | </div> |
27 | 27 | <div class="wps-table-cell"> |
28 | - <?php if( !empty($message[0]['mess_dispatch_date']) ) : ?> |
|
28 | + <?php if (!empty($message[0]['mess_dispatch_date'])) : ?> |
|
29 | 29 | <ul> |
30 | - <?php foreach( $message[0]['mess_dispatch_date'] as $date ) : ?> |
|
31 | - <li><?php echo mysql2date( get_option('date_format') . ' ' . get_option('time_format') , $date, true ); ?></li> |
|
30 | + <?php foreach ($message[0]['mess_dispatch_date'] as $date) : ?> |
|
31 | + <li><?php echo mysql2date(get_option('date_format') . ' ' . get_option('time_format'), $date, true); ?></li> |
|
32 | 32 | <?php endforeach; ?> |
33 | 33 | </ul> |
34 | 34 | <?php endif; ?> |
35 | 35 | </div> |
36 | 36 | </div> |
37 | 37 | <?php endforeach; ?> |
38 | - <?php endif;?> |
|
38 | + <?php endif; ?> |
|
39 | 39 | </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,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,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 | * |