Passed
Push — master ( c01f8c...f9da99 )
by Warwick
02:44
created
includes/plugins/the-events-calendar.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage the-events-calendar
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_tec_scripts_add_styles' ) ) :
13
+if ( ! function_exists('lsx_tec_scripts_add_styles')) :
14 14
 
15 15
 	/**
16 16
 	 * The Events Calendar enqueue styles.
@@ -19,15 +19,15 @@  discard block
 block discarded – undo
19 19
 	 * @subpackage the-events-calendar
20 20
 	 */
21 21
 	function lsx_tec_scripts_add_styles() {
22
-		wp_enqueue_style( 'the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar.css', array( 'lsx_main' ), LSX_VERSION );
23
-		wp_style_add_data( 'the-events-calendar-lsx', 'rtl', 'replace' );
22
+		wp_enqueue_style('the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar.css', array('lsx_main'), LSX_VERSION);
23
+		wp_style_add_data('the-events-calendar-lsx', 'rtl', 'replace');
24 24
 	}
25 25
 
26
-	add_action( 'wp_enqueue_scripts', 'lsx_tec_scripts_add_styles' );
26
+	add_action('wp_enqueue_scripts', 'lsx_tec_scripts_add_styles');
27 27
 
28 28
 endif;
29 29
 
30
-if ( ! function_exists( 'lsx_tec_theme_wrapper_start' ) ) :
30
+if ( ! function_exists('lsx_tec_theme_wrapper_start')) :
31 31
 
32 32
 	/**
33 33
 	 * The Events Calendar wrapper start.
@@ -37,17 +37,17 @@  discard block
 block discarded – undo
37 37
 	 */
38 38
 	function lsx_tec_theme_wrapper_start() {
39 39
 		lsx_content_wrap_before();
40
-		echo '<div id="primary" class="content-area ' . esc_attr( lsx_main_class() ) . '">';
40
+		echo '<div id="primary" class="content-area ' . esc_attr(lsx_main_class()) . '">';
41 41
 		lsx_content_before();
42 42
 		echo '<main id="main" class="site-main" role="main">';
43 43
 		lsx_content_top();
44 44
 	}
45 45
 
46
-	add_action( 'tribe_events_before_html', 'lsx_tec_theme_wrapper_start', 9 );
46
+	add_action('tribe_events_before_html', 'lsx_tec_theme_wrapper_start', 9);
47 47
 
48 48
 endif;
49 49
 
50
-if ( ! function_exists( 'lsx_tec_theme_wrapper_end' ) ) :
50
+if ( ! function_exists('lsx_tec_theme_wrapper_end')) :
51 51
 
52 52
 	/**
53 53
 	 * The Events Calendar wrapper end.
@@ -63,11 +63,11 @@  discard block
 block discarded – undo
63 63
 		lsx_content_wrap_after();
64 64
 	}
65 65
 
66
-	add_action( 'tribe_events_after_html', 'lsx_tec_theme_wrapper_end', 11 );
66
+	add_action('tribe_events_after_html', 'lsx_tec_theme_wrapper_end', 11);
67 67
 
68 68
 endif;
69 69
 
70
-if ( ! function_exists( 'lsx_tec_global_header_title' ) ) :
70
+if ( ! function_exists('lsx_tec_global_header_title')) :
71 71
 
72 72
 	/**
73 73
 	 * Move the events title into the global header
@@ -75,97 +75,97 @@  discard block
 block discarded – undo
75 75
 	 * @package    lsx
76 76
 	 * @subpackage the-events-calendar
77 77
 	 */
78
-	function lsx_tec_global_header_title( $title ) {
78
+	function lsx_tec_global_header_title($title) {
79 79
 
80
-		if ( tribe_is_community_edit_event_page() ) {
80
+		if (tribe_is_community_edit_event_page()) {
81 81
 
82
-			$is_route = get_query_var( 'WP_Route' );
83
-			switch ( $is_route ) {
82
+			$is_route = get_query_var('WP_Route');
83
+			switch ($is_route) {
84 84
 				case 'ce-edit-route':
85
-					$title = apply_filters( 'tribe_ce_edit_event_page_title', __( 'Edit an Event', 'lsx' ) );
85
+					$title = apply_filters('tribe_ce_edit_event_page_title', __('Edit an Event', 'lsx'));
86 86
 					break;
87 87
 
88 88
 				case 'ce-edit-organizer-route':
89
-					$title = __( 'Edit an Organizer', 'lsx' );
89
+					$title = __('Edit an Organizer', 'lsx');
90 90
 					break;
91 91
 
92 92
 				case 'ce-edit-venue-route':
93
-					$title = __( 'Edit a Venue', 'lsx' );
93
+					$title = __('Edit a Venue', 'lsx');
94 94
 					break;
95 95
 
96 96
 				default:
97
-					$title = apply_filters( 'tribe_ce_submit_event_page_title', __( 'Submit an Event', 'lsx' ) );
97
+					$title = apply_filters('tribe_ce_submit_event_page_title', __('Submit an Event', 'lsx'));
98 98
 					break;
99 99
 			}
100
-		} else if ( tribe_is_community_my_events_page() ) {
101
-			$title = apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) );
102
-		} else if ( tribe_is_event() ) {
100
+		} else if (tribe_is_community_my_events_page()) {
101
+			$title = apply_filters('tribe_ce_submit_event_page_title', __('My Events', 'lsx'));
102
+		} else if (tribe_is_event()) {
103 103
 			$title = tribe_get_events_title();
104 104
 		}
105 105
 
106 106
 		//Only disable the title after we have retrieved it
107
-		add_filter( 'tribe_get_events_title', 'lsx_text_disable_body_title', 200, 1 );
107
+		add_filter('tribe_get_events_title', 'lsx_text_disable_body_title', 200, 1);
108 108
 
109
-		if ( is_singular( 'tribe_events' ) ) {
110
-			add_filter( 'the_title', 'lsx_text_disable_body_title', 200, 1 );
109
+		if (is_singular('tribe_events')) {
110
+			add_filter('the_title', 'lsx_text_disable_body_title', 200, 1);
111 111
 		}
112 112
 		return $title;
113 113
 	}
114
-	add_filter( 'lsx_global_header_title', 'lsx_tec_global_header_title', 200, 1 );
114
+	add_filter('lsx_global_header_title', 'lsx_tec_global_header_title', 200, 1);
115 115
 
116 116
 endif;
117 117
 
118
-if ( ! function_exists( 'lsx_text_disable_body_title' ) ) :
118
+if ( ! function_exists('lsx_text_disable_body_title')) :
119 119
 	/**
120 120
 	 * Disable the events title for the post archive if the dynamic setting is active.
121 121
 	 * @param $title
122 122
 	 *
123 123
 	 * @return string
124 124
 	 */
125
-	function lsx_text_disable_body_title( $title ) {
125
+	function lsx_text_disable_body_title($title) {
126 126
 		$title = '';
127 127
 		return $title;
128 128
 	}
129 129
 
130 130
 endif;
131 131
 
132
-if ( ! function_exists( 'lsx_tec_breadcrumb_filter' ) ) :
132
+if ( ! function_exists('lsx_tec_breadcrumb_filter')) :
133 133
 	/**
134 134
 	 * Fixes the community events breadcrumb
135 135
 	 *
136 136
 	 * @package    lsx
137 137
 	 * @subpackage the-events-calendar
138 138
 	 */
139
-	function lsx_tec_breadcrumb_filter( $crumbs ) {
139
+	function lsx_tec_breadcrumb_filter($crumbs) {
140 140
 
141
-		if ( tribe_is_venue() || tribe_is_organizer() || tribe_is_community_edit_event_page() || tribe_is_community_my_events_page() ) {
141
+		if (tribe_is_venue() || tribe_is_organizer() || tribe_is_community_edit_event_page() || tribe_is_community_my_events_page()) {
142 142
 			$new_crumbs = array();
143 143
 			$new_crumbs[0] = $crumbs[0];
144 144
 
145
-			if ( function_exists( 'woocommerce_breadcrumb' ) ) {
145
+			if (function_exists('woocommerce_breadcrumb')) {
146 146
 				$new_crumbs[1] = array(
147
-					0	=> __( 'Events', 'lsx' ),
148
-					1	=> get_post_type_archive_link( 'tribe_events' ),
147
+					0	=> __('Events', 'lsx'),
148
+					1	=> get_post_type_archive_link('tribe_events'),
149 149
 				);
150 150
 			} else {
151 151
 				$new_crumbs[1] = array(
152
-					'text'	=> __( 'Events', 'lsx' ),
153
-					'url'	=> get_post_type_archive_link( 'tribe_events' ),
152
+					'text'	=> __('Events', 'lsx'),
153
+					'url'	=> get_post_type_archive_link('tribe_events'),
154 154
 				);
155 155
 			}
156 156
 
157
-			if ( tribe_is_community_my_events_page() ) {
157
+			if (tribe_is_community_my_events_page()) {
158 158
 				$new_crumbs[2] = $crumbs[2];
159
-			} else if ( tribe_is_community_edit_event_page() ) {
159
+			} else if (tribe_is_community_edit_event_page()) {
160 160
 
161
-				if ( function_exists( 'woocommerce_breadcrumb' ) ) {
161
+				if (function_exists('woocommerce_breadcrumb')) {
162 162
 					$new_crumbs[2] = array(
163
-						0	=> apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ),
163
+						0	=> apply_filters('tribe_ce_submit_event_page_title', __('My Events', 'lsx')),
164 164
 						1	=> tribe_community_events_list_events_link( ),
165 165
 					);
166 166
 				} else {
167 167
 					$new_crumbs[2] = array(
168
-						'text'	=> apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ),
168
+						'text'	=> apply_filters('tribe_ce_submit_event_page_title', __('My Events', 'lsx')),
169 169
 						'url'	=> tribe_community_events_list_events_link( ),
170 170
 					);
171 171
 				}
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 		}
179 179
 		return $crumbs;
180 180
 	}
181
-	add_filter( 'wpseo_breadcrumb_links', 'lsx_tec_breadcrumb_filter', 30, 1 );
182
-	add_filter( 'woocommerce_get_breadcrumb', 'lsx_tec_breadcrumb_filter', 30, 1 );
181
+	add_filter('wpseo_breadcrumb_links', 'lsx_tec_breadcrumb_filter', 30, 1);
182
+	add_filter('woocommerce_get_breadcrumb', 'lsx_tec_breadcrumb_filter', 30, 1);
183 183
 
184 184
 endif;
Please login to merge, or discard this patch.