@@ -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><span class="wps-h2"><?php _e( 'Payment mode choice', 'wpshop' ); ?> :</span></div> |
4 | 6 | <?php if( !empty($payment_modes) ) : ?> |
@@ -7,8 +9,10 @@ discard block |
||
7 | 9 | <?php foreach( $payment_modes as $payment_mode_id => $payment_mode ) : ?> |
8 | 10 | <?php if( $default_choice == $payment_mode_id ): |
9 | 11 | $class = 'wps-activ'; $checked = 'checked="checked"'; |
10 | - else : |
|
12 | + else { |
|
13 | + : |
|
11 | 14 | $checked = $class = ''; |
15 | + } |
|
12 | 16 | endif; ?> |
13 | 17 | <li class="<?php echo $class; ?> wps-bloc-loader"> |
14 | 18 | <label> |
@@ -24,6 +28,9 @@ discard block |
||
24 | 28 | </li> |
25 | 29 | <?php endforeach; ?> |
26 | 30 | </ul> |
27 | -<?php else : ?> |
|
28 | - <div class="wps-alert-info"><?php _e( 'No payment mode available', 'wpshop' ); ?> </div> |
|
31 | +<?php else { |
|
32 | + : ?> |
|
33 | + <div class="wps-alert-info"><?php _e( 'No payment mode available', 'wpshop' ); |
|
34 | +} |
|
35 | +?> </div> |
|
29 | 36 | <?php endif; ?> |
@@ -1,29 +1,29 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | -<div><span class="wps-h2"><?php _e( 'Payment mode choice', 'wpshop' ); ?> :</span></div> |
|
4 | -<?php if( !empty($payment_modes) ) : ?> |
|
5 | -<?php $count_payment_mode = count( $payment_modes ); ?> |
|
6 | -<ul class="wps-itemList" id="wps-shipping-method-list-container" data-nonce="<?php echo wp_create_nonce( 'wps_load_shipping_methods' ); ?>"> |
|
7 | - <?php foreach( $payment_modes as $payment_mode_id => $payment_mode ) : ?> |
|
8 | - <?php if( $default_choice == $payment_mode_id ): |
|
3 | +<div><span class="wps-h2"><?php _e('Payment mode choice', 'wpshop'); ?> :</span></div> |
|
4 | +<?php if (!empty($payment_modes)) : ?> |
|
5 | +<?php $count_payment_mode = count($payment_modes); ?> |
|
6 | +<ul class="wps-itemList" id="wps-shipping-method-list-container" data-nonce="<?php echo wp_create_nonce('wps_load_shipping_methods'); ?>"> |
|
7 | + <?php foreach ($payment_modes as $payment_mode_id => $payment_mode) : ?> |
|
8 | + <?php if ($default_choice == $payment_mode_id): |
|
9 | 9 | $class = 'wps-activ'; $checked = 'checked="checked"'; |
10 | 10 | else : |
11 | 11 | $checked = $class = ''; |
12 | 12 | endif; ?> |
13 | 13 | <li class="<?php echo $class; ?> wps-bloc-loader"> |
14 | 14 | <label> |
15 | - <span><input type="radio" name="wps-payment-method" value="<?php echo $payment_mode_id; ?>" id="<?php echo $payment_mode_id ; ?>" <?php echo $checked; ?> /></span> |
|
15 | + <span><input type="radio" name="wps-payment-method" value="<?php echo $payment_mode_id; ?>" id="<?php echo $payment_mode_id; ?>" <?php echo $checked; ?> /></span> |
|
16 | 16 | <span class="wps-shipping-method-logo"> |
17 | - <?php echo ( !empty($payment_mode['logo']) ? ( (strstr($payment_mode['logo'], 'http://') === FALSE ) ? wp_get_attachment_image( $payment_mode['logo'], 'full' ) : '<img src="' .$payment_mode['logo']. '" alt="" />' ) : '' ); ?> |
|
17 | + <?php echo (!empty($payment_mode['logo']) ? ((strstr($payment_mode['logo'], 'http://') === FALSE) ? wp_get_attachment_image($payment_mode['logo'], 'full') : '<img src="' . $payment_mode['logo'] . '" alt="" />') : ''); ?> |
|
18 | 18 | </span> |
19 | - <span class="wps-shipping-method-name"><strong><?php _e( $payment_mode['name'], 'wpshop' ); ?></strong></span> |
|
19 | + <span class="wps-shipping-method-name"><strong><?php _e($payment_mode['name'], 'wpshop'); ?></strong></span> |
|
20 | 20 | </label> |
21 | 21 | <div class="wps-itemList-content"> |
22 | - <?php _e( $payment_mode['description'], 'wpshop' ); ?> |
|
22 | + <?php _e($payment_mode['description'], 'wpshop'); ?> |
|
23 | 23 | </div> |
24 | 24 | </li> |
25 | 25 | <?php endforeach; ?> |
26 | 26 | </ul> |
27 | 27 | <?php else : ?> |
28 | - <div class="wps-alert-info"><?php _e( 'No payment mode available', 'wpshop' ); ?> </div> |
|
28 | + <div class="wps-alert-info"><?php _e('No payment mode available', 'wpshop'); ?> </div> |
|
29 | 29 | <?php endif; ?> |
@@ -1,38 +1,38 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | -<div class="wps-alert-info"><span class="dashicons dashicons-lightbulb"></span> <?php printf( __( 'Boost your WPShop with a Credit card payment solution, <a href="%s" target="_blank">click here to select your payment solution adapted to your Bank</a>', 'wpshop'), 'http://shop.eoxia.com/boutique/shop/modules-wpshop/modules-de-paiement/'); ?></div> |
|
4 | -<?php if( !empty($payment_option) && !empty($payment_option['mode']) ) : ?> |
|
5 | -<div class="wps-alert-error" id="wps_payment_config_save_message" style="display : none"><span class="dashicons dashicons-info"></span> <?php _e( 'Process saving, please wait...', 'wpshop'); ?></div> |
|
3 | +<div class="wps-alert-info"><span class="dashicons dashicons-lightbulb"></span> <?php printf(__('Boost your WPShop with a Credit card payment solution, <a href="%s" target="_blank">click here to select your payment solution adapted to your Bank</a>', 'wpshop'), 'http://shop.eoxia.com/boutique/shop/modules-wpshop/modules-de-paiement/'); ?></div> |
|
4 | +<?php if (!empty($payment_option) && !empty($payment_option['mode'])) : ?> |
|
5 | +<div class="wps-alert-error" id="wps_payment_config_save_message" style="display : none"><span class="dashicons dashicons-info"></span> <?php _e('Process saving, please wait...', 'wpshop'); ?></div> |
|
6 | 6 | <div class="wps-table" id="wps_payment_mode_list_container"> |
7 | 7 | <div class="wps-table-header wps-table-row" > |
8 | 8 | <div class="wps-table-cell"></div> |
9 | - <div class="wps-table-cell"><?php _e( 'Logo', 'wpshop'); ?></div> |
|
10 | - <div class="wps-table-cell"><?php _e( 'Payment mode Name', 'wpshop'); ?></div> |
|
11 | - <div class="wps-table-cell"><?php _e( 'Configure', 'wpshop'); ?></div> |
|
12 | - <div class="wps-table-cell"><?php _e( 'Activate', 'wpshop'); ?></div> |
|
13 | - <div class="wps-table-cell"><?php _e( 'Default payment mode', 'wpshop'); ?></div> |
|
9 | + <div class="wps-table-cell"><?php _e('Logo', 'wpshop'); ?></div> |
|
10 | + <div class="wps-table-cell"><?php _e('Payment mode Name', 'wpshop'); ?></div> |
|
11 | + <div class="wps-table-cell"><?php _e('Configure', 'wpshop'); ?></div> |
|
12 | + <div class="wps-table-cell"><?php _e('Activate', 'wpshop'); ?></div> |
|
13 | + <div class="wps-table-cell"><?php _e('Default payment mode', 'wpshop'); ?></div> |
|
14 | 14 | </div> |
15 | - <?php foreach( $payment_option['mode'] as $k => $payment_mode ) : |
|
16 | - if( $k != 'default_shipping_mode' ) : |
|
15 | + <?php foreach ($payment_option['mode'] as $k => $payment_mode) : |
|
16 | + if ($k != 'default_shipping_mode') : |
|
17 | 17 | ?> |
18 | 18 | |
19 | 19 | <div class="wps-table-content wps-table-row wps_payment_mode_container"> |
20 | 20 | <div class="wps-table-cell wps-cart-item-img" id="wps_payment_mode_logo_container_<?php echo $k; ?>"> |
21 | - <?php echo ( !empty($payment_mode['logo']) ? ( (strstr($payment_mode['logo'], 'http://') === FALSE ) ? wp_get_attachment_image( $payment_mode['logo'], 'thumbnail') : '<img src="' .$payment_mode['logo']. '" alt="" />' ) : '' ); ?> |
|
21 | + <?php echo (!empty($payment_mode['logo']) ? ((strstr($payment_mode['logo'], 'http://') === FALSE) ? wp_get_attachment_image($payment_mode['logo'], 'thumbnail') : '<img src="' . $payment_mode['logo'] . '" alt="" />') : ''); ?> |
|
22 | 22 | </div> |
23 | 23 | <div class="wps-table-cell"> |
24 | - <a class="wps-bton-first-mini-rounded add_logo_to_payment_mode" id="add_logo_to_payment_mode_<?php echo $k; ?>" href="#" style="display : inline-block"><?php _e( 'Add a logo', 'wpshop'); ?></a> |
|
25 | - <input type="hidden" name="wps_payment_mode[mode][<?php echo $k; ?>][logo]" id="wps_payment_mode_logo_<?php echo $k; ?>" value="<?php echo ( !empty($payment_mode['logo']) ) ? $payment_mode['logo'] : ''; ?>" /> |
|
24 | + <a class="wps-bton-first-mini-rounded add_logo_to_payment_mode" id="add_logo_to_payment_mode_<?php echo $k; ?>" href="#" style="display : inline-block"><?php _e('Add a logo', 'wpshop'); ?></a> |
|
25 | + <input type="hidden" name="wps_payment_mode[mode][<?php echo $k; ?>][logo]" id="wps_payment_mode_logo_<?php echo $k; ?>" value="<?php echo (!empty($payment_mode['logo'])) ? $payment_mode['logo'] : ''; ?>" /> |
|
26 | 26 | </div> |
27 | 27 | <div class="wps-table-cell"> |
28 | - <input type="text" name="wps_payment_mode[mode][<?php echo $k; ?>][name]" value="<?php echo ( !empty($payment_mode['name']) ) ? $payment_mode['name'] : ''; ?>" /> |
|
28 | + <input type="text" name="wps_payment_mode[mode][<?php echo $k; ?>][name]" value="<?php echo (!empty($payment_mode['name'])) ? $payment_mode['name'] : ''; ?>" /> |
|
29 | 29 | </div> |
30 | - <div class="wps-table-cell"><a href="#TB_inline?width=780&height=700&inlineId=<?php echo $k; ?>_configuration_interface" class="thickbox wps-bton-first-mini-rounded" title="<?php _e('Configure the payment mode', 'wpshop'); ?>" ><?php _e( 'Configure', 'wpshop'); ?></a></div> |
|
30 | + <div class="wps-table-cell"><a href="#TB_inline?width=780&height=700&inlineId=<?php echo $k; ?>_configuration_interface" class="thickbox wps-bton-first-mini-rounded" title="<?php _e('Configure the payment mode', 'wpshop'); ?>" ><?php _e('Configure', 'wpshop'); ?></a></div> |
|
31 | 31 | <div class="wps-table-cell"> |
32 | - <input type="checkbox" id="wps_payment_active_<?php echo $k; ?>" class="wps_payment_active" name="wps_payment_mode[mode][<?php echo $k; ?>][active]" <?php echo ( (!empty($payment_mode) && !empty($payment_mode['active']) ) ? 'checked="checked"' : '' ); ?> /> |
|
32 | + <input type="checkbox" id="wps_payment_active_<?php echo $k; ?>" class="wps_payment_active" name="wps_payment_mode[mode][<?php echo $k; ?>][active]" <?php echo ((!empty($payment_mode) && !empty($payment_mode['active'])) ? 'checked="checked"' : ''); ?> /> |
|
33 | 33 | </div> |
34 | 34 | <div class="wps-table-cell"> |
35 | - <input type="radio" id="wps_payment_active_<?php echo $k; ?>_radio_default" name="wps_payment_mode[default_choice]" value="<?php echo $k; ?>" <?php echo ( !empty( $payment_option['default_choice'] ) && $payment_option['default_choice'] == $k ) ? 'checked="checked"' : ''; echo ( (!empty($payment_mode) && !empty($payment_mode['active']) ) ? '' : 'disabled="disabled"' ); ?> /> |
|
35 | + <input type="radio" id="wps_payment_active_<?php echo $k; ?>_radio_default" name="wps_payment_mode[default_choice]" value="<?php echo $k; ?>" <?php echo (!empty($payment_option['default_choice']) && $payment_option['default_choice'] == $k) ? 'checked="checked"' : ''; echo ((!empty($payment_mode) && !empty($payment_mode['active'])) ? '' : 'disabled="disabled"'); ?> /> |
|
36 | 36 | </div> |
37 | 37 | |
38 | 38 | |
@@ -41,12 +41,12 @@ discard block |
||
41 | 41 | <div class="wps-form-group"> |
42 | 42 | <label><?php _e('Displayed description on front', 'wpshop'); ?></label> |
43 | 43 | <div class="wps-form"> |
44 | - <textarea name="wps_payment_mode[mode][<?php echo $k; ?>][description]" style="width : 100%; height: 120px;"><?php echo ( !empty($payment_mode['description']) ) ? trim($payment_mode['description']) : ''; ?></textarea> |
|
44 | + <textarea name="wps_payment_mode[mode][<?php echo $k; ?>][description]" style="width : 100%; height: 120px;"><?php echo (!empty($payment_mode['description'])) ? trim($payment_mode['description']) : ''; ?></textarea> |
|
45 | 45 | </div> |
46 | 46 | </div> |
47 | 47 | </div> |
48 | - <?php echo apply_filters('wps_payment_mode_interface_'.$k, ''); ?> |
|
49 | - <div><center><a href="#" role="button" class="wps-bton-first-rounded wps_save_payment_mode_configuration"><?php _e( 'Save', 'wpshop'); ?></a></center><br/></div> |
|
48 | + <?php echo apply_filters('wps_payment_mode_interface_' . $k, ''); ?> |
|
49 | + <div><center><a href="#" role="button" class="wps-bton-first-rounded wps_save_payment_mode_configuration"><?php _e('Save', 'wpshop'); ?></a></center><br/></div> |
|
50 | 50 | </div> |
51 | 51 | |
52 | 52 | </div> |
@@ -56,5 +56,5 @@ discard block |
||
56 | 56 | </div> |
57 | 57 | |
58 | 58 | <?php else : ?> |
59 | - <div class="wps-alert-info"><?php _e( 'No payment mode available', 'wpshop'); ?></div> |
|
59 | + <div class="wps-alert-info"><?php _e('No payment mode available', 'wpshop'); ?></div> |
|
60 | 60 | <?php endif; ?> |
@@ -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="wps-alert-info"><span class="dashicons dashicons-lightbulb"></span> <?php printf( __( 'Boost your WPShop with a Credit card payment solution, <a href="%s" target="_blank">click here to select your payment solution adapted to your Bank</a>', 'wpshop'), 'http://shop.eoxia.com/boutique/shop/modules-wpshop/modules-de-paiement/'); ?></div> |
4 | 6 | <?php if( !empty($payment_option) && !empty($payment_option['mode']) ) : ?> |
@@ -55,6 +57,9 @@ discard block |
||
55 | 57 | endforeach; ?> |
56 | 58 | </div> |
57 | 59 | |
58 | -<?php else : ?> |
|
59 | - <div class="wps-alert-info"><?php _e( 'No payment mode available', 'wpshop'); ?></div> |
|
60 | +<?php else { |
|
61 | + : ?> |
|
62 | + <div class="wps-alert-info"><?php _e( 'No payment mode available', 'wpshop'); |
|
63 | +} |
|
64 | +?></div> |
|
60 | 65 | <?php endif; ?> |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | /** |
3 | 3 | * Bootstrap file for plugin. Do main includes and create new instance for plugin components |
4 | 4 | * |
@@ -6,18 +6,18 @@ discard block |
||
6 | 6 | * @version 1.0 |
7 | 7 | */ |
8 | 8 | /** Define */ |
9 | -DEFINE( 'WPS_GUIDED_VERSION', '1.0.0' ); |
|
10 | -DEFINE( 'WPS_GUIDED_DIR', basename(dirname(__FILE__))); |
|
11 | -DEFINE( 'WPS_GUIDED_PATH', dirname( __FILE__ ) ); |
|
12 | -DEFINE( 'WPS_GUIDED_URL', str_replace( str_replace( "\\", "/", ABSPATH), site_url() . '/', str_replace( "\\", "/", WPS_GUIDED_PATH ) ) ); |
|
9 | +DEFINE('WPS_GUIDED_VERSION', '1.0.0'); |
|
10 | +DEFINE('WPS_GUIDED_DIR', basename(dirname(__FILE__))); |
|
11 | +DEFINE('WPS_GUIDED_PATH', dirname(__FILE__)); |
|
12 | +DEFINE('WPS_GUIDED_URL', str_replace(str_replace("\\", "/", ABSPATH), site_url() . '/', str_replace("\\", "/", WPS_GUIDED_PATH))); |
|
13 | 13 | /** Define the templates directories */ |
14 | -DEFINE( 'WPS_GUIDED_TEMPLATES_MAIN_DIR', WPS_GUIDED_PATH . '/templates/'); |
|
14 | +DEFINE('WPS_GUIDED_TEMPLATES_MAIN_DIR', WPS_GUIDED_PATH . '/templates/'); |
|
15 | 15 | /** Translate */ |
16 | -load_plugin_textdomain( 'wps_guided_tour', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); |
|
16 | +load_plugin_textdomain('wps_guided_tour', false, dirname(plugin_basename(__FILE__)) . '/languages/'); |
|
17 | 17 | /** Require */ |
18 | -require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); |
|
19 | -require_once( WPS_GUIDED_PATH . '/controller/wpsBubble_ctr.php' ); |
|
20 | -require_once( WPS_GUIDED_PATH . '/controller/wpsBubbleTemplate_ctr.php' ); |
|
18 | +require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); |
|
19 | +require_once(WPS_GUIDED_PATH . '/controller/wpsBubble_ctr.php'); |
|
20 | +require_once(WPS_GUIDED_PATH . '/controller/wpsBubbleTemplate_ctr.php'); |
|
21 | 21 | |
22 | 22 | new wpsBubble_ctr(); |
23 | 23 | ?> |
@@ -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 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | /** |
3 | 3 | * wpsBubbleTemplate file definition for project plugin |
4 | 4 | * |
@@ -27,42 +27,42 @@ discard block |
||
27 | 27 | * |
28 | 28 | * @return string The template file path to use |
29 | 29 | */ |
30 | - static function get_template_part( $plugin_dir_name, $main_template_dir, $side, $slug, $name=null, $debug = null ) { |
|
30 | + static function get_template_part($plugin_dir_name, $main_template_dir, $side, $slug, $name = null, $debug = null) { |
|
31 | 31 | $path = ''; |
32 | 32 | |
33 | 33 | $templates = array(); |
34 | 34 | $name = (string)$name; |
35 | - if ( '' !== $name ) |
|
35 | + if ('' !== $name) |
|
36 | 36 | $templates[] = "{$side}/{$slug}-{$name}.php"; |
37 | 37 | $templates[] = "{$side}/{$slug}.php"; |
38 | 38 | |
39 | 39 | /** Check if required template exists into current theme */ |
40 | 40 | $check_theme_template = array(); |
41 | - foreach ( $templates as $template ) { |
|
41 | + foreach ($templates as $template) { |
|
42 | 42 | $check_theme_template = $plugin_dir_name . "/" . $template; |
43 | - $path = locate_template( $check_theme_template, false ); |
|
44 | - if ( !empty( $path ) ) { |
|
43 | + $path = locate_template($check_theme_template, false); |
|
44 | + if (!empty($path)) { |
|
45 | 45 | break; |
46 | 46 | } |
47 | 47 | } |
48 | 48 | |
49 | 49 | /** Allow debugging */ |
50 | - if ( !empty( $debug ) ) { |
|
50 | + if (!empty($debug)) { |
|
51 | 51 | echo '--- Debug mode ON - Start ---<br/>'; |
52 | 52 | echo __FILE__ . '<br/>'; |
53 | 53 | echo 'Debug for display method<br/>'; |
54 | 54 | } |
55 | 55 | |
56 | - if ( empty( $path ) ) { |
|
57 | - foreach ( (array) $templates as $template_name ) { |
|
58 | - if ( !$template_name ) |
|
56 | + if (empty($path)) { |
|
57 | + foreach ((array)$templates as $template_name) { |
|
58 | + if (!$template_name) |
|
59 | 59 | continue; |
60 | 60 | |
61 | - if ( !empty( $debug ) ) { |
|
61 | + if (!empty($debug)) { |
|
62 | 62 | echo __LINE__ . ' - ' . $main_template_dir . $template_name . '<hr/>'; |
63 | 63 | } |
64 | 64 | |
65 | - if ( file_exists( $main_template_dir . $template_name ) ) { |
|
65 | + if (file_exists($main_template_dir . $template_name)) { |
|
66 | 66 | $path = $main_template_dir . $template_name; |
67 | 67 | break; |
68 | 68 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | /** Allow debugging */ |
76 | - if ( !empty( $debug ) ) { |
|
76 | + if (!empty($debug)) { |
|
77 | 77 | echo '--- Debug mode ON - END ---<br/><br/>'; |
78 | 78 | } |
79 | 79 |
@@ -1,4 +1,6 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * wpsBubbleTemplate file definition for project plugin |
4 | 6 | * |
@@ -32,8 +34,9 @@ discard block |
||
32 | 34 | |
33 | 35 | $templates = array(); |
34 | 36 | $name = (string)$name; |
35 | - if ( '' !== $name ) |
|
36 | - $templates[] = "{$side}/{$slug}-{$name}.php"; |
|
37 | + if ( '' !== $name ) { |
|
38 | + $templates[] = "{$side}/{$slug}-{$name}.php"; |
|
39 | + } |
|
37 | 40 | $templates[] = "{$side}/{$slug}.php"; |
38 | 41 | |
39 | 42 | /** Check if required template exists into current theme */ |
@@ -55,8 +58,9 @@ discard block |
||
55 | 58 | |
56 | 59 | if ( empty( $path ) ) { |
57 | 60 | foreach ( (array) $templates as $template_name ) { |
58 | - if ( !$template_name ) |
|
59 | - continue; |
|
61 | + if ( !$template_name ) { |
|
62 | + continue; |
|
63 | + } |
|
60 | 64 | |
61 | 65 | if ( !empty( $debug ) ) { |
62 | 66 | echo __LINE__ . ' - ' . $main_template_dir . $template_name . '<hr/>'; |
@@ -67,8 +71,7 @@ discard block |
||
67 | 71 | break; |
68 | 72 | } |
69 | 73 | } |
70 | - } |
|
71 | - else { |
|
74 | + } else { |
|
72 | 75 | echo ''; |
73 | 76 | } |
74 | 77 |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <label for="use_next_button"><span><?php _e("Use next button", self::$name_i18n); ?></span> |
4 | 4 | <input type="checkbox" name="meta[actions][use_next_button]" id="use_next_button" <?php echo (!empty($meta['actions']['use_next_button'])) ? 'checked="checked"' : ''; ?> > |
@@ -6,8 +6,8 @@ discard block |
||
6 | 6 | |
7 | 7 | <label for="type_next"><span><?php _e("Type next", self::$name_i18n); ?></span> |
8 | 8 | <select class="wpeo-bubble-select-type-next" name="meta[actions][type_next]"> |
9 | - <?php if(!empty($array_type_next)): ?> |
|
10 | - <?php foreach($array_type_next as $type_next): ?> |
|
9 | + <?php if (!empty($array_type_next)): ?> |
|
10 | + <?php foreach ($array_type_next as $type_next): ?> |
|
11 | 11 | <option <?php selected($type_next, !empty($meta['actions']['type_next']) ? $meta['actions']['type_next'] : '', true); ?> value="<?php echo $type_next; ?>"><?php echo $type_next; ?></option> |
12 | 12 | <?php endforeach; ?> |
13 | 13 | <?php endif; ?> |
@@ -19,9 +19,9 @@ discard block |
||
19 | 19 | <input <?php echo (!empty($meta) && !empty($meta['actions']) && !empty($meta['actions']['type_next']) && 'link' != $meta['actions']['type_next']) ? 'style="display: none;" disabled' : ''; ?> type="text" id="next" class="wpeo-next wpeo-bubble-next-link" name="meta[actions][next]" value="<?php echo !empty($meta['actions']['next']) ? $meta['actions']['next'] : ""; ?>" /> |
20 | 20 | |
21 | 21 | <!-- For Bubble --> |
22 | - <?php if(!empty($array_bubbles)): ?> |
|
22 | + <?php if (!empty($array_bubbles)): ?> |
|
23 | 23 | <select <?php echo ((!empty($meta) && !empty($meta['actions']) && !empty($meta['actions']['type_next']) && 'bubble' != $meta['actions']['type_next'])) || empty($meta['actions']) ? 'style="display: none;" disabled' : ''; ?> class="wpeo-next wpeo-bubble-next-bubble" id="next" name="meta[actions][next]"> |
24 | - <?php foreach($array_bubbles as $bubble): ?> |
|
24 | + <?php foreach ($array_bubbles as $bubble): ?> |
|
25 | 25 | <option <?php selected($bubble->post_name, !empty($meta['actions']['next']) ? $meta['actions']['next'] : '', true); ?> value="<?php echo $bubble->post_name; ?>"><?php echo $bubble->post_title . ' (' . $bubble->post_name . ')'; ?></option> |
26 | 26 | <?php endforeach; ?> |
27 | 27 | </select> |
@@ -1,4 +1,6 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <label for="use_next_button"><span><?php _e("Use next button", self::$name_i18n); ?></span> |
4 | 6 | <input type="checkbox" name="meta[actions][use_next_button]" id="use_next_button" <?php echo (!empty($meta['actions']['use_next_button'])) ? 'checked="checked"' : ''; ?> > |
@@ -25,7 +27,10 @@ discard block |
||
25 | 27 | <option <?php selected($bubble->post_name, !empty($meta['actions']['next']) ? $meta['actions']['next'] : '', true); ?> value="<?php echo $bubble->post_name; ?>"><?php echo $bubble->post_title . ' (' . $bubble->post_name . ')'; ?></option> |
26 | 28 | <?php endforeach; ?> |
27 | 29 | </select> |
28 | - <?php else: ?> |
|
29 | - <p><?php _e("No bubble found", self::$name_i18n); ?></p> |
|
30 | + <?php else { |
|
31 | + : ?> |
|
32 | + <p><?php _e("No bubble found", self::$name_i18n); |
|
33 | +} |
|
34 | +?></p> |
|
30 | 35 | <?php endif; ?> |
31 | 36 | </label> |
@@ -1,16 +1,16 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <label for="page"><span><?php _e("Page", self::$name_i18n); ?></span> |
4 | 4 | <select class="wpeo-bubble-select-page" name="meta[position][page]"> |
5 | - <?php if(!empty($array_pages)): ?> |
|
6 | - <?php foreach($array_pages as $key => $page): ?> |
|
5 | + <?php if (!empty($array_pages)): ?> |
|
6 | + <?php foreach ($array_pages as $key => $page): ?> |
|
7 | 7 | <option <?php selected($key, !empty($meta['position']['page']) ? $meta['position']['page'] : 'menu-dashboard', true); ?> value="<?php echo $key; ?>"><?php echo str_replace('0', '', $page . ' (' . $key . ')'); ?></option> |
8 | 8 | <?php endforeach; ?> |
9 | 9 | <?php endif; ?> |
10 | 10 | </select> |
11 | 11 | </label> |
12 | 12 | |
13 | -<label for="filter"><span><?php _e("Filter" ,self::$name_i18n); ?></span> |
|
13 | +<label for="filter"><span><?php _e("Filter", self::$name_i18n); ?></span> |
|
14 | 14 | <input type="text" id="filter" name="meta[position][filter]" value="<?php echo !empty($meta['position']['filter']) ? $meta['position']['filter'] : ""; ?>" /> |
15 | 15 | </label> |
16 | 16 |
@@ -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 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <input type="hidden" class="wpeo-bubble-url-key" value="<?php echo !empty($meta['urls']) ? count($meta['urls']) : 1; ?>" /> |
4 | 4 | <ul class="wpeo-bubble-urls"> |
5 | - <?php if(!empty($meta['urls'])): ?> |
|
6 | - <?php foreach($meta['urls'] as $key => $url): ?> |
|
7 | - <?php require( wpsBubbleTemplate_ctr::get_template_part( WPS_GUIDED_DIR, WPS_GUIDED_TEMPLATES_MAIN_DIR, 'backend', 'metabox-url', 'input')); ?> |
|
5 | + <?php if (!empty($meta['urls'])): ?> |
|
6 | + <?php foreach ($meta['urls'] as $key => $url): ?> |
|
7 | + <?php require(wpsBubbleTemplate_ctr::get_template_part(WPS_GUIDED_DIR, WPS_GUIDED_TEMPLATES_MAIN_DIR, 'backend', 'metabox-url', 'input')); ?> |
|
8 | 8 | <?php endforeach; ?> |
9 | 9 | <?php else: ?> |
10 | 10 | <?php $key = 0; $url = array('paramater' => '', 'value' => ''); ?> |
11 | - <?php require( wpsBubbleTemplate_ctr::get_template_part( WPS_GUIDED_DIR, WPS_GUIDED_TEMPLATES_MAIN_DIR, 'backend', 'metabox-url', 'input')); ?> |
|
11 | + <?php require(wpsBubbleTemplate_ctr::get_template_part(WPS_GUIDED_DIR, WPS_GUIDED_TEMPLATES_MAIN_DIR, 'backend', 'metabox-url', 'input')); ?> |
|
12 | 12 | <?php endif; ?> |
13 | 13 | </ul> |
14 | 14 | <span class="dashicons dashicons-plus-alt wpeo-bubble-add-url"></span> |
@@ -1,4 +1,6 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <input type="hidden" class="wpeo-bubble-url-key" value="<?php echo !empty($meta['urls']) ? count($meta['urls']) : 1; ?>" /> |
4 | 6 | <ul class="wpeo-bubble-urls"> |
@@ -6,8 +8,11 @@ discard block |
||
6 | 8 | <?php foreach($meta['urls'] as $key => $url): ?> |
7 | 9 | <?php require( wpsBubbleTemplate_ctr::get_template_part( WPS_GUIDED_DIR, WPS_GUIDED_TEMPLATES_MAIN_DIR, 'backend', 'metabox-url', 'input')); ?> |
8 | 10 | <?php endforeach; ?> |
9 | - <?php else: ?> |
|
10 | - <?php $key = 0; $url = array('paramater' => '', 'value' => ''); ?> |
|
11 | + <?php else { |
|
12 | + : ?> |
|
13 | + <?php $key = 0; |
|
14 | +} |
|
15 | +$url = array('paramater' => '', 'value' => ''); ?> |
|
11 | 16 | <?php require( wpsBubbleTemplate_ctr::get_template_part( WPS_GUIDED_DIR, WPS_GUIDED_TEMPLATES_MAIN_DIR, 'backend', 'metabox-url', 'input')); ?> |
12 | 17 | <?php endif; ?> |
13 | 18 | </ul> |
@@ -1,4 +1,4 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | /** Create a new product */ |
3 | 3 | __('Create a new product', $this->name_i18n); |
4 | 4 | __('As a Wordpress page or article, you must: |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** Create a new product */ |
3 | 5 | __('Create a new product', $this->name_i18n); |
4 | 6 | __('As a Wordpress page or article, you must: |
@@ -1,5 +1,5 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
2 | - if ( $document_number >= 1 ) : ?> |
|
3 | - <h2><?php _e( 'Associated document', 'wpshop' ); ?></h2> |
|
4 | - <?php echo self::display_attachment_gallery( 'document', $product_document_galery_content ); ?> |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | + if ($document_number >= 1) : ?> |
|
3 | + <h2><?php _e('Associated document', 'wpshop'); ?></h2> |
|
4 | + <?php echo self::display_attachment_gallery('document', $product_document_galery_content); ?> |
|
5 | 5 | <?php endif; ?> |
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 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |