@@ -6,11 +6,11 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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,28 +75,28 @@ discard block |
||
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 | $title = tribe_get_events_title(); |
80 | 80 | //Only disable the title after we have retrieved it |
81 | - add_filter( 'tribe_get_events_title', 'lsx_text_disable_body_title', 200, 1 ); |
|
82 | - if ( is_singular( 'tribe_events' ) ) { |
|
83 | - add_filter( 'the_title', 'lsx_text_disable_body_title', 200, 1 ); |
|
81 | + add_filter('tribe_get_events_title', 'lsx_text_disable_body_title', 200, 1); |
|
82 | + if (is_singular('tribe_events')) { |
|
83 | + add_filter('the_title', 'lsx_text_disable_body_title', 200, 1); |
|
84 | 84 | } |
85 | 85 | return $title; |
86 | 86 | } |
87 | - add_filter( 'lsx_global_header_title', 'lsx_tec_global_header_title', 200, 1 ); |
|
87 | + add_filter('lsx_global_header_title', 'lsx_tec_global_header_title', 200, 1); |
|
88 | 88 | |
89 | 89 | endif; |
90 | 90 | |
91 | -if ( ! function_exists( 'lsx_text_disable_body_title' ) ) : |
|
91 | +if ( ! function_exists('lsx_text_disable_body_title')) : |
|
92 | 92 | /** |
93 | 93 | * Disable the events title for the post archive if the dynamic setting is active. |
94 | 94 | * @param $title |
95 | 95 | * |
96 | 96 | * @return string |
97 | 97 | */ |
98 | - function lsx_text_disable_body_title ( $title ) { |
|
99 | - if ( ! class_exists( 'LSX_Banners' ) ) { |
|
98 | + function lsx_text_disable_body_title($title) { |
|
99 | + if ( ! class_exists('LSX_Banners')) { |
|
100 | 100 | $title = ''; |
101 | 101 | } |
102 | 102 | return $title; |
@@ -104,28 +104,28 @@ discard block |
||
104 | 104 | |
105 | 105 | endif; |
106 | 106 | |
107 | -if ( ! function_exists( 'lsx_tec_breadcrumb_filter' ) ) : |
|
107 | +if ( ! function_exists('lsx_tec_breadcrumb_filter')) : |
|
108 | 108 | /** |
109 | 109 | * Fixes the community events breadcrumb |
110 | 110 | * |
111 | 111 | * @package lsx |
112 | 112 | * @subpackage the-events-calendar |
113 | 113 | */ |
114 | - function lsx_tec_breadcrumb_filter( $crumbs ) { |
|
114 | + function lsx_tec_breadcrumb_filter($crumbs) { |
|
115 | 115 | |
116 | - if ( tribe_is_venue() || tribe_is_organizer() || tribe_is_community_edit_event_page() || tribe_is_community_my_events_page() ) { |
|
116 | + if (tribe_is_venue() || tribe_is_organizer() || tribe_is_community_edit_event_page() || tribe_is_community_my_events_page()) { |
|
117 | 117 | $new_crumbs = array(); |
118 | 118 | $new_crumbs[0] = $crumbs[0]; |
119 | 119 | |
120 | - if ( function_exists( 'woocommerce_breadcrumb' ) ) { |
|
120 | + if (function_exists('woocommerce_breadcrumb')) { |
|
121 | 121 | $new_crumbs[1] = array( |
122 | 122 | 0 => 'Events', |
123 | - 1 => get_post_type_archive_link( 'tribe_events' ), |
|
123 | + 1 => get_post_type_archive_link('tribe_events'), |
|
124 | 124 | ); |
125 | 125 | } else { |
126 | 126 | $new_crumbs[1] = array( |
127 | 127 | 'text' => 'Events', |
128 | - 'url' => get_post_type_archive_link( 'tribe_events' ), |
|
128 | + 'url' => get_post_type_archive_link('tribe_events'), |
|
129 | 129 | ); |
130 | 130 | } |
131 | 131 | $new_crumbs[2] = $crumbs[1]; |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | } |
134 | 134 | return $crumbs; |
135 | 135 | } |
136 | - add_filter( 'wpseo_breadcrumb_links', 'lsx_tec_breadcrumb_filter', 30, 1 ); |
|
137 | - add_filter( 'woocommerce_get_breadcrumb', 'lsx_tec_breadcrumb_filter', 30, 1 ); |
|
136 | + add_filter('wpseo_breadcrumb_links', 'lsx_tec_breadcrumb_filter', 30, 1); |
|
137 | + add_filter('woocommerce_get_breadcrumb', 'lsx_tec_breadcrumb_filter', 30, 1); |
|
138 | 138 | |
139 | 139 | endif; |