@@ -8,34 +8,34 @@ |
||
8 | 8 | */ |
9 | 9 | |
10 | 10 | if ( ! defined( 'ABSPATH' ) ) { |
11 | - exit; |
|
11 | + exit; |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | define( 'LSX_VERSION', '2.9.4' ); |
15 | 15 | |
16 | 16 | if ( in_array( 'wordpress-seo/wp-seo.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) || in_array( 'wordpress-seo-premium/wp-seo-premium.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { |
17 | - require get_template_directory() . '/includes/yoast/class-lsx-yoast.php'; |
|
17 | + require get_template_directory() . '/includes/yoast/class-lsx-yoast.php'; |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | if ( class_exists( 'WooCommerce' ) ) { |
21 | - require get_template_directory() . '/includes/woocommerce/woocommerce.php'; |
|
22 | - require get_template_directory() . '/includes/woocommerce/addons.php'; |
|
21 | + require get_template_directory() . '/includes/woocommerce/woocommerce.php'; |
|
22 | + require get_template_directory() . '/includes/woocommerce/addons.php'; |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | if ( class_exists( 'Tribe__Events__Main' ) ) { |
26 | - require get_template_directory() . '/includes/the-events-calendar/the-events-calendar.php'; |
|
26 | + require get_template_directory() . '/includes/the-events-calendar/the-events-calendar.php'; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | if ( class_exists( 'Sensei_Main' ) || class_exists( 'Sensei_WC' ) ) { |
30 | - require get_template_directory() . '/includes/sensei/class-lsx-sensei.php'; |
|
30 | + require get_template_directory() . '/includes/sensei/class-lsx-sensei.php'; |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | if ( class_exists( 'Popup_Maker' ) ) { |
34 | - require get_template_directory() . '/includes/popup-maker/class-lsx-popup-maker.php'; |
|
34 | + require get_template_directory() . '/includes/popup-maker/class-lsx-popup-maker.php'; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | if ( class_exists( 'bbPress' ) ) { |
38 | - require get_template_directory() . '/includes/bbpress/bbpress.php'; |
|
38 | + require get_template_directory() . '/includes/bbpress/bbpress.php'; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | require get_template_directory() . '/includes/config.php'; |
@@ -7,34 +7,34 @@ |
||
7 | 7 | * @package lsx |
8 | 8 | */ |
9 | 9 | |
10 | -if ( ! defined( 'ABSPATH' ) ) { |
|
10 | +if ( ! defined('ABSPATH')) { |
|
11 | 11 | exit; |
12 | 12 | } |
13 | 13 | |
14 | -define( 'LSX_VERSION', '2.9.4' ); |
|
14 | +define('LSX_VERSION', '2.9.4'); |
|
15 | 15 | |
16 | -if ( in_array( 'wordpress-seo/wp-seo.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) || in_array( 'wordpress-seo-premium/wp-seo-premium.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { |
|
16 | +if (in_array('wordpress-seo/wp-seo.php', apply_filters('active_plugins', get_option('active_plugins'))) || in_array('wordpress-seo-premium/wp-seo-premium.php', apply_filters('active_plugins', get_option('active_plugins')))) { |
|
17 | 17 | require get_template_directory() . '/includes/yoast/class-lsx-yoast.php'; |
18 | 18 | } |
19 | 19 | |
20 | -if ( class_exists( 'WooCommerce' ) ) { |
|
20 | +if (class_exists('WooCommerce')) { |
|
21 | 21 | require get_template_directory() . '/includes/woocommerce/woocommerce.php'; |
22 | 22 | require get_template_directory() . '/includes/woocommerce/addons.php'; |
23 | 23 | } |
24 | 24 | |
25 | -if ( class_exists( 'Tribe__Events__Main' ) ) { |
|
25 | +if (class_exists('Tribe__Events__Main')) { |
|
26 | 26 | require get_template_directory() . '/includes/the-events-calendar/the-events-calendar.php'; |
27 | 27 | } |
28 | 28 | |
29 | -if ( class_exists( 'Sensei_Main' ) || class_exists( 'Sensei_WC' ) ) { |
|
29 | +if (class_exists('Sensei_Main') || class_exists('Sensei_WC')) { |
|
30 | 30 | require get_template_directory() . '/includes/sensei/class-lsx-sensei.php'; |
31 | 31 | } |
32 | 32 | |
33 | -if ( class_exists( 'Popup_Maker' ) ) { |
|
33 | +if (class_exists('Popup_Maker')) { |
|
34 | 34 | require get_template_directory() . '/includes/popup-maker/class-lsx-popup-maker.php'; |
35 | 35 | } |
36 | 36 | |
37 | -if ( class_exists( 'bbPress' ) ) { |
|
37 | +if (class_exists('bbPress')) { |
|
38 | 38 | require get_template_directory() . '/includes/bbpress/bbpress.php'; |
39 | 39 | } |
40 | 40 |
@@ -10,36 +10,36 @@ discard block |
||
10 | 10 | * WooCommerce Order Delivery Date |
11 | 11 | */ |
12 | 12 | if ( function_exists( 'wc_od_get_delivery_date_field_args' ) ) { |
13 | - /** |
|
14 | - * Change the arguments for the checkout delivery date field. |
|
15 | - * |
|
16 | - * @package lsx |
|
17 | - * @subpackage woocommerce |
|
18 | - * @param $args array |
|
19 | - * @return array |
|
20 | - */ |
|
21 | - function lsx_wc_delivery_date_args( $args = array(), $context ) { |
|
22 | - if ( 'checkout' === $context ) { |
|
23 | - $args['label'] = _x( 'Date', 'Delivery date checkout field label', 'lsx' ); |
|
24 | - } |
|
25 | - return $args; |
|
26 | - } |
|
27 | - add_filter( 'wc_od_delivery_date_field_args', 'lsx_wc_delivery_date_args', 10, 2 ); |
|
13 | + /** |
|
14 | + * Change the arguments for the checkout delivery date field. |
|
15 | + * |
|
16 | + * @package lsx |
|
17 | + * @subpackage woocommerce |
|
18 | + * @param $args array |
|
19 | + * @return array |
|
20 | + */ |
|
21 | + function lsx_wc_delivery_date_args( $args = array(), $context ) { |
|
22 | + if ( 'checkout' === $context ) { |
|
23 | + $args['label'] = _x( 'Date', 'Delivery date checkout field label', 'lsx' ); |
|
24 | + } |
|
25 | + return $args; |
|
26 | + } |
|
27 | + add_filter( 'wc_od_delivery_date_field_args', 'lsx_wc_delivery_date_args', 10, 2 ); |
|
28 | 28 | |
29 | - /** |
|
30 | - * Change the title of the shipping and delivery title. |
|
31 | - * |
|
32 | - * @package lsx |
|
33 | - * @subpackage woocommerce |
|
34 | - * @param $args array |
|
35 | - * @return array |
|
36 | - */ |
|
37 | - function lsx_wc_delivery_details_args( $args = array() ) { |
|
38 | - $args['title'] = _x( 'Collection or Delivery Time-slot', 'Delivery date title on checkout', 'lsx' ); |
|
39 | - return $args; |
|
40 | - } |
|
41 | - add_filter( 'wc_od_order_delivery_details_args', 'lsx_wc_delivery_details_args', 10, 1 ); |
|
42 | - add_filter( 'wc_od_checkout_delivery_details_args', 'lsx_wc_delivery_details_args', 10, 1 ); |
|
29 | + /** |
|
30 | + * Change the title of the shipping and delivery title. |
|
31 | + * |
|
32 | + * @package lsx |
|
33 | + * @subpackage woocommerce |
|
34 | + * @param $args array |
|
35 | + * @return array |
|
36 | + */ |
|
37 | + function lsx_wc_delivery_details_args( $args = array() ) { |
|
38 | + $args['title'] = _x( 'Collection or Delivery Time-slot', 'Delivery date title on checkout', 'lsx' ); |
|
39 | + return $args; |
|
40 | + } |
|
41 | + add_filter( 'wc_od_order_delivery_details_args', 'lsx_wc_delivery_details_args', 10, 1 ); |
|
42 | + add_filter( 'wc_od_checkout_delivery_details_args', 'lsx_wc_delivery_details_args', 10, 1 ); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -47,33 +47,33 @@ discard block |
||
47 | 47 | */ |
48 | 48 | |
49 | 49 | if ( class_exists( 'WC_Points_Rewards' ) ) { |
50 | - /** |
|
51 | - * Adds a div around the Points and rewards message. |
|
52 | - * |
|
53 | - * @param string $message |
|
54 | - * @param string $option |
|
55 | - * @return string |
|
56 | - */ |
|
57 | - function lsx_wc_points_message_div( $message = '', $option = '' ) { |
|
58 | - if ( '' !== $message ) { |
|
59 | - $message = '<div class="lsx-woocommerce-message-text">' . $message . '</div>'; |
|
60 | - } |
|
61 | - return $message; |
|
62 | - } |
|
63 | - add_filter( 'option_wc_points_rewards_redeem_points_message', 'lsx_wc_points_message_div', 10, 2 ); |
|
50 | + /** |
|
51 | + * Adds a div around the Points and rewards message. |
|
52 | + * |
|
53 | + * @param string $message |
|
54 | + * @param string $option |
|
55 | + * @return string |
|
56 | + */ |
|
57 | + function lsx_wc_points_message_div( $message = '', $option = '' ) { |
|
58 | + if ( '' !== $message ) { |
|
59 | + $message = '<div class="lsx-woocommerce-message-text">' . $message . '</div>'; |
|
60 | + } |
|
61 | + return $message; |
|
62 | + } |
|
63 | + add_filter( 'option_wc_points_rewards_redeem_points_message', 'lsx_wc_points_message_div', 10, 2 ); |
|
64 | 64 | |
65 | - /** |
|
66 | - * Adds in the lsx wrapper class. |
|
67 | - * |
|
68 | - * @param string $message |
|
69 | - * @param boolean $discount_available |
|
70 | - * @return string |
|
71 | - */ |
|
72 | - function lsx_wc_points_message_div_wrapper_class( $message = '', $discount_available ) { |
|
73 | - if ( '' !== $message ) { |
|
74 | - $message = str_replace( 'wc_points_redeem_earn_points', 'wc_points_redeem_earn_points woocommerce-message lsx-woocommerce-message-wrap', $message ); |
|
75 | - } |
|
76 | - return $message; |
|
77 | - } |
|
78 | - add_filter( 'wc_points_rewards_redeem_points_message', 'lsx_wc_points_message_div_wrapper_class', 10, 2 ); |
|
65 | + /** |
|
66 | + * Adds in the lsx wrapper class. |
|
67 | + * |
|
68 | + * @param string $message |
|
69 | + * @param boolean $discount_available |
|
70 | + * @return string |
|
71 | + */ |
|
72 | + function lsx_wc_points_message_div_wrapper_class( $message = '', $discount_available ) { |
|
73 | + if ( '' !== $message ) { |
|
74 | + $message = str_replace( 'wc_points_redeem_earn_points', 'wc_points_redeem_earn_points woocommerce-message lsx-woocommerce-message-wrap', $message ); |
|
75 | + } |
|
76 | + return $message; |
|
77 | + } |
|
78 | + add_filter( 'wc_points_rewards_redeem_points_message', 'lsx_wc_points_message_div_wrapper_class', 10, 2 ); |
|
79 | 79 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | /** |
10 | 10 | * WooCommerce Order Delivery Date |
11 | 11 | */ |
12 | -if ( function_exists( 'wc_od_get_delivery_date_field_args' ) ) { |
|
12 | +if (function_exists('wc_od_get_delivery_date_field_args')) { |
|
13 | 13 | /** |
14 | 14 | * Change the arguments for the checkout delivery date field. |
15 | 15 | * |
@@ -18,13 +18,13 @@ discard block |
||
18 | 18 | * @param $args array |
19 | 19 | * @return array |
20 | 20 | */ |
21 | - function lsx_wc_delivery_date_args( $args = array(), $context ) { |
|
22 | - if ( 'checkout' === $context ) { |
|
23 | - $args['label'] = _x( 'Date', 'Delivery date checkout field label', 'lsx' ); |
|
21 | + function lsx_wc_delivery_date_args($args = array(), $context) { |
|
22 | + if ('checkout' === $context) { |
|
23 | + $args['label'] = _x('Date', 'Delivery date checkout field label', 'lsx'); |
|
24 | 24 | } |
25 | 25 | return $args; |
26 | 26 | } |
27 | - add_filter( 'wc_od_delivery_date_field_args', 'lsx_wc_delivery_date_args', 10, 2 ); |
|
27 | + add_filter('wc_od_delivery_date_field_args', 'lsx_wc_delivery_date_args', 10, 2); |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * Change the title of the shipping and delivery title. |
@@ -34,19 +34,19 @@ discard block |
||
34 | 34 | * @param $args array |
35 | 35 | * @return array |
36 | 36 | */ |
37 | - function lsx_wc_delivery_details_args( $args = array() ) { |
|
38 | - $args['title'] = _x( 'Collection or Delivery Time-slot', 'Delivery date title on checkout', 'lsx' ); |
|
37 | + function lsx_wc_delivery_details_args($args = array()) { |
|
38 | + $args['title'] = _x('Collection or Delivery Time-slot', 'Delivery date title on checkout', 'lsx'); |
|
39 | 39 | return $args; |
40 | 40 | } |
41 | - add_filter( 'wc_od_order_delivery_details_args', 'lsx_wc_delivery_details_args', 10, 1 ); |
|
42 | - add_filter( 'wc_od_checkout_delivery_details_args', 'lsx_wc_delivery_details_args', 10, 1 ); |
|
41 | + add_filter('wc_od_order_delivery_details_args', 'lsx_wc_delivery_details_args', 10, 1); |
|
42 | + add_filter('wc_od_checkout_delivery_details_args', 'lsx_wc_delivery_details_args', 10, 1); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
46 | 46 | * WooCommerce Points and Rewards |
47 | 47 | */ |
48 | 48 | |
49 | -if ( class_exists( 'WC_Points_Rewards' ) ) { |
|
49 | +if (class_exists('WC_Points_Rewards')) { |
|
50 | 50 | /** |
51 | 51 | * Adds a div around the Points and rewards message. |
52 | 52 | * |
@@ -54,13 +54,13 @@ discard block |
||
54 | 54 | * @param string $option |
55 | 55 | * @return string |
56 | 56 | */ |
57 | - function lsx_wc_points_message_div( $message = '', $option = '' ) { |
|
58 | - if ( '' !== $message ) { |
|
57 | + function lsx_wc_points_message_div($message = '', $option = '') { |
|
58 | + if ('' !== $message) { |
|
59 | 59 | $message = '<div class="lsx-woocommerce-message-text">' . $message . '</div>'; |
60 | 60 | } |
61 | 61 | return $message; |
62 | 62 | } |
63 | - add_filter( 'option_wc_points_rewards_redeem_points_message', 'lsx_wc_points_message_div', 10, 2 ); |
|
63 | + add_filter('option_wc_points_rewards_redeem_points_message', 'lsx_wc_points_message_div', 10, 2); |
|
64 | 64 | |
65 | 65 | /** |
66 | 66 | * Adds in the lsx wrapper class. |
@@ -69,11 +69,11 @@ discard block |
||
69 | 69 | * @param boolean $discount_available |
70 | 70 | * @return string |
71 | 71 | */ |
72 | - function lsx_wc_points_message_div_wrapper_class( $message = '', $discount_available ) { |
|
73 | - if ( '' !== $message ) { |
|
74 | - $message = str_replace( 'wc_points_redeem_earn_points', 'wc_points_redeem_earn_points woocommerce-message lsx-woocommerce-message-wrap', $message ); |
|
72 | + function lsx_wc_points_message_div_wrapper_class($message = '', $discount_available) { |
|
73 | + if ('' !== $message) { |
|
74 | + $message = str_replace('wc_points_redeem_earn_points', 'wc_points_redeem_earn_points woocommerce-message lsx-woocommerce-message-wrap', $message); |
|
75 | 75 | } |
76 | 76 | return $message; |
77 | 77 | } |
78 | - add_filter( 'wc_points_rewards_redeem_points_message', 'lsx_wc_points_message_div_wrapper_class', 10, 2 ); |
|
78 | + add_filter('wc_points_rewards_redeem_points_message', 'lsx_wc_points_message_div_wrapper_class', 10, 2); |
|
79 | 79 | } |