Completed
Push — master ( 002bac...0477f2 )
by Jacques
04:18 queued 01:54
created
header.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,14 +11,14 @@
 block discarded – undo
11 11
 <html <?php language_attributes(); ?>>
12 12
 	<head>
13 13
 		<?php lsx_head_top(); ?>
14
-		<meta charset="<?php bloginfo( 'charset' ); ?>">
14
+		<meta charset="<?php bloginfo('charset'); ?>">
15 15
 		<link rel="profile" href="http://gmpg.org/xfn/11">
16
-		<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
16
+		<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
17 17
 		<?php lsx_head_bottom(); ?>
18 18
 		<?php wp_head(); ?>
19 19
 	</head>
20 20
 
21
-	<body <?php body_class( 'lsx' ); ?>>
21
+	<body <?php body_class('lsx'); ?>>
22 22
 		<?php lsx_body_top(); ?>
23 23
 
24 24
 		<div class="header-wrap">
Please login to merge, or discard this patch.
includes/sanitize.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 	 * @param  mixed    $value      The value to sanitize.
22 22
 	 * @param  mixed    $setting    The setting for which the sanitizing is occurring.
23 23
 	 * @return mixed                The sanitized value.
24
-	*/
24
+	 */
25 25
 	function lsx_sanitize_choices( $value, $setting ) {
26 26
 		if ( is_object( $setting ) ) {
27 27
 			$setting = $setting->id;
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage sanitize
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_sanitize_choices' ) ) :
13
+if ( ! function_exists('lsx_sanitize_choices')) :
14 14
 
15 15
 	/**
16 16
 	 * Sanitize a value from a list of allowed values.
@@ -22,18 +22,18 @@  discard block
 block discarded – undo
22 22
 	 * @param  mixed    $setting    The setting for which the sanitizing is occurring.
23 23
 	 * @return mixed                The sanitized value.
24 24
 	*/
25
-	function lsx_sanitize_choices( $value, $setting ) {
26
-		if ( is_object( $setting ) ) {
25
+	function lsx_sanitize_choices($value, $setting) {
26
+		if (is_object($setting)) {
27 27
 			$setting = $setting->id;
28 28
 		}
29 29
 
30
-		$choices = lsx_customizer_sanitize_get_choices( $setting );
30
+		$choices = lsx_customizer_sanitize_get_choices($setting);
31 31
 
32
-		if ( ! is_wp_error( $choices ) && ! empty( $choices ) ) {
33
-			$allowed_choices = array_keys( $choices );
32
+		if ( ! is_wp_error($choices) && ! empty($choices)) {
33
+			$allowed_choices = array_keys($choices);
34 34
 
35
-			if ( ! in_array( $value, $allowed_choices ) ) {
36
-				$value = lsx_customizer_sanitize_get_default( $setting );
35
+			if ( ! in_array($value, $allowed_choices)) {
36
+				$value = lsx_customizer_sanitize_get_default($setting);
37 37
 			}
38 38
 
39 39
 			return $value;
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
 endif;
46 46
 
47
-if ( ! function_exists( 'lsx_customizer_sanitize_get_choices' ) ) :
47
+if ( ! function_exists('lsx_customizer_sanitize_get_choices')) :
48 48
 
49 49
 	/**
50 50
 	 * Helper function to return the choices for a field.
@@ -55,14 +55,14 @@  discard block
 block discarded – undo
55 55
 	 * @param string
56 56
 	 * @return mixed $field
57 57
 	 */
58
-	function lsx_customizer_sanitize_get_choices( $id ) {
58
+	function lsx_customizer_sanitize_get_choices($id) {
59 59
 		global $lsx_customizer;
60 60
 
61
-		$can_validate = method_exists( 'WP_Customize_Setting', 'validate' );
62
-		$field        = $lsx_customizer->get_control( $id );
61
+		$can_validate = method_exists('WP_Customize_Setting', 'validate');
62
+		$field        = $lsx_customizer->get_control($id);
63 63
 
64
-		if ( ! isset( $field['choices'] ) ) {
65
-			return $can_validate ? new WP_Error( 'notexists', esc_html__( 'Choice doesn\'t exist', 'lsx' ) ) : false;
64
+		if ( ! isset($field['choices'])) {
65
+			return $can_validate ? new WP_Error('notexists', esc_html__('Choice doesn\'t exist', 'lsx')) : false;
66 66
 		}
67 67
 
68 68
 		return $field['choices'];
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
 endif;
72 72
 
73
-if ( ! function_exists( 'lsx_customizer_sanitize_get_default' ) ) :
73
+if ( ! function_exists('lsx_customizer_sanitize_get_default')) :
74 74
 
75 75
 	/**
76 76
 	 * Helper function to return defaults.
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
 	 * @param string
82 82
 	 * @return mixed $default
83 83
 	 */
84
-	function lsx_customizer_sanitize_get_default( $id ) {
84
+	function lsx_customizer_sanitize_get_default($id) {
85 85
 		global $lsx_customizer;
86
-		$setting = $lsx_customizer->get_setting( $id );
86
+		$setting = $lsx_customizer->get_setting($id);
87 87
 
88
-		if ( isset( $setting['default'] ) ) {
88
+		if (isset($setting['default'])) {
89 89
 			return $setting['default'];
90 90
 		}
91 91
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
 endif;
96 96
 
97
-if ( ! function_exists( 'lsx_sanitize_checkbox' ) ) :
97
+if ( ! function_exists('lsx_sanitize_checkbox')) :
98 98
 
99 99
 	/**
100 100
 	 * Sanitizes an single or multiple checkbox input.
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
 	 * @param array $input
106 106
 	 * @return array $output
107 107
 	 */
108
-	function lsx_sanitize_checkbox( $input ) {
109
-		$can_validate = method_exists( 'WP_Customize_Setting', 'validate' );
108
+	function lsx_sanitize_checkbox($input) {
109
+		$can_validate = method_exists('WP_Customize_Setting', 'validate');
110 110
 
111
-		if ( ! is_bool( $input ) ) {
112
-			return $can_validate ? new WP_Error( 'notboolean', esc_html__( 'Not a boolean', 'lsx' ) ) : false;
111
+		if ( ! is_bool($input)) {
112
+			return $can_validate ? new WP_Error('notboolean', esc_html__('Not a boolean', 'lsx')) : false;
113 113
 		}
114 114
 
115 115
 		return $input;
Please login to merge, or discard this patch.
includes/nav-navwalker.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
  * @category   bootstrap-walker
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) {
10
+if ( ! defined('ABSPATH')) {
11 11
 	exit;
12 12
 }
13 13
 
14
-add_filter( 'nav_menu_item_id', '__return_null' );
14
+add_filter('nav_menu_item_id', '__return_null');
15 15
 
16
-if ( ! function_exists( 'lsx_nav_menu_css_class' ) ) :
16
+if ( ! function_exists('lsx_nav_menu_css_class')) :
17 17
 
18 18
 	/**
19 19
 	 * Remove the id="" on nav menu items.
@@ -23,22 +23,22 @@  discard block
 block discarded – undo
23 23
 	 * @subpackage navigation
24 24
 	 * @category   bootstrap-walker
25 25
 	 */
26
-	function lsx_nav_menu_css_class( $classes, $item ) {
27
-		$slug    = sanitize_title( $item->title );
28
-		$classes = preg_replace( '/(current(-menu-|[-_]page[-_])(item|parent|ancestor))/', 'active', $classes );
29
-		$classes = preg_replace( '/^((menu|page)[-_\w+]+)+/', '', $classes );
26
+	function lsx_nav_menu_css_class($classes, $item) {
27
+		$slug    = sanitize_title($item->title);
28
+		$classes = preg_replace('/(current(-menu-|[-_]page[-_])(item|parent|ancestor))/', 'active', $classes);
29
+		$classes = preg_replace('/^((menu|page)[-_\w+]+)+/', '', $classes);
30 30
 
31 31
 		$classes[] = 'menu-' . $slug;
32
-		$classes   = array_unique( $classes );
32
+		$classes   = array_unique($classes);
33 33
 
34
-		return array_filter( $classes, 'lsx_is_element_empty' );
34
+		return array_filter($classes, 'lsx_is_element_empty');
35 35
 	}
36 36
 
37 37
 endif;
38 38
 
39
-add_filter( 'nav_menu_css_class', 'lsx_nav_menu_css_class', 10, 2 );
39
+add_filter('nav_menu_css_class', 'lsx_nav_menu_css_class', 10, 2);
40 40
 
41
-if ( ! function_exists( 'lsx_nav_menu_args' ) ) :
41
+if ( ! function_exists('lsx_nav_menu_args')) :
42 42
 
43 43
 	/**
44 44
 	 * Clean up wp_nav_menu_args.
@@ -50,24 +50,24 @@  discard block
 block discarded – undo
50 50
 	 * @subpackage navigation
51 51
 	 * @category   bootstrap-walker
52 52
 	 */
53
-	function lsx_nav_menu_args( $args = '' ) {
53
+	function lsx_nav_menu_args($args = '') {
54 54
 		$roots_nav_menu_args['container'] = false;
55 55
 
56
-		if ( ! $args['items_wrap'] ) {
56
+		if ( ! $args['items_wrap']) {
57 57
 			$roots_nav_menu_args['items_wrap'] = '<ul class="%2$s">%3$s</ul>';
58 58
 		}
59 59
 
60
-		if ( current_theme_supports( 'bootstrap-top-navbar' ) && ! $args['depth'] ) {
60
+		if (current_theme_supports('bootstrap-top-navbar') && ! $args['depth']) {
61 61
 			$roots_nav_menu_args['depth'] = 2;
62 62
 		}
63 63
 
64
-		if ( ! $args['walker'] ) {
64
+		if ( ! $args['walker']) {
65 65
 			$roots_nav_menu_args['walker'] = new LSX_Nav_Walker();
66 66
 		}
67 67
 
68
-		return array_merge( $args, $roots_nav_menu_args );
68
+		return array_merge($args, $roots_nav_menu_args);
69 69
 	}
70 70
 
71 71
 endif;
72 72
 
73
-add_filter( 'wp_nav_menu_args', 'lsx_nav_menu_args' );
73
+add_filter('wp_nav_menu_args', 'lsx_nav_menu_args');
Please login to merge, or discard this patch.
archive.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,9 +31,12 @@
 block discarded – undo
31 31
 
32 32
 			<?php lsx_paging_nav(); ?>
33 33
 
34
-		<?php else : ?>
34
+		<?php else {
35
+	: ?>
35 36
 
36
-			<?php get_template_part( 'partials/content', 'none' ); ?>
37
+			<?php get_template_part( 'partials/content', 'none' );
38
+}
39
+?>
37 40
 
38 41
 		<?php endif; ?>
39 42
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 <?php lsx_content_wrap_before(); ?>
11 11
 
12
-<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
12
+<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
13 13
 
14 14
 	<?php lsx_content_before(); ?>
15 15
 
@@ -17,16 +17,16 @@  discard block
 block discarded – undo
17 17
 
18 18
 		<?php lsx_content_top(); ?>
19 19
 
20
-		<?php if ( have_posts() ) : ?>
20
+		<?php if (have_posts()) : ?>
21 21
 
22 22
 			<div class="post-wrapper">
23 23
 
24 24
 				<?php
25
-				while ( have_posts() ) :
25
+				while (have_posts()) :
26 26
 					the_post();
27 27
 					?>
28 28
 
29
-					<?php get_template_part( 'partials/content', get_post_format() ); ?>
29
+					<?php get_template_part('partials/content', get_post_format()); ?>
30 30
 
31 31
 				<?php endwhile; ?>
32 32
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
 		<?php else : ?>
38 38
 
39
-			<?php get_template_part( 'partials/content', 'none' ); ?>
39
+			<?php get_template_part('partials/content', 'none'); ?>
40 40
 
41 41
 		<?php endif; ?>
42 42
 
Please login to merge, or discard this patch.
404.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@  discard block
 block discarded – undo
11 11
 		<main id="main" class="site-main" role="main">
12 12
 			<section class="error-404 not-found">
13 13
 				<header class="page-header">
14
-					<h1 class="page-title"><?php esc_html_e( 'Whoops!', 'lsx' ); ?></h1>
14
+					<h1 class="page-title"><?php esc_html_e('Whoops!', 'lsx'); ?></h1>
15 15
 				</header><!-- .page-header -->
16 16
 
17 17
 				<div class="page-content">
18
-					<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try a search?', 'lsx' ); ?></p>
18
+					<p><?php esc_html_e('It looks like nothing was found at this location. Maybe try a search?', 'lsx'); ?></p>
19 19
 					<?php get_search_form(); ?>
20 20
 				</div><!-- .page-content -->
21 21
 			</section><!-- .error-404 -->
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
 	<div id="secondary" class="col-sm-12 sidebar-container" role="complementary">
27 27
 		<div class="widget-area">
28
-			<?php dynamic_sidebar( 'sidebar-404' ); ?>
28
+			<?php dynamic_sidebar('sidebar-404'); ?>
29 29
 		</div><!-- .widget-area -->
30 30
 	</div><!-- #secondary -->
31 31
 
Please login to merge, or discard this patch.
page-templates/template-wc-thank-you.php 2 patches
Braces   +11 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,8 +72,12 @@  discard block
 block discarded – undo
72 72
 
73 73
 							<dl class="customer_details">
74 74
 								<?php
75
-									if ( $order->billing_email ) echo '<dt>' . esc_html__( 'Email:', 'lsx' ) . '</dt><dd>' . $order->billing_email . '</dd>';
76
-									if ( $order->billing_phone ) echo '<dt>' . esc_html__( 'Telephone:', 'lsx' ) . '</dt><dd>' . $order->billing_phone . '</dd>';
75
+									if ( $order->billing_email ) {
76
+										echo '<dt>' . esc_html__( 'Email:', 'lsx' ) . '</dt><dd>' . $order->billing_email . '</dd>';
77
+									}
78
+									if ( $order->billing_phone ) {
79
+										echo '<dt>' . esc_html__( 'Telephone:', 'lsx' ) . '</dt><dd>' . $order->billing_phone . '</dd>';
80
+									}
77 81
 
78 82
 									// Additional customer details hook
79 83
 									do_action( 'woocommerce_order_details_after_customer_details', $order );
@@ -230,9 +234,12 @@  discard block
 block discarded – undo
230 234
 
231 235
 					<?php // @codingStandardsIgnoreEnd ?>
232 236
 
233
-				<?php else : ?>
237
+				<?php else {
238
+	: ?>
234 239
 
235
-					<div class="alert alert-danger"><?php esc_html_e( 'Invalid order.', 'lsx' ); ?></div>
240
+					<div class="alert alert-danger"><?php esc_html_e( 'Invalid order.', 'lsx' );
241
+}
242
+?></div>
236 243
 
237 244
 				<?php endif; ?>
238 245
 
Please login to merge, or discard this patch.
Spacing   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -22,74 +22,74 @@  discard block
 block discarded – undo
22 22
 			<ul class="lsx-wc-checkout-steps-items">
23 23
 					<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-done">
24 24
 						<i class="fa fa-check-circle" aria-hidden="true"></i>
25
-						<span><span><?php esc_html_e( 'Choose your product', 'lsx' ); ?></span></span>
25
+						<span><span><?php esc_html_e('Choose your product', 'lsx'); ?></span></span>
26 26
 						<i class="fa fa-angle-right" aria-hidden="true"></i>
27 27
 					</li>
28 28
 
29 29
 					<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-done lsx-wc-checkout-steps-item-cart">
30 30
 						<i class="fa fa-check-circle" aria-hidden="true"></i>
31
-						<span><span><?php esc_html_e( 'My Cart', 'lsx' ); ?></span></span>
31
+						<span><span><?php esc_html_e('My Cart', 'lsx'); ?></span></span>
32 32
 					</li>
33 33
 
34 34
 					<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-done lsx-wc-checkout-steps-item-payment">
35 35
 					<i class="fa fa-check-circle" aria-hidden="true"></i>
36
-						<span><span><?php esc_html_e( 'Payment details', 'lsx' ); ?></span></span>
36
+						<span><span><?php esc_html_e('Payment details', 'lsx'); ?></span></span>
37 37
 						<i class="fa fa-angle-right" aria-hidden="true"></i>
38 38
 					</li>
39 39
 
40 40
 					<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-current lsx-wc-checkout-steps-item-thankyou">
41
-						<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e( '4', 'lsx' ); ?></i>
42
-						<span><span><?php esc_html_e( 'Thank you!', 'lsx' ); ?></span></span>
41
+						<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e('4', 'lsx'); ?></i>
42
+						<span><span><?php esc_html_e('Thank you!', 'lsx'); ?></span></span>
43 43
 					</li>
44 44
 			</ul>
45 45
 		</div>
46 46
 
47 47
 		<?php lsx_content_top(); ?>
48 48
 
49
-		<?php if ( have_posts() ) : ?>
49
+		<?php if (have_posts()) : ?>
50 50
 
51 51
 			<?php
52
-			while ( have_posts() ) :
52
+			while (have_posts()) :
53 53
 				the_post();
54 54
 			?>
55 55
 
56 56
 				<?php
57 57
 					WC()->payment_gateways()->payment_gateways;
58
-					$order_key = isset( $_GET['key'] ) ? wc_clean( $_GET['key'] ) : '';
59
-					$order_id  = absint( $wp->query_vars['order-received'] );
60
-					$order = wc_get_order( $order_id );
58
+					$order_key = isset($_GET['key']) ? wc_clean($_GET['key']) : '';
59
+					$order_id  = absint($wp->query_vars['order-received']);
60
+					$order = wc_get_order($order_id);
61 61
 				?>
62 62
 
63
-				<?php if ( $order && $order->get_id() === $order_id && $order->get_order_key() === $order_key ) : ?>
63
+				<?php if ($order && $order->get_id() === $order_id && $order->get_order_key() === $order_key) : ?>
64 64
 
65 65
 					<?php // @codingStandardsIgnoreStart ?>
66 66
 
67
-					<div class="alert alert-success"><?php echo apply_filters( 'woocommerce_thankyou_order_received_text', esc_html__( 'Thank you. Your order has been received.', 'lsx' ), $order ); ?></div>
67
+					<div class="alert alert-success"><?php echo apply_filters('woocommerce_thankyou_order_received_text', esc_html__('Thank you. Your order has been received.', 'lsx'), $order); ?></div>
68 68
 
69 69
 					<div class="row">
70 70
 						<div class="col-xs-12 col-sm-6">
71
-							<h2><?php esc_html_e( 'Order Details', 'lsx' ); ?></h2>
71
+							<h2><?php esc_html_e('Order Details', 'lsx'); ?></h2>
72 72
 
73 73
 							<table class="table">
74 74
 								<tbody>
75 75
 									<tr>
76
-										<th><?php esc_html_e( 'Order:', 'lsx' ); ?></th>
76
+										<th><?php esc_html_e('Order:', 'lsx'); ?></th>
77 77
 										<td><?php echo $order->get_order_number(); ?></td>
78 78
 									</tr>
79 79
 
80 80
 									<tr>
81
-										<th><?php esc_html_e( 'Date:', 'lsx' ); ?></th>
82
-										<td><?php echo date_i18n( get_option( 'date_format' ), strtotime( $order->order_date ) ); ?></td>
81
+										<th><?php esc_html_e('Date:', 'lsx'); ?></th>
82
+										<td><?php echo date_i18n(get_option('date_format'), strtotime($order->order_date)); ?></td>
83 83
 									</tr>
84 84
 
85 85
 									<tr>
86
-										<th><?php esc_html_e( 'Total:', 'lsx' ); ?></th>
86
+										<th><?php esc_html_e('Total:', 'lsx'); ?></th>
87 87
 										<td><?php echo $order->get_formatted_order_total(); ?></td>
88 88
 									</tr>
89 89
 
90
-									<?php if ( $order->payment_method_title ) : ?>
90
+									<?php if ($order->payment_method_title) : ?>
91 91
 										<tr>
92
-											<th><?php esc_html_e( 'Payment method:', 'lsx' ); ?></th>
92
+											<th><?php esc_html_e('Payment method:', 'lsx'); ?></th>
93 93
 											<td><?php echo $order->payment_method_title; ?></td>
94 94
 										</tr>
95 95
 									<?php endif; ?>
@@ -98,48 +98,48 @@  discard block
 block discarded – undo
98 98
 
99 99
 							<?php // do_action( 'woocommerce_order_details_after_order_table', $order ); ?>
100 100
 
101
-							<h2><?php esc_html_e( 'Customer details', 'lsx' ); ?></h2>
101
+							<h2><?php esc_html_e('Customer details', 'lsx'); ?></h2>
102 102
 
103 103
 							<dl class="customer_details">
104 104
 								<?php
105
-									if ( $order->billing_email ) echo '<dt>' . esc_html__( 'Email:', 'lsx' ) . '</dt><dd>' . $order->billing_email . '</dd>';
106
-									if ( $order->billing_phone ) echo '<dt>' . esc_html__( 'Telephone:', 'lsx' ) . '</dt><dd>' . $order->billing_phone . '</dd>';
105
+									if ($order->billing_email) echo '<dt>' . esc_html__('Email:', 'lsx') . '</dt><dd>' . $order->billing_email . '</dd>';
106
+									if ($order->billing_phone) echo '<dt>' . esc_html__('Telephone:', 'lsx') . '</dt><dd>' . $order->billing_phone . '</dd>';
107 107
 
108 108
 									// Additional customer details hook
109
-									do_action( 'woocommerce_order_details_after_customer_details', $order );
109
+									do_action('woocommerce_order_details_after_customer_details', $order);
110 110
 								?>
111 111
 							</dl>
112 112
 
113
-							<?php if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && get_option( 'woocommerce_calc_shipping' ) !== 'no' ) : ?>
113
+							<?php if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && get_option('woocommerce_calc_shipping') !== 'no') : ?>
114 114
 
115 115
 								<div class="row">
116 116
 									<div class="col-xs-12 col-sm-6">
117 117
 
118 118
 							<?php endif; ?>
119 119
 
120
-										<h3><?php esc_html_e( 'Billing Address', 'lsx' ); ?></h3>
120
+										<h3><?php esc_html_e('Billing Address', 'lsx'); ?></h3>
121 121
 
122 122
 										<address>
123 123
 											<?php
124
-												if ( ! $order->get_formatted_billing_address() ) {
125
-													esc_html_e( 'N/A', 'lsx' );
124
+												if ( ! $order->get_formatted_billing_address()) {
125
+													esc_html_e('N/A', 'lsx');
126 126
 												} else {
127 127
 													echo $order->get_formatted_billing_address();
128 128
 												}
129 129
 											?>
130 130
 										</address>
131 131
 
132
-							<?php if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && get_option( 'woocommerce_calc_shipping' ) !== 'no' ) : ?>
132
+							<?php if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && get_option('woocommerce_calc_shipping') !== 'no') : ?>
133 133
 
134 134
 									</div>
135 135
 
136 136
 									<div class="col-xs-12 col-sm-6">
137
-										<h3><?php esc_html_e( 'Shipping Address', 'lsx' ); ?></h3>
137
+										<h3><?php esc_html_e('Shipping Address', 'lsx'); ?></h3>
138 138
 
139 139
 										<address>
140 140
 											<?php
141
-												if ( ! $order->get_formatted_shipping_address() ) {
142
-													esc_html_e( 'N/A', 'lsx' );
141
+												if ( ! $order->get_formatted_shipping_address()) {
142
+													esc_html_e('N/A', 'lsx');
143 143
 												} else {
144 144
 													echo $order->get_formatted_shipping_address();
145 145
 												}
@@ -152,68 +152,68 @@  discard block
 block discarded – undo
152 152
 						</div>
153 153
 
154 154
 						<div class="col-xs-12 col-sm-6">
155
-							<h2><?php esc_html_e( 'Products details', 'lsx' ); ?></h2>
155
+							<h2><?php esc_html_e('Products details', 'lsx'); ?></h2>
156 156
 
157 157
 							<table class="table">
158 158
 								<thead>
159 159
 									<tr>
160
-										<th><?php esc_html_e( 'Product', 'lsx' ); ?></th>
161
-										<th><?php esc_html_e( 'Total', 'lsx' ); ?></th>
160
+										<th><?php esc_html_e('Product', 'lsx'); ?></th>
161
+										<th><?php esc_html_e('Total', 'lsx'); ?></th>
162 162
 									</tr>
163 163
 								</thead>
164 164
 
165 165
 								<tbody>
166 166
 									<?php
167
-										if ( sizeof( $order->get_items() ) > 0 ) :
168
-											foreach( $order->get_items() as $item ) :
169
-												$_product = apply_filters( 'woocommerce_order_item_product', $order->get_product_from_item( $item ), $item );
170
-												$item_meta = new WC_Order_Item_Meta( $item['item_meta'], $_product );
167
+										if (sizeof($order->get_items()) > 0) :
168
+											foreach ($order->get_items() as $item) :
169
+												$_product = apply_filters('woocommerce_order_item_product', $order->get_product_from_item($item), $item);
170
+												$item_meta = new WC_Order_Item_Meta($item['item_meta'], $_product);
171 171
 											?>
172 172
 
173 173
 											<tr>
174 174
 												<td>
175 175
 													<?php
176
-														if ( $_product && ! $_product->is_visible() ) {
177
-															echo apply_filters( 'woocommerce_order_item_name', $item['name'], $item );
176
+														if ($_product && ! $_product->is_visible()) {
177
+															echo apply_filters('woocommerce_order_item_name', $item['name'], $item);
178 178
 														} else {
179
-															echo apply_filters( 'woocommerce_order_item_name', sprintf( '<a href="%s">%s</a>', get_permalink( $item['product_id'] ), $item['name'] ), $item );
179
+															echo apply_filters('woocommerce_order_item_name', sprintf('<a href="%s">%s</a>', get_permalink($item['product_id']), $item['name']), $item);
180 180
 														}
181 181
 
182
-														echo apply_filters( 'woocommerce_order_item_quantity_html', ' <strong class="product-quantity">' . sprintf( '&times; %s', $item['qty'] ) . '</strong>', $item );
182
+														echo apply_filters('woocommerce_order_item_quantity_html', ' <strong class="product-quantity">' . sprintf('&times; %s', $item['qty']) . '</strong>', $item);
183 183
 
184 184
 														ob_start();
185 185
 														$item_meta->display();
186 186
 														$_item_meta = ob_get_clean();
187 187
 
188
-														if ( ! empty( $_item_meta ) ) {
188
+														if ( ! empty($_item_meta)) {
189 189
 															echo $_item_meta;
190 190
 														} else {
191 191
 															echo '<br>';
192 192
 														}
193 193
 
194
-														if ( $_product && $_product->exists() && $_product->is_downloadable() && $order->is_download_permitted() ) {
195
-															$download_files = $order->get_item_downloads( $item );
194
+														if ($_product && $_product->exists() && $_product->is_downloadable() && $order->is_download_permitted()) {
195
+															$download_files = $order->get_item_downloads($item);
196 196
 															$i = 0;
197 197
 															$links = array();
198 198
 
199
-															if ( empty( $download_files ) ) {
199
+															if (empty($download_files)) {
200 200
 																$download_files = $_product->get_files();
201 201
 															}
202 202
 
203
-															foreach ( $download_files as $download_id => $file ) {
203
+															foreach ($download_files as $download_id => $file) {
204 204
 																++$i;
205 205
 
206
-																if ( $i > 1 ) {
206
+																if ($i > 1) {
207 207
 																	echo '<br>';
208 208
 																}
209 209
 
210
-																if ( ! empty( $_item_meta ) ) {
210
+																if ( ! empty($_item_meta)) {
211 211
 																	echo '<span style="margin-top: -2.4rem; display: block;">';
212 212
 																} else {
213 213
 																	echo '<span>';
214 214
 																}
215 215
 
216
-																echo '<a href="' . esc_url( $file['download_url'] ? $file['download_url'] : $file['file'] ) . '">' . sprintf( esc_html__( 'Download file%s', 'lsx' ), ( count( $download_files ) > 1 ? ' ' . $i . ': ' : ': ' ) ) . esc_html( $file['name'] ) . '</a>';
216
+																echo '<a href="' . esc_url($file['download_url'] ? $file['download_url'] : $file['file']) . '">' . sprintf(esc_html__('Download file%s', 'lsx'), (count($download_files) > 1 ? ' ' . $i . ': ' : ': ')) . esc_html($file['name']) . '</a>';
217 217
 																echo '</span>';
218 218
 															}
219 219
 														}
@@ -221,15 +221,15 @@  discard block
 block discarded – undo
221 221
 												</td>
222 222
 
223 223
 												<td>
224
-													<?php echo $order->get_formatted_line_subtotal( $item ); ?>
224
+													<?php echo $order->get_formatted_line_subtotal($item); ?>
225 225
 												</td>
226 226
 											</tr>
227 227
 
228 228
 											<?php
229
-												if ( $order->has_status( array( 'completed', 'processing' ) ) && ( $purchase_note = get_post_meta( $_product->id, '_purchase_note', true ) ) ) {
229
+												if ($order->has_status(array('completed', 'processing')) && ($purchase_note = get_post_meta($_product->id, '_purchase_note', true))) {
230 230
 													?>
231 231
 													<tr class="product-purchase-note">
232
-														<td colspan="3"><?php echo wpautop( do_shortcode( wp_kses_post( $purchase_note ) ) ); ?></td>
232
+														<td colspan="3"><?php echo wpautop(do_shortcode(wp_kses_post($purchase_note))); ?></td>
233 233
 													</tr>
234 234
 													<?php
235 235
 												}
@@ -242,8 +242,8 @@  discard block
 block discarded – undo
242 242
 
243 243
 								<tfoot>
244 244
 									<?php
245
-										if ( $totals = $order->get_order_item_totals() ) :
246
-											foreach ( $totals as $total ) :
245
+										if ($totals = $order->get_order_item_totals()) :
246
+											foreach ($totals as $total) :
247 247
 												?>
248 248
 												<tr>
249 249
 													<th scope="row"><?php echo $total['label']; ?></th>
@@ -256,9 +256,9 @@  discard block
 block discarded – undo
256 256
 								</tfoot>
257 257
 							</table>
258 258
 
259
-							<?php if ( 'bacs' === $order->get_payment_method() ) { ?>
260
-								<h2><?php esc_html_e( 'Bank Details', 'lsx' ); ?></h2>
261
-								<?php do_action( 'woocommerce_thankyou_' . $order->get_payment_method(), $order->get_id() ); ?>
259
+							<?php if ('bacs' === $order->get_payment_method()) { ?>
260
+								<h2><?php esc_html_e('Bank Details', 'lsx'); ?></h2>
261
+								<?php do_action('woocommerce_thankyou_' . $order->get_payment_method(), $order->get_id()); ?>
262 262
 							<?php } ?>
263 263
 						</div>
264 264
 					</div>
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 
268 268
 				<?php else : ?>
269 269
 
270
-					<div class="alert alert-danger"><?php esc_html_e( 'Invalid order.', 'lsx' ); ?></div>
270
+					<div class="alert alert-danger"><?php esc_html_e('Invalid order.', 'lsx'); ?></div>
271 271
 
272 272
 				<?php endif; ?>
273 273
 
Please login to merge, or discard this patch.
tribe-events/pro/related-events.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -15,31 +15,31 @@
 block discarded – undo
15 15
  *
16 16
  */
17 17
 
18
-if ( ! defined( 'ABSPATH' ) ) {
19
-	die( '-1' );
18
+if ( ! defined('ABSPATH')) {
19
+	die('-1');
20 20
 }
21 21
 
22 22
 $posts = tribe_get_related_posts();
23 23
 
24
-if ( is_array( $posts ) && ! empty( $posts ) ) : ?>
24
+if (is_array($posts) && ! empty($posts)) : ?>
25 25
 
26
-<h3 class="tribe-events-related-events-title"><?php printf( __( 'Related %s', 'lsx' ), tribe_get_event_label_plural() ); ?></h3>
26
+<h3 class="tribe-events-related-events-title"><?php printf(__('Related %s', 'lsx'), tribe_get_event_label_plural()); ?></h3>
27 27
 
28 28
 <ul class="tribe-related-events tribe-clearfix">
29
-	<?php foreach ( $posts as $post ) : ?>
29
+	<?php foreach ($posts as $post) : ?>
30 30
 	<li>
31
-		<?php $thumb = ( has_post_thumbnail( $post->ID ) ) ? get_the_post_thumbnail( $post->ID, 'large' ) : '<img src="' . esc_url( trailingslashit( Tribe__Events__Pro__Main::instance()->pluginUrl ) . 'src/resources/images/tribe-related-events-placeholder.png' ) . '" alt="' . esc_attr( get_the_title( $post->ID ) ) . '" />'; ?>
31
+		<?php $thumb = (has_post_thumbnail($post->ID)) ? get_the_post_thumbnail($post->ID, 'large') : '<img src="' . esc_url(trailingslashit(Tribe__Events__Pro__Main::instance()->pluginUrl) . 'src/resources/images/tribe-related-events-placeholder.png') . '" alt="' . esc_attr(get_the_title($post->ID)) . '" />'; ?>
32 32
 		<div class="tribe-related-events-thumbnail">
33
-			<a href="<?php echo esc_url( tribe_get_event_link( $post ) ); ?>" class="url" rel="bookmark"><?php echo $thumb ?></a>
33
+			<a href="<?php echo esc_url(tribe_get_event_link($post)); ?>" class="url" rel="bookmark"><?php echo $thumb ?></a>
34 34
 		</div>
35 35
 		<div class="tribe-related-event-info">
36
-			<h3 class="tribe-related-events-title"><a href="<?php echo tribe_get_event_link( $post ); ?>" class="tribe-event-url" rel="bookmark"><?php echo get_the_title( $post->ID ); ?></a></h3>
36
+			<h3 class="tribe-related-events-title"><a href="<?php echo tribe_get_event_link($post); ?>" class="tribe-event-url" rel="bookmark"><?php echo get_the_title($post->ID); ?></a></h3>
37 37
 			<?php
38
-				if ( $post->post_type == Tribe__Events__Main::POSTTYPE ) {
39
-					echo tribe_events_event_schedule_details( $post );
38
+				if ($post->post_type == Tribe__Events__Main::POSTTYPE) {
39
+					echo tribe_events_event_schedule_details($post);
40 40
 				}
41 41
 			?>
42
-			<a href="<?php echo esc_url( tribe_get_event_link( $post ) ); ?>" class="moretag"><?php esc_html_e( 'View event', 'lsx' ); ?></a>
42
+			<a href="<?php echo esc_url(tribe_get_event_link($post)); ?>" class="moretag"><?php esc_html_e('View event', 'lsx'); ?></a>
43 43
 		</div>
44 44
 	</li>
45 45
 	<?php endforeach; ?>
Please login to merge, or discard this patch.
tribe-events/day/single-event.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -9,76 +9,76 @@
 block discarded – undo
9 9
  *
10 10
  */
11 11
 
12
-if ( ! defined( 'ABSPATH' ) ) {
13
-	die( '-1' );
12
+if ( ! defined('ABSPATH')) {
13
+	die('-1');
14 14
 }
15 15
 
16 16
 $venue_details = tribe_get_venue_details();
17 17
 
18 18
 // Venue microformats
19
-$has_venue         = ( $venue_details ) ? ' vcard' : '';
20
-$has_venue_address = ( ! empty( $venue_details['address'] ) ) ? ' location' : '';
19
+$has_venue         = ($venue_details) ? ' vcard' : '';
20
+$has_venue_address = ( ! empty($venue_details['address'])) ? ' location' : '';
21 21
 
22 22
 // The address string via tribe_get_venue_details will often be populated even when there's
23 23
 // no address, so let's get the address string on its own for a couple of checks below.
24 24
 $venue_address = tribe_get_address();
25 25
 
26 26
 // Event Image
27
-echo tribe_event_featured_image( null, 'medium' );
27
+echo tribe_event_featured_image(null, 'medium');
28 28
 ?>
29 29
 
30 30
 <div class="tribe-events-event-content">
31 31
 	<!-- Event Title -->
32
-	<?php do_action( 'tribe_events_before_the_event_title' ) ?>
32
+	<?php do_action('tribe_events_before_the_event_title') ?>
33 33
 	<h2 class="tribe-events-list-event-title summary">
34
-		<a class="url" href="<?php echo esc_url( tribe_get_event_link() ); ?>" title="<?php the_title_attribute() ?>" rel="bookmark">
34
+		<a class="url" href="<?php echo esc_url(tribe_get_event_link()); ?>" title="<?php the_title_attribute() ?>" rel="bookmark">
35 35
 			<?php the_title() ?>
36 36
 		</a>
37 37
 	</h2>
38
-	<?php do_action( 'tribe_events_after_the_event_title' ) ?>
38
+	<?php do_action('tribe_events_after_the_event_title') ?>
39 39
 
40 40
 	<!-- Event Meta -->
41
-	<?php do_action( 'tribe_events_before_the_meta' ) ?>
42
-	<div class="tribe-events-event-meta <?php echo esc_attr( $has_venue . $has_venue_address ); ?>">
41
+	<?php do_action('tribe_events_before_the_meta') ?>
42
+	<div class="tribe-events-event-meta <?php echo esc_attr($has_venue . $has_venue_address); ?>">
43 43
 
44 44
 		<!-- Schedule & Recurrence Details -->
45 45
 		<div class="tribe-updated published time-details">
46 46
 			<?php echo tribe_events_event_schedule_details(); ?>
47 47
 		</div>
48 48
 
49
-		<?php if ( $venue_details ) : ?>
49
+		<?php if ($venue_details) : ?>
50 50
 			<!-- Venue Display Info -->
51 51
 			<div class="tribe-events-venue-details">
52 52
 			<?php
53
-				$address_delimiter = empty( $venue_address ) ? ' ' : ', ';
53
+				$address_delimiter = empty($venue_address) ? ' ' : ', ';
54 54
 
55 55
 				// These details are already escaped in various ways earlier in the code.
56
-				echo implode( $address_delimiter, $venue_details );
56
+				echo implode($address_delimiter, $venue_details);
57 57
 			?>
58 58
 			</div> <!-- .tribe-events-venue-details -->
59 59
 		<?php endif; ?>
60 60
 
61 61
 	</div><!-- .tribe-events-event-meta -->
62 62
 
63
-	<?php if ( tribe_get_cost() ) : ?>
63
+	<?php if (tribe_get_cost()) : ?>
64 64
 		<div class="tribe-events-event-cost">
65
-			<?php esc_html_e( 'Price:', 'lsx' ) ?>
66
-			<span class="ticket-cost"><?php echo tribe_get_cost( null, true ); ?></span>
65
+			<?php esc_html_e('Price:', 'lsx') ?>
66
+			<span class="ticket-cost"><?php echo tribe_get_cost(null, true); ?></span>
67 67
 			<?php
68 68
 			/** This action is documented in the-events-calendar/src/views/list/single-event.php */
69
-			do_action( 'tribe_events_inside_cost' )
69
+			do_action('tribe_events_inside_cost')
70 70
 			?>
71 71
 		</div>
72 72
 	<?php endif; ?>
73 73
 
74
-	<?php do_action( 'tribe_events_after_the_meta' ) ?>
74
+	<?php do_action('tribe_events_after_the_meta') ?>
75 75
 
76 76
 	<!-- Event Content -->
77
-	<?php do_action( 'tribe_events_before_the_content' ) ?>
77
+	<?php do_action('tribe_events_before_the_content') ?>
78 78
 	<div class="tribe-events-list-event-description tribe-events-content description entry-summary">
79 79
 		<?php echo tribe_events_get_the_excerpt(); ?>
80
-		<a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e( 'Find out more', 'lsx' ) ?></a>
80
+		<a href="<?php echo esc_url(tribe_get_event_link()); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e('Find out more', 'lsx') ?></a>
81 81
 	</div><!-- .tribe-events-list-event-description -->
82 82
 
83
-	<?php do_action( 'tribe_events_after_the_content' ); ?>
83
+	<?php do_action('tribe_events_after_the_content'); ?>
84 84
 </div>
Please login to merge, or discard this patch.
tribe-events/day/single-featured.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -9,66 +9,66 @@
 block discarded – undo
9 9
  *
10 10
  */
11 11
 
12
-if ( ! defined( 'ABSPATH' ) ) {
13
-	die( '-1' );
12
+if ( ! defined('ABSPATH')) {
13
+	die('-1');
14 14
 }
15 15
 
16 16
 $venue_details = tribe_get_venue_details();
17 17
 
18 18
 // Venue microformats
19
-$has_venue = ( $venue_details ) ? ' vcard' : '';
20
-$has_venue_address = ( ! empty( $venue_details['address'] ) ) ? ' location' : '';
19
+$has_venue = ($venue_details) ? ' vcard' : '';
20
+$has_venue_address = ( ! empty($venue_details['address'])) ? ' location' : '';
21 21
 
22 22
 // Event Image
23
-echo tribe_event_featured_image( null, 'large' );
23
+echo tribe_event_featured_image(null, 'large');
24 24
 ?>
25 25
 
26 26
 <div class="tribe-events-event-content">
27 27
 	<!-- Event Title -->
28
-	<?php do_action( 'tribe_events_before_the_event_title' ) ?>
28
+	<?php do_action('tribe_events_before_the_event_title') ?>
29 29
 	<h2 class="tribe-events-list-event-title summary">
30
-		<a class="url" href="<?php echo esc_url( tribe_get_event_link() ); ?>" title="<?php the_title_attribute() ?>" rel="bookmark">
30
+		<a class="url" href="<?php echo esc_url(tribe_get_event_link()); ?>" title="<?php the_title_attribute() ?>" rel="bookmark">
31 31
 			<?php the_title() ?>
32 32
 		</a>
33 33
 	</h2>
34
-	<?php do_action( 'tribe_events_after_the_event_title' ) ?>
34
+	<?php do_action('tribe_events_after_the_event_title') ?>
35 35
 
36 36
 	<!-- Event Meta -->
37
-	<?php do_action( 'tribe_events_before_the_meta' ) ?>
38
-	<div class="tribe-events-event-meta <?php echo esc_attr( $has_venue . $has_venue_address ); ?>">
37
+	<?php do_action('tribe_events_before_the_meta') ?>
38
+	<div class="tribe-events-event-meta <?php echo esc_attr($has_venue . $has_venue_address); ?>">
39 39
 
40 40
 		<!-- Schedule & Recurrence Details -->
41 41
 		<div class="tribe-updated published time-details">
42 42
 			<?php echo tribe_events_event_schedule_details(); ?>
43 43
 		</div>
44 44
 
45
-		<?php if ( $venue_details ) : ?>
45
+		<?php if ($venue_details) : ?>
46 46
 			<!-- Venue Display Info -->
47 47
 			<div class="tribe-events-venue-details">
48
-				<?php echo implode( ', ', $venue_details ); ?>
48
+				<?php echo implode(', ', $venue_details); ?>
49 49
 			</div> <!-- .tribe-events-venue-details -->
50 50
 		<?php endif; ?>
51 51
 
52 52
 	</div><!-- .tribe-events-event-meta -->
53
-	<?php do_action( 'tribe_events_after_the_meta' ) ?>
53
+	<?php do_action('tribe_events_after_the_meta') ?>
54 54
 
55
-	<?php if ( tribe_get_cost() ) : ?>
55
+	<?php if (tribe_get_cost()) : ?>
56 56
 		<div class="tribe-events-event-cost">
57
-			<?php esc_html_e( 'Price:', 'lsx' ) ?>
58
-			<span class="ticket-cost"><?php echo tribe_get_cost( null, true ); ?></span>
57
+			<?php esc_html_e('Price:', 'lsx') ?>
58
+			<span class="ticket-cost"><?php echo tribe_get_cost(null, true); ?></span>
59 59
 			<?php
60 60
 			/** This action is documented in the-events-calendar/src/views/list/single-event.php */
61
-			do_action( 'tribe_events_inside_cost' )
61
+			do_action('tribe_events_inside_cost')
62 62
 			?>
63 63
 		</div>
64 64
 	<?php endif; ?>
65 65
 
66 66
 	<!-- Event Content -->
67
-	<?php do_action( 'tribe_events_before_the_content' ) ?>
67
+	<?php do_action('tribe_events_before_the_content') ?>
68 68
 	<div class="tribe-events-list-event-description tribe-events-content description entry-summary">
69 69
 		<?php echo tribe_events_get_the_excerpt(); ?>
70
-		<a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e( 'Find out more', 'lsx' ) ?></a>
70
+		<a href="<?php echo esc_url(tribe_get_event_link()); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e('Find out more', 'lsx') ?></a>
71 71
 	</div><!-- .tribe-events-list-event-description -->
72 72
 
73
-	<?php do_action( 'tribe_events_after_the_content' ); ?>
73
+	<?php do_action('tribe_events_after_the_content'); ?>
74 74
 </div>
Please login to merge, or discard this patch.