@@ -1,4 +1,4 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | -<p class="about-description"><?php _e( 'WPShop is mainly maintained by a french web-agency based in Montpellier, south of France.', 'wps_installer'); ?></p> |
|
4 | -<a href="http://www.eoxia.com" target="_eoxia_website" class="wps-installer-eoxia-link" ><img src="<?php echo WPS_INSTALLER_URL . WPS_INSTALLER_DIR . '/assets/medias/logo_eoxia.png'; ?>" alt="<?php _e( 'Go on eoxia website', 'wpshop'); ?>" title="<?php _e( 'Go on eoxia website', 'wpshop'); ?>" /></a> |
|
5 | 3 | \ No newline at end of file |
4 | +<p class="about-description"><?php _e('WPShop is mainly maintained by a french web-agency based in Montpellier, south of France.', 'wps_installer'); ?></p> |
|
5 | +<a href="http://www.eoxia.com" target="_eoxia_website" class="wps-installer-eoxia-link" ><img src="<?php echo WPS_INSTALLER_URL . WPS_INSTALLER_DIR . '/assets/medias/logo_eoxia.png'; ?>" alt="<?php _e('Go on eoxia website', 'wpshop'); ?>" title="<?php _e('Go on eoxia website', 'wpshop'); ?>" /></a> |
|
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 | <p class="about-description"><?php _e( 'WPShop is mainly maintained by a french web-agency based in Montpellier, south of France.', 'wps_installer'); ?></p> |
4 | 6 | <a href="http://www.eoxia.com" target="_eoxia_website" class="wps-installer-eoxia-link" ><img src="<?php echo WPS_INSTALLER_URL . WPS_INSTALLER_DIR . '/assets/medias/logo_eoxia.png'; ?>" alt="<?php _e( 'Go on eoxia website', 'wpshop'); ?>" title="<?php _e( 'Go on eoxia website', 'wpshop'); ?>" /></a> |
5 | 7 | \ No newline at end of file |
@@ -1,14 +1,14 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="updated wpshop_admin_notice wpshop_install_notice" id="wpshop_install_notice" > |
4 | 4 | <h3><?php |
5 | - if ( 1 != $this->current_installation_step ) { |
|
6 | - _e( 'You start to configure your shop, but there are still missing parameters', 'wpshop'); |
|
5 | + if (1 != $this->current_installation_step) { |
|
6 | + _e('You start to configure your shop, but there are still missing parameters', 'wpshop'); |
|
7 | 7 | } |
8 | 8 | else { |
9 | - _e( 'Your shop is now installed. You will need some configuration before using it completely', 'wpshop'); |
|
9 | + _e('Your shop is now installed. You will need some configuration before using it completely', 'wpshop'); |
|
10 | 10 | } |
11 | 11 | ?></h3> |
12 | - <a href="<?php echo admin_url( 'admin.php?page=wps-installer&installation_state=initialized' ); ?>" class="button-primary wpshop-install-button" ><?php ( 1 != $this->current_installation_step ) ? _e( 'Continue configuration', 'wpshop') : _e( 'Configure your shop', 'wpshop'); ?></a> |
|
13 | - <a href="<?php echo admin_url( 'admin.php?page=wpshop_about&installation_state=ignored' ); ?>" ><?php _e( 'Install without settings', 'wpshop'); ?></a> |
|
12 | + <a href="<?php echo admin_url('admin.php?page=wps-installer&installation_state=initialized'); ?>" class="button-primary wpshop-install-button" ><?php (1 != $this->current_installation_step) ? _e('Continue configuration', 'wpshop') : _e('Configure your shop', 'wpshop'); ?></a> |
|
13 | + <a href="<?php echo admin_url('admin.php?page=wpshop_about&installation_state=ignored'); ?>" ><?php _e('Install without settings', 'wpshop'); ?></a> |
|
14 | 14 | </div> |
@@ -1,11 +1,12 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <div class="updated wpshop_admin_notice wpshop_install_notice" id="wpshop_install_notice" > |
4 | 6 | <h3><?php |
5 | 7 | if ( 1 != $this->current_installation_step ) { |
6 | 8 | _e( 'You start to configure your shop, but there are still missing parameters', 'wpshop'); |
7 | - } |
|
8 | - else { |
|
9 | + } else { |
|
9 | 10 | _e( 'Your shop is now installed. You will need some configuration before using it completely', 'wpshop'); |
10 | 11 | } |
11 | 12 | ?></h3> |
@@ -1,20 +1,20 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <table class="form-table" > |
4 | 4 | <tr> |
5 | - <th><?php _e( 'Shop type', 'wpshop' ); ?></th> |
|
5 | + <th><?php _e('Shop type', 'wpshop'); ?></th> |
|
6 | 6 | <td><?php wpshop_general_options::wpshop_shop_type(); ?></td> |
7 | 7 | </tr> |
8 | 8 | <tr> |
9 | - <th><?php _e( 'Price piloting for the shop', 'wpshop' ); ?></th> |
|
9 | + <th><?php _e('Price piloting for the shop', 'wpshop'); ?></th> |
|
10 | 10 | <td><?php wpshop_general_options::wpshop_shop_price_piloting_field(); ?></td> |
11 | 11 | </tr> |
12 | 12 | <tr> |
13 | - <td colspan="2" ><label><input type="checkbox" name="wps-installer-data-insertion" value="yes" checked="checked" disabled="disabled" /><?php _e( 'Create necessary datas for wpshop (emails, pages)', 'wpshop'); ?></label></td> |
|
13 | + <td colspan="2" ><label><input type="checkbox" name="wps-installer-data-insertion" value="yes" checked="checked" disabled="disabled" /><?php _e('Create necessary datas for wpshop (emails, pages)', 'wpshop'); ?></label></td> |
|
14 | 14 | </tr> |
15 | 15 | <!-- |
16 | 16 | <tr> |
17 | - <td colspan="2" ><label><input type="checkbox" name="wps-installer-data-insertion" value="yes" /><?php _e( 'Create sample datas (products)', 'wpshop'); ?></label></td> |
|
17 | + <td colspan="2" ><label><input type="checkbox" name="wps-installer-data-insertion" value="yes" /><?php _e('Create sample datas (products)', 'wpshop'); ?></label></td> |
|
18 | 18 | </tr> |
19 | 19 | --> |
20 | 20 | </table> |
21 | 21 | \ 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 | <table class="form-table" > |
4 | 6 | <tr> |
@@ -1,35 +1,35 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="wpshop_full_page_tabs"> |
4 | - <h1><span class="wps-shop-icon" ></span><?php _e( 'Welcome on wpshop', 'wpshop'); ?></h1> |
|
5 | - <h2><?php _e( 'Before you start to use WPShop you will need to configure some parameters', 'wpshop'); ?></h2> |
|
4 | + <h1><span class="wps-shop-icon" ></span><?php _e('Welcome on wpshop', 'wpshop'); ?></h1> |
|
5 | + <h2><?php _e('Before you start to use WPShop you will need to configure some parameters', 'wpshop'); ?></h2> |
|
6 | 6 | <div class="wpshop_admin_box"> |
7 | 7 | <div class="wps-gridwrapper3-marged"> |
8 | 8 | <?php |
9 | 9 | $step_finished = false; |
10 | - foreach( $steps as $step_id => $step) : |
|
10 | + foreach ($steps as $step_id => $step) : |
|
11 | 11 | $step_id += 1; |
12 | - $step_class = ( $current_step == $step_id ) ? 'wps-checkout-step-current' : ( ( $current_step > $step_id) ? 'wps-checkout-step-finished' : 'wps-checkout-step' ) ; |
|
13 | - $step_finished = ( ( $current_step > $step_id) ? true : false ) ; |
|
14 | - require( wpshop_tools::get_template_part( WPS_INSTALLER_DIR, WPSINSTALLER_TPL_DIR, "backend", "step_indicator" ) ); |
|
12 | + $step_class = ($current_step == $step_id) ? 'wps-checkout-step-current' : (($current_step > $step_id) ? 'wps-checkout-step-finished' : 'wps-checkout-step'); |
|
13 | + $step_finished = (($current_step > $step_id) ? true : false); |
|
14 | + require(wpshop_tools::get_template_part(WPS_INSTALLER_DIR, WPSINSTALLER_TPL_DIR, "backend", "step_indicator")); |
|
15 | 15 | endforeach; |
16 | 16 | ?> |
17 | 17 | </div><!-- .wps-gridwrapper4-marged --> |
18 | 18 | |
19 | 19 | <div class="wps-installer-step-container wps-installer-step-container-<?php echo $current_step; ?>" > |
20 | - <?php if ( $current_step < count( $steps ) ) : ?> |
|
21 | - <form action="<?php echo admin_url( 'admin.php?page=wps-installer&wps-installation-step=' . ( $current_step + 1 ) ); ?>" method="post" id="wps_installer_form" enctype="multipart/form-data" > |
|
20 | + <?php if ($current_step < count($steps)) : ?> |
|
21 | + <form action="<?php echo admin_url('admin.php?page=wps-installer&wps-installation-step=' . ($current_step + 1)); ?>" method="post" id="wps_installer_form" enctype="multipart/form-data" > |
|
22 | 22 | <input type="hidden" name="action" value="wps-installation" /> |
23 | 23 | <div class="wps-installer-step-content wps-installer-step-content-<?php echo $current_step; ?>" > |
24 | 24 | <?php echo $current_step_output; ?> |
25 | 25 | </div> |
26 | 26 | |
27 | - <button class="button button-primary alignright" ><?php ( 2 == $current_step ) ? _e( 'Create my shop', 'wpshop') : _e( 'Next step', 'wpshop'); ?></button> |
|
27 | + <button class="button button-primary alignright" ><?php (2 == $current_step) ? _e('Create my shop', 'wpshop') : _e('Next step', 'wpshop'); ?></button> |
|
28 | 28 | <span class="spinner" ></span> |
29 | - <!-- <button class="button button-secondary alignright" ><?php _e( 'Ignore this step', 'wpshop'); ?></button> --> |
|
29 | + <!-- <button class="button button-secondary alignright" ><?php _e('Ignore this step', 'wpshop'); ?></button> --> |
|
30 | 30 | </form><!-- #wps_installer_form --> |
31 | 31 | <?php else: ?> |
32 | - <?php _e( 'Main informations have been setted up.', 'wpshop'); ?> |
|
32 | + <?php _e('Main informations have been setted up.', 'wpshop'); ?> |
|
33 | 33 | <?php endif; ?> |
34 | 34 | </div><!-- .wps-installer-step-container --> |
35 | 35 | </div><!-- .wpshop_full_page_tabs --> |
@@ -1,4 +1,6 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <div class="wpshop_full_page_tabs"> |
4 | 6 | <h1><span class="wps-shop-icon" ></span><?php _e( 'Welcome on wpshop', 'wpshop'); ?></h1> |
@@ -28,8 +30,11 @@ discard block |
||
28 | 30 | <span class="spinner" ></span> |
29 | 31 | <!-- <button class="button button-secondary alignright" ><?php _e( 'Ignore this step', 'wpshop'); ?></button> --> |
30 | 32 | </form><!-- #wps_installer_form --> |
31 | - <?php else: ?> |
|
32 | - <?php _e( 'Main informations have been setted up.', 'wpshop'); ?> |
|
33 | + <?php else { |
|
34 | + : ?> |
|
35 | + <?php _e( 'Main informations have been setted up.', 'wpshop'); |
|
36 | +} |
|
37 | +?> |
|
33 | 38 | <?php endif; ?> |
34 | 39 | </div><!-- .wps-installer-step-container --> |
35 | 40 | </div><!-- .wpshop_full_page_tabs --> |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <div class="changelog" > |
4 | 6 |
@@ -1,62 +1,62 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="changelog" > |
4 | 4 | |
5 | 5 | <div class="feature-section changelog three-col"> |
6 | 6 | <div class="col"> |
7 | - <img src="<?php echo WPS_INSTALLER_URL . WPS_INSTALLER_DIR . '/assets/medias/paiement.jpg'; ?>" alt="<?php _e( 'Payment methods', 'wpshop'); ?>" title="<?php _e( 'Payment methods', 'wpshop'); ?>" /> |
|
8 | - <h3><?php _e( 'Payment methods', 'wpshop'); ?></h3> |
|
9 | - <p><?php printf( __( 'When installing WPShop you will have included by default, checks and paypal payment gateway. However there are more %spayment method%s developped for WPShop. If you are interested by a non existant payment method. You can contact us on our %sforum%s', 'wpshop'), '<a href="http://www.wpshop.fr/boutique/extensions/paiement/" target="_wps_about_extra">', '</a>', '<a href="http://forums.eoxia.com/" target="_eoxia_form">', '</a>' ); ?></p> |
|
10 | - <a href="<?php echo admin_url( 'options-general.php?page=wpshop_option#wpshop_payments_option' ); ?>" class="button button-large button-primary"><?php _e( 'Manage payment methods', 'wpshop'); ?></a> |
|
7 | + <img src="<?php echo WPS_INSTALLER_URL . WPS_INSTALLER_DIR . '/assets/medias/paiement.jpg'; ?>" alt="<?php _e('Payment methods', 'wpshop'); ?>" title="<?php _e('Payment methods', 'wpshop'); ?>" /> |
|
8 | + <h3><?php _e('Payment methods', 'wpshop'); ?></h3> |
|
9 | + <p><?php printf(__('When installing WPShop you will have included by default, checks and paypal payment gateway. However there are more %spayment method%s developped for WPShop. If you are interested by a non existant payment method. You can contact us on our %sforum%s', 'wpshop'), '<a href="http://www.wpshop.fr/boutique/extensions/paiement/" target="_wps_about_extra">', '</a>', '<a href="http://forums.eoxia.com/" target="_eoxia_form">', '</a>'); ?></p> |
|
10 | + <a href="<?php echo admin_url('options-general.php?page=wpshop_option#wpshop_payments_option'); ?>" class="button button-large button-primary"><?php _e('Manage payment methods', 'wpshop'); ?></a> |
|
11 | 11 | </div> |
12 | 12 | <div class="col"> |
13 | - <img src="<?php echo WPS_INSTALLER_URL . WPS_INSTALLER_DIR . '/assets/medias/livraison.jpg'; ?>" alt="<?php _e( 'Shipping methods', 'wpshop'); ?>" title="<?php _e( 'Shipping methods', 'wpshop'); ?>" /> |
|
14 | - <h3><?php _e( 'Shipping methods', 'wpshop'); ?></h3> |
|
15 | - <p><?php printf( __( 'By default you have one shipping method available into WPShop. You can create as much as you want using %ssettings interface%s. You will also find on our %swebsite%s additionnals shipping methods. You can contact us on our %sforum%s', 'wpshop'), '<a href="' . admin_url( 'options-general.php?page=wpshop_option#wpshop_shipping_option' ) . '" target="_wps_settings_interface" >', '</a>', '<a href="http://www.wpshop.fr/shop-theme/" target="_wps_about_extra" >', '</a>', '<a href="http://forums.eoxia.com/" target="_eoxia_form">', '</a>' ); ?></p> |
|
16 | - <a href="<?php echo admin_url( 'options-general.php?page=wpshop_option#wpshop_shipping_option' ); ?>" class="button button-large button-primary"><?php _e( 'Manage shipping methods', 'wpshop'); ?></a> |
|
13 | + <img src="<?php echo WPS_INSTALLER_URL . WPS_INSTALLER_DIR . '/assets/medias/livraison.jpg'; ?>" alt="<?php _e('Shipping methods', 'wpshop'); ?>" title="<?php _e('Shipping methods', 'wpshop'); ?>" /> |
|
14 | + <h3><?php _e('Shipping methods', 'wpshop'); ?></h3> |
|
15 | + <p><?php printf(__('By default you have one shipping method available into WPShop. You can create as much as you want using %ssettings interface%s. You will also find on our %swebsite%s additionnals shipping methods. You can contact us on our %sforum%s', 'wpshop'), '<a href="' . admin_url('options-general.php?page=wpshop_option#wpshop_shipping_option') . '" target="_wps_settings_interface" >', '</a>', '<a href="http://www.wpshop.fr/shop-theme/" target="_wps_about_extra" >', '</a>', '<a href="http://forums.eoxia.com/" target="_eoxia_form">', '</a>'); ?></p> |
|
16 | + <a href="<?php echo admin_url('options-general.php?page=wpshop_option#wpshop_shipping_option'); ?>" class="button button-large button-primary"><?php _e('Manage shipping methods', 'wpshop'); ?></a> |
|
17 | 17 | </div> |
18 | 18 | <div class="col last-feature"> |
19 | - <img src="<?php echo WPS_INSTALLER_URL . WPS_INSTALLER_DIR . '/assets/medias/produit.jpg'; ?>" alt="<?php _e( 'Create products', 'wpshop'); ?>" title="<?php _e( 'Create products', 'wpshop'); ?>" /> |
|
20 | - <h3><?php _e( 'Create products', 'wpshop'); ?></h3> |
|
21 | - <p><?php _e( 'With WPshop plugin you can now create your product catalog on WordPress and market them. A catalog and clear product information, easy to create and fully customizable through shortcodes.', 'wpshop'); ?></p> |
|
22 | - <a href="<?php echo admin_url( 'edit.php?post_type=wpshop_product' ); ?>" class="button button-large button-primary wpshop-about-btn-create-products"><?php _e( 'Create products', 'wpshop'); ?></a> |
|
19 | + <img src="<?php echo WPS_INSTALLER_URL . WPS_INSTALLER_DIR . '/assets/medias/produit.jpg'; ?>" alt="<?php _e('Create products', 'wpshop'); ?>" title="<?php _e('Create products', 'wpshop'); ?>" /> |
|
20 | + <h3><?php _e('Create products', 'wpshop'); ?></h3> |
|
21 | + <p><?php _e('With WPshop plugin you can now create your product catalog on WordPress and market them. A catalog and clear product information, easy to create and fully customizable through shortcodes.', 'wpshop'); ?></p> |
|
22 | + <a href="<?php echo admin_url('edit.php?post_type=wpshop_product'); ?>" class="button button-large button-primary wpshop-about-btn-create-products"><?php _e('Create products', 'wpshop'); ?></a> |
|
23 | 23 | </div> |
24 | 24 | </div> |
25 | 25 | |
26 | 26 | <div class="feature-section col three-col"> |
27 | 27 | <div class="col"> |
28 | - <img src="<?php echo WPS_INSTALLER_URL . WPS_INSTALLER_DIR . '/assets/medias/commande.jpg'; ?>" alt="<?php _e( 'Manage orders', 'wpshop'); ?>" title="<?php _e( 'Manage orders', 'wpshop'); ?>" /> |
|
29 | - <h3><?php _e( 'Manage orders', 'wpshop'); ?></h3> |
|
30 | - <p><?php _e( 'You can manage all your orders and stay in touch with your customers. The dashboard controls will allow you to quickly view your most visited pages , static of your orders ...', 'wpshop'); ?></p> |
|
31 | - <a href="<?php echo admin_url( 'edit.php?post_type=' . WPSHOP_NEWTYPE_IDENTIFIER_ORDER ); ?>" class="button button-large button-primary"><?php _e( 'Manage orders', 'wpshop'); ?></a> |
|
28 | + <img src="<?php echo WPS_INSTALLER_URL . WPS_INSTALLER_DIR . '/assets/medias/commande.jpg'; ?>" alt="<?php _e('Manage orders', 'wpshop'); ?>" title="<?php _e('Manage orders', 'wpshop'); ?>" /> |
|
29 | + <h3><?php _e('Manage orders', 'wpshop'); ?></h3> |
|
30 | + <p><?php _e('You can manage all your orders and stay in touch with your customers. The dashboard controls will allow you to quickly view your most visited pages , static of your orders ...', 'wpshop'); ?></p> |
|
31 | + <a href="<?php echo admin_url('edit.php?post_type=' . WPSHOP_NEWTYPE_IDENTIFIER_ORDER); ?>" class="button button-large button-primary"><?php _e('Manage orders', 'wpshop'); ?></a> |
|
32 | 32 | </div> |
33 | 33 | <div class="col"> |
34 | - <img src="<?php echo WPS_INSTALLER_URL . WPS_INSTALLER_DIR . '/assets/medias/reglage-boutique.jpg'; ?>" alt="<?php _e( 'Configure my shop', 'wpshop'); ?>" title="<?php _e( 'Configure my shop', 'wpshop'); ?>" /> |
|
35 | - <h3><?php _e( 'Configure my shop', 'wpshop'); ?></h3> |
|
36 | - <p><?php printf( __( 'We update WPShop in order to improve speed, accessibility and mobile usage. Go on %smain settings interface%s in order to configure your new shop, payment gateways or shipping methods', 'wpshop'), '<a href="' . admin_url( 'options-general.php?page=wpshop_option' ) . '" target="_wps_settings_interface" >', '</a>' ); ?></p> |
|
37 | - <a href="<?php echo admin_url( 'options-general.php?page=wpshop_option' ); ?>" class="button button-large button-primary"><?php _e( 'Configure my shop', 'wpshop'); ?></a> |
|
34 | + <img src="<?php echo WPS_INSTALLER_URL . WPS_INSTALLER_DIR . '/assets/medias/reglage-boutique.jpg'; ?>" alt="<?php _e('Configure my shop', 'wpshop'); ?>" title="<?php _e('Configure my shop', 'wpshop'); ?>" /> |
|
35 | + <h3><?php _e('Configure my shop', 'wpshop'); ?></h3> |
|
36 | + <p><?php printf(__('We update WPShop in order to improve speed, accessibility and mobile usage. Go on %smain settings interface%s in order to configure your new shop, payment gateways or shipping methods', 'wpshop'), '<a href="' . admin_url('options-general.php?page=wpshop_option') . '" target="_wps_settings_interface" >', '</a>'); ?></p> |
|
37 | + <a href="<?php echo admin_url('options-general.php?page=wpshop_option'); ?>" class="button button-large button-primary"><?php _e('Configure my shop', 'wpshop'); ?></a> |
|
38 | 38 | </div> |
39 | 39 | <div class="col last-feature"> |
40 | - <img src="<?php echo WPS_INSTALLER_URL . WPS_INSTALLER_DIR . '/assets/medias/contenu.jpg'; ?>" alt="<?php _e( 'Full content customization', 'wpshop'); ?>" title="<?php _e( 'Full content customization', 'wpshop'); ?>" /> |
|
41 | - <h3><?php _e( 'Full content customization', 'wpshop'); ?></h3> |
|
42 | - <p><?php printf( __( 'You can design all you %stransactionnal emails%s, change the different %spage layout%s (as cart page, checkout page, and so on)', 'wpshop'), '<a href="' . admin_url( 'edit.php?post_type=wpshop_shop_message' ) . '" target="_wps_settings_interface" >', '</a>', '<a href="' . admin_url( 'edit.php?post_type=page' ) . '" target="_wps_settings_interface" >', '</a>' ); ?></p> |
|
40 | + <img src="<?php echo WPS_INSTALLER_URL . WPS_INSTALLER_DIR . '/assets/medias/contenu.jpg'; ?>" alt="<?php _e('Full content customization', 'wpshop'); ?>" title="<?php _e('Full content customization', 'wpshop'); ?>" /> |
|
41 | + <h3><?php _e('Full content customization', 'wpshop'); ?></h3> |
|
42 | + <p><?php printf(__('You can design all you %stransactionnal emails%s, change the different %spage layout%s (as cart page, checkout page, and so on)', 'wpshop'), '<a href="' . admin_url('edit.php?post_type=wpshop_shop_message') . '" target="_wps_settings_interface" >', '</a>', '<a href="' . admin_url('edit.php?post_type=page') . '" target="_wps_settings_interface" >', '</a>'); ?></p> |
|
43 | 43 | </div> |
44 | 44 | </div> |
45 | 45 | |
46 | - <h2 class="about-headline-callout"><?php _e( 'Extend default WPShop functionnalities', 'wpshop'); ?></h2> |
|
46 | + <h2 class="about-headline-callout"><?php _e('Extend default WPShop functionnalities', 'wpshop'); ?></h2> |
|
47 | 47 | <div class="feature-section col two-col"> |
48 | 48 | <div class="col"> |
49 | - <h3><?php _e( 'External addons', 'wpshop'); ?></h3> |
|
50 | - <p><?php printf( __( 'Need a theme? or a payment gateway? or a shipping addons? Anythong else? Check %sour website%s in order to find the addons for WPShop that you need. If you don\'t find it please contact us through the forum with the link below.', 'wpshop'), '<a href="http://www.wpshop.fr/shop-theme/" >', '</a>' ); ?></p> |
|
49 | + <h3><?php _e('External addons', 'wpshop'); ?></h3> |
|
50 | + <p><?php printf(__('Need a theme? or a payment gateway? or a shipping addons? Anythong else? Check %sour website%s in order to find the addons for WPShop that you need. If you don\'t find it please contact us through the forum with the link below.', 'wpshop'), '<a href="http://www.wpshop.fr/shop-theme/" >', '</a>'); ?></p> |
|
51 | 51 | </div> |
52 | 52 | <div class="col last-feature"> |
53 | - <h3><?php _e( 'Custom hooks', 'wpshop'); ?></h3> |
|
54 | - <p><?php printf( __( 'We inserted some custom hook through WPShop code. That will give you some possibilities to add functionnalities when it is already planned.', 'wpshop') ); ?></p> |
|
53 | + <h3><?php _e('Custom hooks', 'wpshop'); ?></h3> |
|
54 | + <p><?php printf(__('We inserted some custom hook through WPShop code. That will give you some possibilities to add functionnalities when it is already planned.', 'wpshop')); ?></p> |
|
55 | 55 | </div> |
56 | 56 | </div> |
57 | 57 | |
58 | 58 | <?php // <h3 class="about-headline-callout"><?php printf( __( 'A question ? A comment ? A need ? Join us on %sWPShop forum%s', 'wpshop'), '<a href="http://forums.eoxia.com/login" taget="_wpshop_forums" >', '</a>' ); </h3> ?> |
59 | 59 | |
60 | 60 | <hr> |
61 | - <div class="return-to-dashboard"><a href="<?php echo admin_url( 'admin.php?page=wpshop_dashboard' ); ?>"><?php _e( 'Go to your shop dashboard', 'wpshop'); ?></a></div> |
|
61 | + <div class="return-to-dashboard"><a href="<?php echo admin_url('admin.php?page=wpshop_dashboard'); ?>"><?php _e('Go to your shop dashboard', 'wpshop'); ?></a></div> |
|
62 | 62 | </div> |
@@ -1,10 +1,10 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="<?php echo $step_class; ?>"> |
4 | - <?php if( $step_finished ) : ?> |
|
5 | - <a href="<?php echo admin_url( 'admin.php?page=wps-installer&wps-installation-step=' . $step_id ); ?>"><i class="wps-circlerounded"><?php echo _e( $step_id, 'wpshop'); ?></i><span><?php echo _e( $step, 'wpshop'); ?></span></a> |
|
4 | + <?php if ($step_finished) : ?> |
|
5 | + <a href="<?php echo admin_url('admin.php?page=wps-installer&wps-installation-step=' . $step_id); ?>"><i class="wps-circlerounded"><?php echo _e($step_id, 'wpshop'); ?></i><span><?php echo _e($step, 'wpshop'); ?></span></a> |
|
6 | 6 | <?php else : ?> |
7 | - <i class="wps-circlerounded"><?php _e( $step_id, 'wpshop'); ?></i><span><?php _e( $step, 'wpshop'); ?></span> |
|
7 | + <i class="wps-circlerounded"><?php _e($step_id, 'wpshop'); ?></i><span><?php _e($step, 'wpshop'); ?></span> |
|
8 | 8 | <?php endif ?> |
9 | 9 | </div> |
10 | 10 |
@@ -1,10 +1,15 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <div class="<?php echo $step_class; ?>"> |
4 | 6 | <?php if( $step_finished ) : ?> |
5 | 7 | <a href="<?php echo admin_url( 'admin.php?page=wps-installer&wps-installation-step=' . $step_id ); ?>"><i class="wps-circlerounded"><?php echo _e( $step_id, 'wpshop'); ?></i><span><?php echo _e( $step, 'wpshop'); ?></span></a> |
6 | - <?php else : ?> |
|
7 | - <i class="wps-circlerounded"><?php _e( $step_id, 'wpshop'); ?></i><span><?php _e( $step, 'wpshop'); ?></span> |
|
8 | + <?php else { |
|
9 | + : ?> |
|
10 | + <i class="wps-circlerounded"><?php _e( $step_id, 'wpshop'); |
|
11 | +} |
|
12 | +?></i><span><?php _e( $step, 'wpshop'); ?></span> |
|
8 | 13 | <?php endif ?> |
9 | 14 | </div> |
10 | 15 |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | * to keep hidden, and a list of columns that are sortable. Each of these |
235 | 235 | * can be defined in another method (as we've done here) before being |
236 | 236 | * used to build the value for our _column_headers property. |
237 | - */ |
|
237 | + */ |
|
238 | 238 | $columns = $this->get_columns(); |
239 | 239 | $hidden = array(); |
240 | 240 | $sortable = $this->get_sortable_columns(); |
@@ -244,13 +244,13 @@ discard block |
||
244 | 244 | * headers. The $this->_column_headers property takes an array which contains |
245 | 245 | * 3 other arrays. One for all columns, one for hidden columns, and one |
246 | 246 | * for sortable columns. |
247 | - */ |
|
247 | + */ |
|
248 | 248 | $this->_column_headers = array($columns, $hidden, $sortable); |
249 | 249 | |
250 | 250 | /** |
251 | 251 | * Optional. You can handle your bulk actions however you see fit. In this |
252 | 252 | * case, we'll handle them within our package just to keep things clean. |
253 | - */ |
|
253 | + */ |
|
254 | 254 | $this->process_bulk_action(); |
255 | 255 | |
256 | 256 | /** |
@@ -261,14 +261,14 @@ discard block |
||
261 | 261 | * our data. In a real-world implementation, you will probably want to |
262 | 262 | * use sort and pagination data to build a custom query instead, as you'll |
263 | 263 | * be able to use your precisely-queried data immediately. |
264 | - */ |
|
264 | + */ |
|
265 | 265 | // $data = ; |
266 | 266 | |
267 | 267 | /** |
268 | 268 | * REQUIRED for pagination. Let's figure out what page the user is currently |
269 | 269 | * looking at. We'll need this later, so you should always include it in |
270 | 270 | * your own package classes. |
271 | - */ |
|
271 | + */ |
|
272 | 272 | $current_page = $this->get_pagenum(); |
273 | 273 | |
274 | 274 | /** |
@@ -276,20 +276,20 @@ discard block |
||
276 | 276 | * In real-world use, this would be the total number of items in your database, |
277 | 277 | * without filtering. We'll need this later, so you should always include it |
278 | 278 | * in your own package classes. |
279 | - */ |
|
279 | + */ |
|
280 | 280 | $total_items = count($data); |
281 | 281 | |
282 | 282 | /** |
283 | 283 | * The WP_List_Table class does not handle pagination for us, so we need |
284 | 284 | * to ensure that the data is trimmed to only the current page. We can use |
285 | 285 | * array_slice() to |
286 | - */ |
|
286 | + */ |
|
287 | 287 | $data = array_slice($data,(($current_page-1)*$per_page),$per_page); |
288 | 288 | |
289 | 289 | /** |
290 | 290 | * REQUIRED. Now we can add our *sorted* data to the items property, where |
291 | 291 | * it can be used by the rest of the class. |
292 | - */ |
|
292 | + */ |
|
293 | 293 | $this->items = $data; |
294 | 294 | |
295 | 295 | /* REQUIRED. We also have to register our pagination options & calculations. */ |
@@ -1,34 +1,34 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | |
3 | 3 | /* Check if file is include. No direct access possible with file url */ |
4 | -if ( !defined( 'WPSHOP_VERSION' ) ) { |
|
5 | - die( __('Access is not allowed by this way', 'wpshop') ); |
|
4 | +if (!defined('WPSHOP_VERSION')) { |
|
5 | + die(__('Access is not allowed by this way', 'wpshop')); |
|
6 | 6 | } |
7 | 7 | |
8 | 8 | |
9 | -if(!class_exists('WP_List_Table')){ |
|
10 | - require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' ); |
|
9 | +if (!class_exists('WP_List_Table')) { |
|
10 | + require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php'); |
|
11 | 11 | } |
12 | 12 | /** |
13 | 13 | * Define the different method to manage groups listing with wordpress methods |
14 | 14 | * @package wpshop |
15 | 15 | * @subpackage librairies |
16 | 16 | */ |
17 | -class wpshop_groups_custom_List_table extends WP_List_Table{ |
|
17 | +class wpshop_groups_custom_List_table extends WP_List_Table { |
|
18 | 18 | |
19 | 19 | /** ************************************************************************ |
20 | 20 | * REQUIRED. Set up a constructor that references the parent constructor. We |
21 | 21 | * use the parent reference to set some default configs. |
22 | 22 | ***************************************************************************/ |
23 | - function __construct(){ |
|
23 | + function __construct() { |
|
24 | 24 | global $status, $page; |
25 | 25 | |
26 | 26 | //Set parent defaults |
27 | - parent::__construct( array( |
|
28 | - 'singular' => __('group\'s', 'wpshop'), //singular name of the listed records |
|
29 | - 'plural' => __('groups\'', 'wpshop'), //plural name of the listed records |
|
27 | + parent::__construct(array( |
|
28 | + 'singular' => __('group\'s', 'wpshop'), //singular name of the listed records |
|
29 | + 'plural' => __('groups\'', 'wpshop'), //plural name of the listed records |
|
30 | 30 | 'ajax' => true //does this table support ajax? |
31 | - ) ); |
|
31 | + )); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | |
@@ -45,9 +45,9 @@ discard block |
||
45 | 45 | * @see WP_List_Table::::single_row_columns() |
46 | 46 | * @return array An associative array containing column information: 'slugs'=>'Visible Titles' |
47 | 47 | **************************************************************************/ |
48 | - function get_columns(){ |
|
48 | + function get_columns() { |
|
49 | 49 | $columns = array( |
50 | - 'cb' => '',//'<input type="checkbox" />', //Render a checkbox instead of text |
|
50 | + 'cb' => '', //'<input type="checkbox" />', //Render a checkbox instead of text |
|
51 | 51 | 'name' => __('Name', 'wpshop'), |
52 | 52 | 'description' => __('Description', 'wpshop') |
53 | 53 | ); |
@@ -75,10 +75,10 @@ discard block |
||
75 | 75 | * @param array $column_name The name/slug of the column to be processed |
76 | 76 | * @return string Text or HTML to be placed inside the column <td> |
77 | 77 | **************************************************************************/ |
78 | - function column_default($item, $column_name){ |
|
79 | - switch($column_name){ |
|
78 | + function column_default($item, $column_name) { |
|
79 | + switch ($column_name) { |
|
80 | 80 | default: |
81 | - return print_r($item,true); //Show the whole array for troubleshooting purposes |
|
81 | + return print_r($item, true); //Show the whole array for troubleshooting purposes |
|
82 | 82 | } |
83 | 83 | } |
84 | 84 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | * @param array $item A singular item (one full row's worth of data) |
99 | 99 | * @return string Text to be placed inside the column <td> (movie title only) |
100 | 100 | **************************************************************************/ |
101 | - function column_description($item){ |
|
101 | + function column_description($item) { |
|
102 | 102 | return $item['description']; |
103 | 103 | } |
104 | 104 | /** ************************************************************************ |
@@ -117,21 +117,21 @@ discard block |
||
117 | 117 | * @param array $item A singular item (one full row's worth of data) |
118 | 118 | * @return string Text to be placed inside the column <td> (movie title only) |
119 | 119 | **************************************************************************/ |
120 | - function column_name($item){ |
|
120 | + function column_name($item) { |
|
121 | 121 | |
122 | - $link_format = admin_url('admin.php').'?page=%s&action=%s&code=%s'; |
|
123 | - $default_action='edit'; |
|
124 | - $default_action_text=__('Edit', 'wpshop'); |
|
122 | + $link_format = admin_url('admin.php') . '?page=%s&action=%s&code=%s'; |
|
123 | + $default_action = 'edit'; |
|
124 | + $default_action_text = __('Edit', 'wpshop'); |
|
125 | 125 | |
126 | 126 | //Build row actions |
127 | 127 | $actions = array( |
128 | - 'edit' => sprintf('<a href="'.$link_format.'">'.$default_action_text.'</a>', WPSHOP_NEWTYPE_IDENTIFIER_GROUP, $default_action, $item['code']) |
|
128 | + 'edit' => sprintf('<a href="' . $link_format . '">' . $default_action_text . '</a>', WPSHOP_NEWTYPE_IDENTIFIER_GROUP, $default_action, $item['code']) |
|
129 | 129 | ); |
130 | - $actions['delete'] = sprintf('<a href="'.$link_format.'">'.__('Delete', 'wpshop').'</a>', WPSHOP_NEWTYPE_IDENTIFIER_GROUP, 'delete', $item['code']); |
|
130 | + $actions['delete'] = sprintf('<a href="' . $link_format . '">' . __('Delete', 'wpshop') . '</a>', WPSHOP_NEWTYPE_IDENTIFIER_GROUP, 'delete', $item['code']); |
|
131 | 131 | |
132 | 132 | //Return the title contents |
133 | 133 | return sprintf('%1$s%2$s', |
134 | - /*$1%s*/ sprintf('<a href="'.$link_format.'">'.__($item['name'], 'wpshop').'</a>', WPSHOP_NEWTYPE_IDENTIFIER_GROUP, $default_action, $item['code']), |
|
134 | + /*$1%s*/ sprintf('<a href="' . $link_format . '">' . __($item['name'], 'wpshop') . '</a>', WPSHOP_NEWTYPE_IDENTIFIER_GROUP, $default_action, $item['code']), |
|
135 | 135 | /*$3%s*/ $this->row_actions($actions) |
136 | 136 | ); |
137 | 137 | } |
@@ -144,11 +144,11 @@ discard block |
||
144 | 144 | * @param array $item A singular item (one full row's worth of data) |
145 | 145 | * @return string Text to be placed inside the column <td> (movie title only) |
146 | 146 | **************************************************************************/ |
147 | - function column_cb($item){ |
|
147 | + function column_cb($item) { |
|
148 | 148 | return ''; |
149 | 149 | return sprintf( |
150 | 150 | '<input type="checkbox" name="%1$s[]" value="%2$s" />', |
151 | - /*$1%s*/ $this->_args['singular'], //Let's simply repurpose the table's singular label ("movie") |
|
151 | + /*$1%s*/ $this->_args['singular'], //Let's simply repurpose the table's singular label ("movie") |
|
152 | 152 | /*$2%s*/ $item['id'] //The value of the checkbox should be the record's id |
153 | 153 | ); |
154 | 154 | } |
@@ -169,8 +169,8 @@ discard block |
||
169 | 169 | **************************************************************************/ |
170 | 170 | function get_sortable_columns() { |
171 | 171 | $sortable_columns = array( |
172 | - 'name' => array('frontend_label',true), //true means its already sorted |
|
173 | - 'status' => array('status',true) |
|
172 | + 'name' => array('frontend_label', true), //true means its already sorted |
|
173 | + 'status' => array('status', true) |
|
174 | 174 | ); |
175 | 175 | return $sortable_columns; |
176 | 176 | } |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | **************************************************************************/ |
206 | 206 | function process_bulk_action() { |
207 | 207 | //Detect when a bulk action is being triggered... |
208 | - if( 'delete'===$this->current_action() ) { |
|
208 | + if ('delete' === $this->current_action()) { |
|
209 | 209 | wp_die('Items deleted (or they would be if we had items to delete)!'); |
210 | 210 | } |
211 | 211 | } |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | * to ensure that the data is trimmed to only the current page. We can use |
285 | 285 | * array_slice() to |
286 | 286 | */ |
287 | - $data = array_slice($data,(($current_page-1)*$per_page),$per_page); |
|
287 | + $data = array_slice($data, (($current_page - 1) * $per_page), $per_page); |
|
288 | 288 | |
289 | 289 | /** |
290 | 290 | * REQUIRED. Now we can add our *sorted* data to the items property, where |
@@ -293,10 +293,10 @@ discard block |
||
293 | 293 | $this->items = $data; |
294 | 294 | |
295 | 295 | /* REQUIRED. We also have to register our pagination options & calculations. */ |
296 | - $this->set_pagination_args( array( |
|
297 | - 'total_items' => $total_items, //WE have to calculate the total number of items |
|
298 | - 'per_page' => $per_page, //WE have to determine how many items to show on a page |
|
299 | - 'total_pages' => ceil($total_items/$per_page) //WE have to calculate the total number of pages |
|
300 | - ) ); |
|
296 | + $this->set_pagination_args(array( |
|
297 | + 'total_items' => $total_items, //WE have to calculate the total number of items |
|
298 | + 'per_page' => $per_page, //WE have to determine how many items to show on a page |
|
299 | + 'total_pages' => ceil($total_items / $per_page) //WE have to calculate the total number of pages |
|
300 | + )); |
|
301 | 301 | } |
302 | 302 | } |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | |
3 | 5 | /* Check if file is include. No direct access possible with file url */ |
4 | 6 | if ( !defined( 'WPSHOP_VERSION' ) ) { |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | * to keep hidden, and a list of columns that are sortable. Each of these |
215 | 215 | * can be defined in another method (as we've done here) before being |
216 | 216 | * used to build the value for our _column_headers property. |
217 | - */ |
|
217 | + */ |
|
218 | 218 | $columns = $this->get_columns(); |
219 | 219 | $hidden = array(); |
220 | 220 | $sortable = $this->get_sortable_columns(); |
@@ -235,14 +235,14 @@ discard block |
||
235 | 235 | * headers. The $this->_column_headers property takes an array which contains |
236 | 236 | * 3 other arrays. One for all columns, one for hidden columns, and one |
237 | 237 | * for sortable columns. |
238 | - */ |
|
238 | + */ |
|
239 | 239 | $this->_column_headers = array($columns, $hidden, $sortable); |
240 | 240 | |
241 | 241 | /** |
242 | 242 | * REQUIRED for pagination. Let's figure out what page the user is currently |
243 | 243 | * looking at. We'll need this later, so you should always include it in |
244 | 244 | * your own package classes. |
245 | - */ |
|
245 | + */ |
|
246 | 246 | $current_page = $this->get_pagenum(); |
247 | 247 | |
248 | 248 | /** |
@@ -250,20 +250,20 @@ discard block |
||
250 | 250 | * In real-world use, this would be the total number of items in your database, |
251 | 251 | * without filtering. We'll need this later, so you should always include it |
252 | 252 | * in your own package classes. |
253 | - */ |
|
253 | + */ |
|
254 | 254 | $total_items = count($data); |
255 | 255 | |
256 | 256 | /** |
257 | 257 | * The WP_List_Table class does not handle pagination for us, so we need |
258 | 258 | * to ensure that the data is trimmed to only the current page. We can use |
259 | 259 | * array_slice() to |
260 | - */ |
|
260 | + */ |
|
261 | 261 | $data = array_slice($data,(($current_page-1)*$per_page),$per_page); |
262 | 262 | |
263 | 263 | /** |
264 | 264 | * REQUIRED. Now we can add our *sorted* data to the items property, where |
265 | 265 | * it can be used by the rest of the class. |
266 | - */ |
|
266 | + */ |
|
267 | 267 | $this->items = $data; |
268 | 268 | |
269 | 269 | /* REQUIRED. We also have to register our pagination options & calculations. */ |
@@ -1,8 +1,8 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | |
3 | 3 | /* Check if file is include. No direct access possible with file url */ |
4 | -if ( !defined( 'WPSHOP_VERSION' ) ) { |
|
5 | - die( __('Access is not allowed by this way', 'wpshop') ); |
|
4 | +if (!defined('WPSHOP_VERSION')) { |
|
5 | + die(__('Access is not allowed by this way', 'wpshop')); |
|
6 | 6 | } |
7 | 7 | |
8 | 8 | |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * @package wpshop |
13 | 13 | * @subpackage librairies |
14 | 14 | */ |
15 | -class wpshop_customer_entities_custom_List_table extends WP_List_Table{ |
|
15 | +class wpshop_customer_entities_custom_List_table extends WP_List_Table { |
|
16 | 16 | |
17 | 17 | var $datas; |
18 | 18 | |
@@ -20,15 +20,15 @@ discard block |
||
20 | 20 | * REQUIRED. Set up a constructor that references the parent constructor. We |
21 | 21 | * use the parent reference to set some default configs. |
22 | 22 | ***************************************************************************/ |
23 | - function __construct(){ |
|
23 | + function __construct() { |
|
24 | 24 | global $status, $page; |
25 | 25 | |
26 | 26 | //Set parent defaults |
27 | - parent::__construct( array( |
|
28 | - 'singular' => __('attribute\'s', 'wpshop'), //singular name of the listed records |
|
29 | - 'plural' => __('attributes\'', 'wpshop'), //plural name of the listed records |
|
27 | + parent::__construct(array( |
|
28 | + 'singular' => __('attribute\'s', 'wpshop'), //singular name of the listed records |
|
29 | + 'plural' => __('attributes\'', 'wpshop'), //plural name of the listed records |
|
30 | 30 | 'ajax' => true //does this table support ajax? |
31 | - ) ); |
|
31 | + )); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * @see WP_List_Table::::single_row_columns() |
47 | 47 | * @return array An associative array containing column information: 'slugs'=>'Visible Titles' |
48 | 48 | **************************************************************************/ |
49 | - function get_columns(){ |
|
49 | + function get_columns() { |
|
50 | 50 | $columns = array( |
51 | 51 | 'date' => __('Date', 'wpshop'), |
52 | 52 | 'order_number' => __('Order number', 'wpshop'), |
@@ -78,10 +78,10 @@ discard block |
||
78 | 78 | * @param array $column_name The name/slug of the column to be processed |
79 | 79 | * @return string Text or HTML to be placed inside the column <td> |
80 | 80 | **************************************************************************/ |
81 | - function column_default($item, $column_name){ |
|
82 | - switch($column_name){ |
|
81 | + function column_default($item, $column_name) { |
|
82 | + switch ($column_name) { |
|
83 | 83 | default: |
84 | - return print_r($item,true); //Show the whole array for troubleshooting purposes |
|
84 | + return print_r($item, true); //Show the whole array for troubleshooting purposes |
|
85 | 85 | } |
86 | 86 | } |
87 | 87 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * @param array $item A singular item (one full row's worth of data) |
102 | 102 | * @return string Text to be placed inside the column <td> (movie title only) |
103 | 103 | **************************************************************************/ |
104 | - function column_date($item){ |
|
104 | + function column_date($item) { |
|
105 | 105 | return $item['date']; |
106 | 106 | } |
107 | 107 | /** ************************************************************************ |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | * @param array $item A singular item (one full row's worth of data) |
121 | 121 | * @return string Text to be placed inside the column <td> (movie title only) |
122 | 122 | **************************************************************************/ |
123 | - function column_status($item){ |
|
123 | + function column_status($item) { |
|
124 | 124 | return __($item['status'], 'wpshop'); |
125 | 125 | } |
126 | 126 | /** ************************************************************************ |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | * @param array $item A singular item (one full row's worth of data) |
140 | 140 | * @return string Text to be placed inside the column <td> (movie title only) |
141 | 141 | **************************************************************************/ |
142 | - function column_order_number($item){ |
|
142 | + function column_order_number($item) { |
|
143 | 143 | return $item['order_number']; |
144 | 144 | } |
145 | 145 | /** ************************************************************************ |
@@ -158,12 +158,12 @@ discard block |
||
158 | 158 | * @param array $item A singular item (one full row's worth of data) |
159 | 159 | * @return string Text to be placed inside the column <td> (movie title only) |
160 | 160 | **************************************************************************/ |
161 | - function column_total($item){ |
|
161 | + function column_total($item) { |
|
162 | 162 | return $item['total']; |
163 | 163 | } |
164 | 164 | |
165 | - function column_action($item){ |
|
166 | - return '<a class="button alignright" href="'.admin_url('post.php?post='. $item['action'].'&action=edit').'">'.__('View', 'wpshop').'</a>'; |
|
165 | + function column_action($item) { |
|
166 | + return '<a class="button alignright" href="' . admin_url('post.php?post=' . $item['action'] . '&action=edit') . '">' . __('View', 'wpshop') . '</a>'; |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | /** ************************************************************************ |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | * to ensure that the data is trimmed to only the current page. We can use |
259 | 259 | * array_slice() to |
260 | 260 | */ |
261 | - $data = array_slice($data,(($current_page-1)*$per_page),$per_page); |
|
261 | + $data = array_slice($data, (($current_page - 1) * $per_page), $per_page); |
|
262 | 262 | |
263 | 263 | /** |
264 | 264 | * REQUIRED. Now we can add our *sorted* data to the items property, where |
@@ -267,10 +267,10 @@ discard block |
||
267 | 267 | $this->items = $data; |
268 | 268 | |
269 | 269 | /* REQUIRED. We also have to register our pagination options & calculations. */ |
270 | - $this->set_pagination_args( array( |
|
271 | - 'total_items' => $total_items, //WE have to calculate the total number of items |
|
272 | - 'per_page' => $per_page, //WE have to determine how many items to show on a page |
|
273 | - 'total_pages' => ceil($total_items/$per_page) //WE have to calculate the total number of pages |
|
274 | - ) ); |
|
270 | + $this->set_pagination_args(array( |
|
271 | + 'total_items' => $total_items, //WE have to calculate the total number of items |
|
272 | + 'per_page' => $per_page, //WE have to determine how many items to show on a page |
|
273 | + 'total_pages' => ceil($total_items / $per_page) //WE have to calculate the total number of pages |
|
274 | + )); |
|
275 | 275 | } |
276 | 276 | } |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | |
3 | 5 | /* Check if file is include. No direct access possible with file url */ |
4 | 6 | if ( !defined( 'WPSHOP_VERSION' ) ) { |
@@ -15,9 +15,9 @@ discard block |
||
15 | 15 | var $datas; |
16 | 16 | |
17 | 17 | /** |
18 | - * Constructor, we override the parent to pass our own arguments |
|
19 | - * We usually focus on three parameters: singular and plural labels, as well as whether the class supports AJAX. |
|
20 | - */ |
|
18 | + * Constructor, we override the parent to pass our own arguments |
|
19 | + * We usually focus on three parameters: singular and plural labels, as well as whether the class supports AJAX. |
|
20 | + */ |
|
21 | 21 | function __construct(){ |
22 | 22 | parent::__construct( array( |
23 | 23 | 'singular'=> 'wp_list_customer', //Singular label |
@@ -27,13 +27,13 @@ discard block |
||
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
30 | - * Define the output for each column if specific column output has not been defined |
|
31 | - * |
|
32 | - * @param object|array $item The item to output column content for |
|
33 | - * @param string $column_name The column that we are trying to output |
|
34 | - * |
|
35 | - * @return mixed The column output if found, or defaut is an complete output of the item |
|
36 | - */ |
|
30 | + * Define the output for each column if specific column output has not been defined |
|
31 | + * |
|
32 | + * @param object|array $item The item to output column content for |
|
33 | + * @param string $column_name The column that we are trying to output |
|
34 | + * |
|
35 | + * @return mixed The column output if found, or defaut is an complete output of the item |
|
36 | + */ |
|
37 | 37 | function column_default($item, $column_name){ |
38 | 38 | switch($column_name){ |
39 | 39 | case 'customer_id':{ |
@@ -52,12 +52,12 @@ discard block |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
55 | - * Define specific outptu for a given column |
|
56 | - * |
|
57 | - * @param object|array $item The item we want to get the specific output for the current column |
|
58 | - * |
|
59 | - * @return string The output build specificly for the given column |
|
60 | - */ |
|
55 | + * Define specific outptu for a given column |
|
56 | + * |
|
57 | + * @param object|array $item The item we want to get the specific output for the current column |
|
58 | + * |
|
59 | + * @return string The output build specificly for the given column |
|
60 | + */ |
|
61 | 61 | function column_cb($item){ |
62 | 62 | return sprintf( |
63 | 63 | '<input type="radio" name="%1$s" value="%2$s" class="wpshop_customer_order_cb_dialog" id="wpshop_customer_order_cb_dialog_%2$s" name="customer_order" />', |
@@ -67,9 +67,9 @@ discard block |
||
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
70 | - * Define the columns that are going to be used in the table |
|
71 | - * @return array $columns, the array of columns to use with the table |
|
72 | - */ |
|
70 | + * Define the columns that are going to be used in the table |
|
71 | + * @return array $columns, the array of columns to use with the table |
|
72 | + */ |
|
73 | 73 | function get_columns() { |
74 | 74 | return $columns= array( |
75 | 75 | 'cb'=>'', |
@@ -80,23 +80,23 @@ discard block |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
83 | - * Define the columns that are going to be used for sorting the table |
|
84 | - * @return array $columns, the array of sortable columns in the table |
|
85 | - */ |
|
83 | + * Define the columns that are going to be used for sorting the table |
|
84 | + * @return array $columns, the array of sortable columns in the table |
|
85 | + */ |
|
86 | 86 | function get_sortable_columns() { |
87 | 87 | $sortable_columns = array(); |
88 | 88 | return $sortable_columns; |
89 | 89 | } |
90 | 90 | |
91 | 91 | /** |
92 | - * Build The table output for future display |
|
93 | - * |
|
94 | - * @param array|object $data, The list of item to display in the table |
|
95 | - * @param int $per_page, The number of items per page in the table |
|
96 | - * @param int $current_page, The current page number allowing to know wich item to display |
|
97 | - * |
|
98 | - * @return void |
|
99 | - */ |
|
92 | + * Build The table output for future display |
|
93 | + * |
|
94 | + * @param array|object $data, The list of item to display in the table |
|
95 | + * @param int $per_page, The number of items per page in the table |
|
96 | + * @param int $current_page, The current page number allowing to know wich item to display |
|
97 | + * |
|
98 | + * @return void |
|
99 | + */ |
|
100 | 100 | function prepare_items($data, $per_page, $current_page){ |
101 | 101 | |
102 | 102 | |
@@ -105,12 +105,12 @@ discard block |
||
105 | 105 | |
106 | 106 | |
107 | 107 | /** |
108 | - * REQUIRED. Now we need to define our column headers. This includes a complete |
|
109 | - * array of columns to be displayed (slugs & titles), a list of columns |
|
110 | - * to keep hidden, and a list of columns that are sortable. Each of these |
|
111 | - * can be defined in another method (as we've done here) before being |
|
112 | - * used to build the value for our _column_headers property. |
|
113 | - */ |
|
108 | + * REQUIRED. Now we need to define our column headers. This includes a complete |
|
109 | + * array of columns to be displayed (slugs & titles), a list of columns |
|
110 | + * to keep hidden, and a list of columns that are sortable. Each of these |
|
111 | + * can be defined in another method (as we've done here) before being |
|
112 | + * used to build the value for our _column_headers property. |
|
113 | + */ |
|
114 | 114 | $columns = $this->get_columns(); |
115 | 115 | $hidden = array(); |
116 | 116 | $sortable = $this->get_sortable_columns(); |
@@ -1,14 +1,14 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | |
3 | 3 | /* Check if file is include. No direct access possible with file url */ |
4 | -if ( !defined( 'WPSHOP_VERSION' ) ) { |
|
5 | - die( __('Access is not allowed by this way', 'wpshop') ); |
|
4 | +if (!defined('WPSHOP_VERSION')) { |
|
5 | + die(__('Access is not allowed by this way', 'wpshop')); |
|
6 | 6 | } |
7 | 7 | |
8 | 8 | |
9 | 9 | //Our class extends the WP_List_Table class, so we need to make sure that it's there |
10 | -if(!class_exists('WP_List_Table')){ |
|
11 | - require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' ); |
|
10 | +if (!class_exists('WP_List_Table')) { |
|
11 | + require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php'); |
|
12 | 12 | } |
13 | 13 | class Customer_List_Table extends WP_List_Table { |
14 | 14 | |
@@ -18,12 +18,12 @@ discard block |
||
18 | 18 | * Constructor, we override the parent to pass our own arguments |
19 | 19 | * We usually focus on three parameters: singular and plural labels, as well as whether the class supports AJAX. |
20 | 20 | */ |
21 | - function __construct(){ |
|
22 | - parent::__construct( array( |
|
21 | + function __construct() { |
|
22 | + parent::__construct(array( |
|
23 | 23 | 'singular'=> 'wp_list_customer', //Singular label |
24 | 24 | 'plural' => 'wp_list_customers', //plural label, also this well be one of the table css class |
25 | 25 | 'ajax' => false |
26 | - ) ); |
|
26 | + )); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | * |
35 | 35 | * @return mixed The column output if found, or defaut is an complete output of the item |
36 | 36 | */ |
37 | - function column_default($item, $column_name){ |
|
38 | - switch($column_name){ |
|
37 | + function column_default($item, $column_name) { |
|
38 | + switch ($column_name) { |
|
39 | 39 | case 'customer_id':{ |
40 | 40 | return '<label for="wpshop_customer_order_cb_dialog_' . $item->ID . '" >' . WPSHOP_IDENTIFIER_CUSTOMER . $item->ID . '</label>'; |
41 | 41 | }break; |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | return $item->user_firstname; |
47 | 47 | }break; |
48 | 48 | default: |
49 | - return print_r($item,true); //Show the whole array for troubleshooting purposes |
|
49 | + return print_r($item, true); //Show the whole array for troubleshooting purposes |
|
50 | 50 | break; |
51 | 51 | } |
52 | 52 | } |
@@ -58,10 +58,10 @@ discard block |
||
58 | 58 | * |
59 | 59 | * @return string The output build specificly for the given column |
60 | 60 | */ |
61 | - function column_cb($item){ |
|
61 | + function column_cb($item) { |
|
62 | 62 | return sprintf( |
63 | 63 | '<input type="radio" name="%1$s" value="%2$s" class="wpshop_customer_order_cb_dialog" id="wpshop_customer_order_cb_dialog_%2$s" name="customer_order" />', |
64 | - /*$1%s*/ $this->_args['singular'], //Let's simply repurpose the table's singular label ("movie") |
|
64 | + /*$1%s*/ $this->_args['singular'], //Let's simply repurpose the table's singular label ("movie") |
|
65 | 65 | /*$2%s*/ $item->ID //The value of the checkbox should be the record's id |
66 | 66 | ); |
67 | 67 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * @return array $columns, the array of columns to use with the table |
72 | 72 | */ |
73 | 73 | function get_columns() { |
74 | - return $columns= array( |
|
74 | + return $columns = array( |
|
75 | 75 | 'cb'=>'', |
76 | 76 | 'customer_id'=>'', |
77 | 77 | 'customer_lastname'=>__('Lastname', 'wpshop'), |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | * |
98 | 98 | * @return void |
99 | 99 | */ |
100 | - function prepare_items($data, $per_page, $current_page){ |
|
100 | + function prepare_items($data, $per_page, $current_page) { |
|
101 | 101 | |
102 | 102 | |
103 | 103 |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | |
3 | 5 | /* Check if file is include. No direct access possible with file url */ |
4 | 6 | if ( !defined( 'WPSHOP_VERSION' ) ) { |