@@ -6,11 +6,11 @@ discard block |
||
| 6 | 6 | * @subpackage layout |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 9 | +if ( ! defined('ABSPATH')) { |
|
| 10 | 10 | exit; |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | -if ( ! function_exists( 'lsx_layout_selector' ) ) : |
|
| 13 | +if ( ! function_exists('lsx_layout_selector')) : |
|
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * Layout selector. |
@@ -18,14 +18,14 @@ discard block |
||
| 18 | 18 | * @package lsx |
| 19 | 19 | * @subpackage layout |
| 20 | 20 | */ |
| 21 | - function lsx_layout_selector( $class, $area = 'site' ) { |
|
| 21 | + function lsx_layout_selector($class, $area = 'site') { |
|
| 22 | 22 | $return_class = ''; |
| 23 | - $layout = get_theme_mod( 'lsx_layout', '2cr' ); |
|
| 24 | - $layout = apply_filters( 'lsx_layout', $layout ); |
|
| 23 | + $layout = get_theme_mod('lsx_layout', '2cr'); |
|
| 24 | + $layout = apply_filters('lsx_layout', $layout); |
|
| 25 | 25 | $default_size = 'sm'; |
| 26 | - $size = apply_filters( 'lsx_bootstrap_column_size', $default_size ); |
|
| 26 | + $size = apply_filters('lsx_bootstrap_column_size', $default_size); |
|
| 27 | 27 | |
| 28 | - switch ( $layout ) { |
|
| 28 | + switch ($layout) { |
|
| 29 | 29 | case '1c': |
| 30 | 30 | $main_class = 'col-' . $size . '-12'; |
| 31 | 31 | $sidebar_class = 'col-' . $size . '-12'; |
@@ -44,12 +44,12 @@ discard block |
||
| 44 | 44 | break; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - if ( 'main' === $class ) { |
|
| 48 | - $return_class = apply_filters( 'lsx_layout_selector', $main_class, $class, $layout, $size ); |
|
| 47 | + if ('main' === $class) { |
|
| 48 | + $return_class = apply_filters('lsx_layout_selector', $main_class, $class, $layout, $size); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - if ( 'sidebar' === $class ) { |
|
| 52 | - $return_class = apply_filters( 'lsx_layout_selector', $sidebar_class, $class, $layout, $size ); |
|
| 51 | + if ('sidebar' === $class) { |
|
| 52 | + $return_class = apply_filters('lsx_layout_selector', $sidebar_class, $class, $layout, $size); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | return $return_class; |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | endif; |
| 59 | 59 | |
| 60 | -if ( ! function_exists( 'lsx_main_class' ) ) : |
|
| 60 | +if ( ! function_exists('lsx_main_class')) : |
|
| 61 | 61 | |
| 62 | 62 | /** |
| 63 | 63 | * .main classes. |
@@ -66,12 +66,12 @@ discard block |
||
| 66 | 66 | * @subpackage layout |
| 67 | 67 | */ |
| 68 | 68 | function lsx_main_class() { |
| 69 | - return lsx_layout_selector( 'main' ); |
|
| 69 | + return lsx_layout_selector('main'); |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | endif; |
| 73 | 73 | |
| 74 | -if ( ! function_exists( 'lsx_sidebar_class' ) ) : |
|
| 74 | +if ( ! function_exists('lsx_sidebar_class')) : |
|
| 75 | 75 | |
| 76 | 76 | /** |
| 77 | 77 | * .sidebar classes. |
@@ -80,12 +80,12 @@ discard block |
||
| 80 | 80 | * @subpackage layout |
| 81 | 81 | */ |
| 82 | 82 | function lsx_sidebar_class() { |
| 83 | - return lsx_layout_selector( 'sidebar' ); |
|
| 83 | + return lsx_layout_selector('sidebar'); |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | endif; |
| 87 | 87 | |
| 88 | -if ( ! function_exists( 'lsx_header_classes' ) ) : |
|
| 88 | +if ( ! function_exists('lsx_header_classes')) : |
|
| 89 | 89 | |
| 90 | 90 | /** |
| 91 | 91 | * Output the classes for the header. |
@@ -93,19 +93,19 @@ discard block |
||
| 93 | 93 | * @package lsx |
| 94 | 94 | * @subpackage layout |
| 95 | 95 | */ |
| 96 | - function lsx_header_classes( $additional = false ) { |
|
| 96 | + function lsx_header_classes($additional = false) { |
|
| 97 | 97 | $classes = 'banner navbar navbar-default'; |
| 98 | 98 | |
| 99 | - if ( false !== $additional ) { |
|
| 99 | + if (false !== $additional) { |
|
| 100 | 100 | $classes .= ' ' . $additional; |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - echo esc_attr( $classes ); |
|
| 103 | + echo esc_attr($classes); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | endif; |
| 107 | 107 | |
| 108 | -if ( ! function_exists( 'lsx_top_menu_classes' ) ) : |
|
| 108 | +if ( ! function_exists('lsx_top_menu_classes')) : |
|
| 109 | 109 | |
| 110 | 110 | /** |
| 111 | 111 | * Output the classes for the top-menu. |
@@ -113,19 +113,19 @@ discard block |
||
| 113 | 113 | * @package lsx |
| 114 | 114 | * @subpackage layout |
| 115 | 115 | */ |
| 116 | - function lsx_top_menu_classes( $additional = false ) { |
|
| 116 | + function lsx_top_menu_classes($additional = false) { |
|
| 117 | 117 | $classes = 'top-menu-default'; |
| 118 | 118 | |
| 119 | - if ( false !== $additional ) { |
|
| 119 | + if (false !== $additional) { |
|
| 120 | 120 | $classes .= ' ' . $additional; |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | - echo esc_attr( $classes ); |
|
| 123 | + echo esc_attr($classes); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | endif; |
| 127 | 127 | |
| 128 | -if ( ! function_exists( 'lsx_add_footer_sidebar_area' ) ) : |
|
| 128 | +if ( ! function_exists('lsx_add_footer_sidebar_area')) : |
|
| 129 | 129 | |
| 130 | 130 | /** |
| 131 | 131 | * Output the Footer CTA and/pr Footer Widgets. |
@@ -134,34 +134,34 @@ discard block |
||
| 134 | 134 | * @subpackage layout |
| 135 | 135 | */ |
| 136 | 136 | function lsx_add_footer_sidebar_area() { |
| 137 | - if ( is_active_sidebar( 'sidebar-footer-cta' ) ) : ?> |
|
| 137 | + if (is_active_sidebar('sidebar-footer-cta')) : ?> |
|
| 138 | 138 | <div id="footer-cta"> |
| 139 | 139 | <div class="container"> |
| 140 | 140 | <div class="lsx-full-width"> |
| 141 | 141 | <div class="lsx-hero-unit"> |
| 142 | - <?php dynamic_sidebar( 'sidebar-footer-cta' ); ?> |
|
| 142 | + <?php dynamic_sidebar('sidebar-footer-cta'); ?> |
|
| 143 | 143 | </div> |
| 144 | 144 | </div> |
| 145 | 145 | </div> |
| 146 | 146 | </div> |
| 147 | 147 | <?php endif; ?> |
| 148 | 148 | |
| 149 | - <?php if ( is_active_sidebar( 'sidebar-footer' ) ) : ?> |
|
| 149 | + <?php if (is_active_sidebar('sidebar-footer')) : ?> |
|
| 150 | 150 | <div id="footer-widgets"> |
| 151 | 151 | <div class="container"> |
| 152 | 152 | <div class="row"> |
| 153 | - <?php dynamic_sidebar( 'sidebar-footer' ); ?> |
|
| 153 | + <?php dynamic_sidebar('sidebar-footer'); ?> |
|
| 154 | 154 | </div> |
| 155 | 155 | </div> |
| 156 | 156 | </div> |
| 157 | 157 | <?php endif; |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | - add_action( 'lsx_footer_before', 'lsx_add_footer_sidebar_area' ); |
|
| 160 | + add_action('lsx_footer_before', 'lsx_add_footer_sidebar_area'); |
|
| 161 | 161 | |
| 162 | 162 | endif; |
| 163 | 163 | |
| 164 | -if ( ! function_exists( 'lsx_global_header' ) ) : |
|
| 164 | +if ( ! function_exists('lsx_global_header')) : |
|
| 165 | 165 | |
| 166 | 166 | /** |
| 167 | 167 | * Displays the global header. |
@@ -170,21 +170,21 @@ discard block |
||
| 170 | 170 | * @subpackage layout |
| 171 | 171 | */ |
| 172 | 172 | function lsx_global_header() { |
| 173 | - $show_on_front = get_option( 'show_on_front' ); |
|
| 173 | + $show_on_front = get_option('show_on_front'); |
|
| 174 | 174 | $queried_object = get_queried_object(); |
| 175 | 175 | $default_size = 'sm'; |
| 176 | - $size = apply_filters( 'lsx_bootstrap_column_size', $default_size ); |
|
| 176 | + $size = apply_filters('lsx_bootstrap_column_size', $default_size); |
|
| 177 | 177 | |
| 178 | - if ( true === apply_filters( 'lsx_global_header_disable', false ) ) : |
|
| 178 | + if (true === apply_filters('lsx_global_header_disable', false)) : |
|
| 179 | 179 | // Display only the breadcrumbs |
| 180 | 180 | ?> |
| 181 | - <div class="archive-header-wrapper col-<?php echo esc_attr( $size ); ?>-12"> |
|
| 181 | + <div class="archive-header-wrapper col-<?php echo esc_attr($size); ?>-12"> |
|
| 182 | 182 | <?php lsx_global_header_inner_bottom(); ?> |
| 183 | 183 | </div> |
| 184 | 184 | <?php |
| 185 | - elseif ( is_page() && ( 'page' !== $show_on_front || ! is_front_page() ) ) : |
|
| 185 | + elseif (is_page() && ('page' !== $show_on_front || ! is_front_page())) : |
|
| 186 | 186 | ?> |
| 187 | - <div class="archive-header-wrapper col-<?php echo esc_attr( $size ); ?>-12"> |
|
| 187 | + <div class="archive-header-wrapper col-<?php echo esc_attr($size); ?>-12"> |
|
| 188 | 188 | <?php lsx_global_header_inner_bottom(); ?> |
| 189 | 189 | <header class="archive-header"> |
| 190 | 190 | <h1 class="archive-title"><?php the_title(); ?></h1> |
@@ -192,9 +192,9 @@ discard block |
||
| 192 | 192 | |
| 193 | 193 | </div> |
| 194 | 194 | <?php |
| 195 | - elseif ( is_single() && ! is_singular( 'post' ) ) : |
|
| 195 | + elseif (is_single() && ! is_singular('post')) : |
|
| 196 | 196 | ?> |
| 197 | - <div class="archive-header-wrapper col-<?php echo esc_attr( $size ); ?>-12"> |
|
| 197 | + <div class="archive-header-wrapper col-<?php echo esc_attr($size); ?>-12"> |
|
| 198 | 198 | <?php lsx_global_header_inner_bottom(); ?> |
| 199 | 199 | <header class="archive-header"> |
| 200 | 200 | <h1 class="archive-title"><?php the_title(); ?></h1> |
@@ -202,16 +202,16 @@ discard block |
||
| 202 | 202 | |
| 203 | 203 | </div> |
| 204 | 204 | <?php |
| 205 | - elseif ( is_search() ) : |
|
| 205 | + elseif (is_search()) : |
|
| 206 | 206 | ?> |
| 207 | - <div class="archive-header-wrapper col-<?php echo esc_attr( $size ); ?>-12"> |
|
| 207 | + <div class="archive-header-wrapper col-<?php echo esc_attr($size); ?>-12"> |
|
| 208 | 208 | <?php lsx_global_header_inner_bottom(); ?> |
| 209 | 209 | <header class="archive-header"> |
| 210 | 210 | <h1 class="archive-title"> |
| 211 | 211 | <?php |
| 212 | 212 | printf( |
| 213 | 213 | /* Translators: %s: search term/query */ |
| 214 | - esc_html__( 'Search Results for: %s', 'lsx' ), |
|
| 214 | + esc_html__('Search Results for: %s', 'lsx'), |
|
| 215 | 215 | '<span>' . get_search_query() . '</span>' |
| 216 | 216 | ); |
| 217 | 217 | ?> |
@@ -220,12 +220,12 @@ discard block |
||
| 220 | 220 | |
| 221 | 221 | </div> |
| 222 | 222 | <?php |
| 223 | - elseif ( is_author() ) : |
|
| 223 | + elseif (is_author()) : |
|
| 224 | 224 | $author = get_the_author(); |
| 225 | - $author_avatar = get_avatar( get_the_author_meta( 'ID' ), 256 ); |
|
| 225 | + $author_avatar = get_avatar(get_the_author_meta('ID'), 256); |
|
| 226 | 226 | $author_bio = get_the_archive_description(); |
| 227 | 227 | ?> |
| 228 | - <div class="archive-header-wrapper col-<?php echo esc_attr( $size ); ?>-12"> |
|
| 228 | + <div class="archive-header-wrapper col-<?php echo esc_attr($size); ?>-12"> |
|
| 229 | 229 | <?php lsx_global_header_inner_bottom(); ?> |
| 230 | 230 | <header class="archive-header"> |
| 231 | 231 | <h1 class="archive-title"><?php the_archive_title(); ?></h1> |
@@ -233,16 +233,16 @@ discard block |
||
| 233 | 233 | |
| 234 | 234 | </div> |
| 235 | 235 | <?php |
| 236 | - elseif ( is_archive() ) : |
|
| 236 | + elseif (is_archive()) : |
|
| 237 | 237 | ?> |
| 238 | - <div class="archive-header-wrapper col-<?php echo esc_attr( $size ); ?>-12"> |
|
| 238 | + <div class="archive-header-wrapper col-<?php echo esc_attr($size); ?>-12"> |
|
| 239 | 239 | <?php lsx_global_header_inner_bottom(); ?> |
| 240 | 240 | <header class="archive-header"> |
| 241 | 241 | <h1 class="archive-title"> |
| 242 | - <?php if ( has_post_format() && ! is_category() && ! is_tag() && ! is_date() && ! is_tax( 'post_format' ) ) { ?> |
|
| 243 | - <?php the_archive_title( esc_html__( 'Type:', 'lsx' ) ); ?> |
|
| 242 | + <?php if (has_post_format() && ! is_category() && ! is_tag() && ! is_date() && ! is_tax('post_format')) { ?> |
|
| 243 | + <?php the_archive_title(esc_html__('Type:', 'lsx')); ?> |
|
| 244 | 244 | <?php } else { ?> |
| 245 | - <?php echo wp_kses_post( apply_filters( 'lsx_global_header_title', get_the_archive_title() ) ); ?> |
|
| 245 | + <?php echo wp_kses_post(apply_filters('lsx_global_header_title', get_the_archive_title())); ?> |
|
| 246 | 246 | <?php } ?> |
| 247 | 247 | </h1> |
| 248 | 248 | |
@@ -250,31 +250,31 @@ discard block |
||
| 250 | 250 | </header> |
| 251 | 251 | </div> |
| 252 | 252 | <?php |
| 253 | - elseif ( 'page' === $show_on_front && (int) get_option( 'page_for_posts' ) === $queried_object->ID ) : |
|
| 253 | + elseif ('page' === $show_on_front && (int) get_option('page_for_posts') === $queried_object->ID) : |
|
| 254 | 254 | ?> |
| 255 | - <div class="archive-header-wrapper col-<?php echo esc_attr( $size ); ?>-12"> |
|
| 255 | + <div class="archive-header-wrapper col-<?php echo esc_attr($size); ?>-12"> |
|
| 256 | 256 | <?php lsx_global_header_inner_bottom(); ?> |
| 257 | 257 | <header class="archive-header"> |
| 258 | - <h1 class="archive-title"><?php esc_html_e( 'Blog', 'lsx' ); ?></h1> |
|
| 258 | + <h1 class="archive-title"><?php esc_html_e('Blog', 'lsx'); ?></h1> |
|
| 259 | 259 | </header> |
| 260 | 260 | |
| 261 | 261 | </div> |
| 262 | 262 | <?php |
| 263 | - elseif ( ! is_singular( 'post' ) ) : |
|
| 263 | + elseif ( ! is_singular('post')) : |
|
| 264 | 264 | // Display only the breadcrumbs |
| 265 | 265 | ?> |
| 266 | - <div class="archive-header-wrapper col-<?php echo esc_attr( $size ); ?>-12"> |
|
| 266 | + <div class="archive-header-wrapper col-<?php echo esc_attr($size); ?>-12"> |
|
| 267 | 267 | <?php lsx_global_header_inner_bottom(); ?> |
| 268 | 268 | </div> |
| 269 | 269 | <?php |
| 270 | 270 | endif; |
| 271 | 271 | } |
| 272 | 272 | |
| 273 | - add_action( 'lsx_content_wrap_before', 'lsx_global_header' ); |
|
| 273 | + add_action('lsx_content_wrap_before', 'lsx_global_header'); |
|
| 274 | 274 | |
| 275 | 275 | endif; |
| 276 | 276 | |
| 277 | -if ( ! function_exists( 'lsx_author_extra_info' ) ) : |
|
| 277 | +if ( ! function_exists('lsx_author_extra_info')) : |
|
| 278 | 278 | |
| 279 | 279 | /** |
| 280 | 280 | * Displays the author extra info. |
@@ -284,57 +284,57 @@ discard block |
||
| 284 | 284 | */ |
| 285 | 285 | function lsx_author_extra_info() { |
| 286 | 286 | $default_size = 'sm'; |
| 287 | - $size = apply_filters( 'lsx_bootstrap_column_size', $default_size ); |
|
| 287 | + $size = apply_filters('lsx_bootstrap_column_size', $default_size); |
|
| 288 | 288 | |
| 289 | - if ( is_author() ) : |
|
| 290 | - $author_id = get_the_author_meta( 'ID' ); |
|
| 289 | + if (is_author()) : |
|
| 290 | + $author_id = get_the_author_meta('ID'); |
|
| 291 | 291 | $author = get_the_author(); |
| 292 | - $author_avatar = get_avatar( $author_id, 256 ); |
|
| 292 | + $author_avatar = get_avatar($author_id, 256); |
|
| 293 | 293 | $author_bio = get_the_archive_description(); |
| 294 | - $author_url = get_the_author_meta( 'url', $author_id ); |
|
| 295 | - $author_email = get_the_author_meta( 'email', $author_id ); |
|
| 296 | - $author_facebook = get_the_author_meta( 'facebook', $author_id ); |
|
| 297 | - $author_twitter = get_the_author_meta( 'twitter', $author_id ); |
|
| 298 | - $author_googleplus = get_the_author_meta( 'googleplus', $author_id ); |
|
| 294 | + $author_url = get_the_author_meta('url', $author_id); |
|
| 295 | + $author_email = get_the_author_meta('email', $author_id); |
|
| 296 | + $author_facebook = get_the_author_meta('facebook', $author_id); |
|
| 297 | + $author_twitter = get_the_author_meta('twitter', $author_id); |
|
| 298 | + $author_googleplus = get_the_author_meta('googleplus', $author_id); |
|
| 299 | 299 | ?> |
| 300 | - <div class="col-<?php echo esc_attr( $size ); ?>-12"> |
|
| 300 | + <div class="col-<?php echo esc_attr($size); ?>-12"> |
|
| 301 | 301 | <div class="archive-author-data"> |
| 302 | - <figure class="archive-author-avatar"><?php echo wp_kses_post( $author_avatar ); ?></figure> |
|
| 302 | + <figure class="archive-author-avatar"><?php echo wp_kses_post($author_avatar); ?></figure> |
|
| 303 | 303 | |
| 304 | - <?php if ( ! empty( $author_url ) || ! empty( $author_email ) || ! empty( $author_facebook ) || ! empty( $author_twitter ) || ! empty( $author_googleplus ) ) : ?> |
|
| 304 | + <?php if ( ! empty($author_url) || ! empty($author_email) || ! empty($author_facebook) || ! empty($author_twitter) || ! empty($author_googleplus)) : ?> |
|
| 305 | 305 | <div class="archive-author-social-links"> |
| 306 | - <?php if ( ! empty( $author_url ) ) : ?> |
|
| 307 | - <a href="<?php echo esc_url( $author_url ); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-url"><i class="fa fa-link" aria-hidden="true"></i></a> |
|
| 306 | + <?php if ( ! empty($author_url)) : ?> |
|
| 307 | + <a href="<?php echo esc_url($author_url); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-url"><i class="fa fa-link" aria-hidden="true"></i></a> |
|
| 308 | 308 | <?php endif; ?> |
| 309 | 309 | |
| 310 | - <?php if ( ! empty( $author_email ) ) : ?> |
|
| 311 | - <a href="mailto:<?php echo esc_attr( $author_email ); ?>" class="archive-author-social-link archive-author-social-link-email"><i class="fa fa-envelope" aria-hidden="true"></i></a> |
|
| 310 | + <?php if ( ! empty($author_email)) : ?> |
|
| 311 | + <a href="mailto:<?php echo esc_attr($author_email); ?>" class="archive-author-social-link archive-author-social-link-email"><i class="fa fa-envelope" aria-hidden="true"></i></a> |
|
| 312 | 312 | <?php endif; ?> |
| 313 | 313 | |
| 314 | - <?php if ( ! empty( $author_facebook ) ) : ?> |
|
| 315 | - <a href="<?php echo esc_url( $author_facebook ); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-facebook"><i class="fa fa-facebook" aria-hidden="true"></i></a> |
|
| 314 | + <?php if ( ! empty($author_facebook)) : ?> |
|
| 315 | + <a href="<?php echo esc_url($author_facebook); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-facebook"><i class="fa fa-facebook" aria-hidden="true"></i></a> |
|
| 316 | 316 | <?php endif; ?> |
| 317 | 317 | |
| 318 | - <?php if ( ! empty( $author_twitter ) ) : ?> |
|
| 319 | - <a href="https://twitter.com/<?php echo esc_attr( $author_twitter ); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a> |
|
| 318 | + <?php if ( ! empty($author_twitter)) : ?> |
|
| 319 | + <a href="https://twitter.com/<?php echo esc_attr($author_twitter); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a> |
|
| 320 | 320 | <?php endif; ?> |
| 321 | 321 | |
| 322 | - <?php if ( ! empty( $author_googleplus ) ) : ?> |
|
| 323 | - <a href="<?php echo esc_url( $author_googleplus ); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-googleplus"><i class="fa fa-google-plus" aria-hidden="true"></i></a> |
|
| 322 | + <?php if ( ! empty($author_googleplus)) : ?> |
|
| 323 | + <a href="<?php echo esc_url($author_googleplus); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-googleplus"><i class="fa fa-google-plus" aria-hidden="true"></i></a> |
|
| 324 | 324 | <?php endif; ?> |
| 325 | 325 | </div> |
| 326 | 326 | <?php endif; ?> |
| 327 | 327 | |
| 328 | - <?php if ( ! empty( $author_bio ) ) : ?> |
|
| 329 | - <h2 class="archive-author-title text-center"><?php esc_html_e( 'About the author', 'lsx' ); ?></h2> |
|
| 330 | - <p class="archive-author-bio"><?php echo wp_kses_post( $author_bio ); ?></p> |
|
| 328 | + <?php if ( ! empty($author_bio)) : ?> |
|
| 329 | + <h2 class="archive-author-title text-center"><?php esc_html_e('About the author', 'lsx'); ?></h2> |
|
| 330 | + <p class="archive-author-bio"><?php echo wp_kses_post($author_bio); ?></p> |
|
| 331 | 331 | <?php endif; ?> |
| 332 | 332 | |
| 333 | 333 | <h2 class="archive-author-posts text-center"> |
| 334 | 334 | <?php |
| 335 | - if ( '' !== $author ) { |
|
| 336 | - esc_html_e( 'All posts by ', 'lsx' ); |
|
| 337 | - esc_html( $author ); |
|
| 335 | + if ('' !== $author) { |
|
| 336 | + esc_html_e('All posts by ', 'lsx'); |
|
| 337 | + esc_html($author); |
|
| 338 | 338 | } |
| 339 | 339 | ?> |
| 340 | 340 | </h2> |
@@ -344,11 +344,11 @@ discard block |
||
| 344 | 344 | endif; |
| 345 | 345 | } |
| 346 | 346 | |
| 347 | - add_action( 'lsx_content_wrap_before', 'lsx_author_extra_info', 11 ); |
|
| 347 | + add_action('lsx_content_wrap_before', 'lsx_author_extra_info', 11); |
|
| 348 | 348 | |
| 349 | 349 | endif; |
| 350 | 350 | |
| 351 | -if ( ! function_exists( 'lsx_post_header' ) ) : |
|
| 351 | +if ( ! function_exists('lsx_post_header')) : |
|
| 352 | 352 | |
| 353 | 353 | /** |
| 354 | 354 | * Displays the post header. |
@@ -358,21 +358,21 @@ discard block |
||
| 358 | 358 | */ |
| 359 | 359 | function lsx_post_header() { |
| 360 | 360 | $default_size = 'sm'; |
| 361 | - $size = apply_filters( 'lsx_bootstrap_column_size', $default_size ); |
|
| 361 | + $size = apply_filters('lsx_bootstrap_column_size', $default_size); |
|
| 362 | 362 | |
| 363 | - if ( is_singular( 'post' ) ) : |
|
| 363 | + if (is_singular('post')) : |
|
| 364 | 364 | $format = get_post_format(); |
| 365 | 365 | |
| 366 | - if ( false === $format ) { |
|
| 366 | + if (false === $format) { |
|
| 367 | 367 | $format = 'standard'; |
| 368 | 368 | } |
| 369 | 369 | |
| 370 | - $format = lsx_translate_format_to_fontawesome( $format ); |
|
| 370 | + $format = lsx_translate_format_to_fontawesome($format); |
|
| 371 | 371 | ?> |
| 372 | - <div class="archive-header-wrapper col-<?php echo esc_attr( $size ); ?>-12"> |
|
| 372 | + <div class="archive-header-wrapper col-<?php echo esc_attr($size); ?>-12"> |
|
| 373 | 373 | <header class="archive-header"> |
| 374 | 374 | <h1 class="archive-title"> |
| 375 | - <i class="format-link fa fa-<?php echo esc_attr( $format ); ?>"></i> |
|
| 375 | + <i class="format-link fa fa-<?php echo esc_attr($format); ?>"></i> |
|
| 376 | 376 | <span><?php the_title(); ?></span> |
| 377 | 377 | </h1> |
| 378 | 378 | </header> |
@@ -381,11 +381,11 @@ discard block |
||
| 381 | 381 | endif; |
| 382 | 382 | } |
| 383 | 383 | |
| 384 | - add_action( 'lsx_entry_top', 'lsx_post_header' ); |
|
| 384 | + add_action('lsx_entry_top', 'lsx_post_header'); |
|
| 385 | 385 | |
| 386 | 386 | endif; |
| 387 | 387 | |
| 388 | -if ( ! function_exists( 'lsx_add_viewport_meta_tag' ) ) : |
|
| 388 | +if ( ! function_exists('lsx_add_viewport_meta_tag')) : |
|
| 389 | 389 | |
| 390 | 390 | /** |
| 391 | 391 | * Add Viewport Meta Tag to head. |
@@ -399,11 +399,11 @@ discard block |
||
| 399 | 399 | <?php |
| 400 | 400 | } |
| 401 | 401 | |
| 402 | - add_action( 'wp_head', 'lsx_add_viewport_meta_tag' ); |
|
| 402 | + add_action('wp_head', 'lsx_add_viewport_meta_tag'); |
|
| 403 | 403 | |
| 404 | 404 | endif; |
| 405 | 405 | |
| 406 | -if ( ! function_exists( 'lsx_header_search_form' ) ) : |
|
| 406 | +if ( ! function_exists('lsx_header_search_form')) : |
|
| 407 | 407 | |
| 408 | 408 | /** |
| 409 | 409 | * Add a search form to just above the nav menu. |
@@ -412,13 +412,13 @@ discard block |
||
| 412 | 412 | * @subpackage layout |
| 413 | 413 | */ |
| 414 | 414 | function lsx_header_search_form() { |
| 415 | - $search_form = get_theme_mod( 'lsx_header_search', false ); |
|
| 415 | + $search_form = get_theme_mod('lsx_header_search', false); |
|
| 416 | 416 | |
| 417 | - if ( false !== $search_form || is_customize_preview() ) { |
|
| 418 | - get_search_form( true ); |
|
| 417 | + if (false !== $search_form || is_customize_preview()) { |
|
| 418 | + get_search_form(true); |
|
| 419 | 419 | } |
| 420 | 420 | } |
| 421 | 421 | |
| 422 | - add_action( 'lsx_nav_before', 'lsx_header_search_form', 0 ); |
|
| 422 | + add_action('lsx_nav_before', 'lsx_header_search_form', 0); |
|
| 423 | 423 | |
| 424 | 424 | endif; |
@@ -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,25 +75,25 @@ 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 ); |
|
| 81 | + add_filter('tribe_get_events_title', 'lsx_text_disable_body_title', 200, 1); |
|
| 82 | 82 | return $title; |
| 83 | 83 | } |
| 84 | - add_filter( 'lsx_global_header_title', 'lsx_tec_global_header_title', 200, 1 ); |
|
| 84 | + add_filter('lsx_global_header_title', 'lsx_tec_global_header_title', 200, 1); |
|
| 85 | 85 | |
| 86 | 86 | endif; |
| 87 | 87 | |
| 88 | -if ( ! function_exists( 'lsx_text_disable_body_title' ) ) : |
|
| 88 | +if ( ! function_exists('lsx_text_disable_body_title')) : |
|
| 89 | 89 | /** |
| 90 | 90 | * Disable the events title for the post archive if the dynamic setting is active. |
| 91 | 91 | * @param $title |
| 92 | 92 | * |
| 93 | 93 | * @return string |
| 94 | 94 | */ |
| 95 | - function lsx_text_disable_body_title ( $title ) { |
|
| 96 | - if ( ! class_exists( 'LSX_Banners' ) ) { |
|
| 95 | + function lsx_text_disable_body_title($title) { |
|
| 96 | + if ( ! class_exists('LSX_Banners')) { |
|
| 97 | 97 | $title = ''; |
| 98 | 98 | } |
| 99 | 99 | return $title; |
@@ -101,23 +101,23 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | endif; |
| 103 | 103 | |
| 104 | -if ( ! function_exists( 'lsx_tec_breadcrumb_filter' ) ) : |
|
| 104 | +if ( ! function_exists('lsx_tec_breadcrumb_filter')) : |
|
| 105 | 105 | /** |
| 106 | 106 | * Fixes the community events breadcrumb |
| 107 | 107 | * |
| 108 | 108 | * @package lsx |
| 109 | 109 | * @subpackage the-events-calendar |
| 110 | 110 | */ |
| 111 | - function lsx_tec_breadcrumb_filter( $crumbs ) { |
|
| 112 | - if ( tribe_is_community_edit_event_page() || tribe_is_community_my_events_page() ) { |
|
| 111 | + function lsx_tec_breadcrumb_filter($crumbs) { |
|
| 112 | + if (tribe_is_community_edit_event_page() || tribe_is_community_my_events_page()) { |
|
| 113 | 113 | |
| 114 | - foreach ( $crumbs as $crumb_index => $crumb ){ |
|
| 115 | - if ( isset( $crumb['ptarchive'] ) ) { |
|
| 116 | - $crumbs[ $crumb_index ]['ptarchive'] = 'tribe_events'; |
|
| 114 | + foreach ($crumbs as $crumb_index => $crumb) { |
|
| 115 | + if (isset($crumb['ptarchive'])) { |
|
| 116 | + $crumbs[$crumb_index]['ptarchive'] = 'tribe_events'; |
|
| 117 | 117 | } |
| 118 | 118 | } |
| 119 | 119 | } |
| 120 | 120 | return $crumbs; |
| 121 | 121 | } |
| 122 | - add_filter( 'wpseo_breadcrumb_links', 'lsx_tec_breadcrumb_filter', 10, 1 ); |
|
| 122 | + add_filter('wpseo_breadcrumb_links', 'lsx_tec_breadcrumb_filter', 10, 1); |
|
| 123 | 123 | endif; |