@@ -7,28 +7,28 @@ |
||
| 7 | 7 | |
| 8 | 8 | $style = 'body #searchform { display: block; }'; |
| 9 | 9 | |
| 10 | -if ( is_customize_preview() ) { |
|
| 11 | - $search_form = get_theme_mod( 'lsx_header_search', false ); |
|
| 10 | +if (is_customize_preview()) { |
|
| 11 | + $search_form = get_theme_mod('lsx_header_search', false); |
|
| 12 | 12 | |
| 13 | - if ( false === $search_form ) { |
|
| 13 | + if (false === $search_form) { |
|
| 14 | 14 | $style = 'body #searchform { display: none; }'; |
| 15 | 15 | } |
| 16 | 16 | } |
| 17 | 17 | ?> |
| 18 | 18 | |
| 19 | -<form role="search" method="get" class="search-form form-inline" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>"> |
|
| 19 | +<form role="search" method="get" class="search-form form-inline" id="searchform" action="<?php echo esc_url(home_url('/')); ?>"> |
|
| 20 | 20 | <div class="input-group"> |
| 21 | - <input type="search" value="<?php if ( is_search() ) { echo get_search_query(); } ?>" name="s" class="search-field form-control" placeholder="<?php esc_attr_e( 'Search', 'lsx' ); ?> <?php echo esc_attr( get_bloginfo( 'name' ) ); ?>"> |
|
| 22 | - <label class="hide"><?php esc_html_e( 'Search for:', 'lsx' ); ?></label> |
|
| 21 | + <input type="search" value="<?php if (is_search()) { echo get_search_query(); } ?>" name="s" class="search-field form-control" placeholder="<?php esc_attr_e('Search', 'lsx'); ?> <?php echo esc_attr(get_bloginfo('name')); ?>"> |
|
| 22 | + <label class="hide"><?php esc_html_e('Search for:', 'lsx'); ?></label> |
|
| 23 | 23 | |
| 24 | 24 | <span class="input-group-btn"> |
| 25 | 25 | <button type="submit" class="search-submit btn btn-default"><span class="fa fa-search"></span></button> |
| 26 | 26 | </span> |
| 27 | 27 | </div> |
| 28 | 28 | |
| 29 | - <?php if ( is_customize_preview() ) : ?> |
|
| 29 | + <?php if (is_customize_preview()) : ?> |
|
| 30 | 30 | <style id="lsx-header-search-css"> |
| 31 | - <?php echo esc_attr( $style ); ?> |
|
| 31 | + <?php echo esc_attr($style); ?> |
|
| 32 | 32 | </style> |
| 33 | 33 | <?php endif; ?> |
| 34 | 34 | </form> |
@@ -8,11 +8,11 @@ |
||
| 8 | 8 | $style = 'body #searchform { display: block; }'; |
| 9 | 9 | |
| 10 | 10 | if ( is_customize_preview() ) { |
| 11 | - $search_form = get_theme_mod( 'lsx_header_search', false ); |
|
| 11 | + $search_form = get_theme_mod( 'lsx_header_search', false ); |
|
| 12 | 12 | |
| 13 | - if ( false === $search_form ) { |
|
| 14 | - $style = 'body #searchform { display: none; }'; |
|
| 15 | - } |
|
| 13 | + if ( false === $search_form ) { |
|
| 14 | + $style = 'body #searchform { display: none; }'; |
|
| 15 | + } |
|
| 16 | 16 | } |
| 17 | 17 | ?> |
| 18 | 18 | |
@@ -5,42 +5,42 @@ |
||
| 5 | 5 | * @package lsx |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 8 | +if ( ! defined('ABSPATH')) { |
|
| 9 | 9 | exit; |
| 10 | 10 | } |
| 11 | 11 | global $comment, $stored_comment, $_product, $rating; |
| 12 | 12 | $the_comment = $comment; |
| 13 | -if ( null !== $stored_comment ) { |
|
| 13 | +if (null !== $stored_comment) { |
|
| 14 | 14 | $the_comment = $stored_comment; |
| 15 | 15 | } |
| 16 | 16 | ?> |
| 17 | 17 | <div class="lsx-woocommerce-review-slot"> |
| 18 | 18 | <div class="lsx-woocommerce-review-flex"> |
| 19 | - <a href="<?php echo esc_url( get_comment_link( $the_comment->comment_ID ) ); ?>"> |
|
| 19 | + <a href="<?php echo esc_url(get_comment_link($the_comment->comment_ID)); ?>"> |
|
| 20 | 20 | <figure class="lsx-woocommerce-avatar"> |
| 21 | - <?php echo wp_kses_post( $_product->get_image( 'lsx-thumbnail-square' ) ); ?> |
|
| 21 | + <?php echo wp_kses_post($_product->get_image('lsx-thumbnail-square')); ?> |
|
| 22 | 22 | </figure> |
| 23 | 23 | </a> |
| 24 | 24 | |
| 25 | 25 | <div class="lsx-woocommerce-review-box"> |
| 26 | 26 | <div class="lsx-woocommerce-rating"> |
| 27 | - <?php echo wp_kses_post( wc_get_rating_html( $rating ) ); ?> |
|
| 27 | + <?php echo wp_kses_post(wc_get_rating_html($rating)); ?> |
|
| 28 | 28 | </div> |
| 29 | 29 | |
| 30 | 30 | <h5 class="lsx-woocommerce-title"> |
| 31 | - <a href="<?php echo esc_url( get_comment_link( $the_comment->comment_ID ) ); ?>"><?php echo wp_kses_post( $_product->get_name() ); ?></a> |
|
| 31 | + <a href="<?php echo esc_url(get_comment_link($the_comment->comment_ID)); ?>"><?php echo wp_kses_post($_product->get_name()); ?></a> |
|
| 32 | 32 | </h5> |
| 33 | 33 | |
| 34 | 34 | <p class="lsx-woocommerce-reviewer"> |
| 35 | 35 | <?php |
| 36 | 36 | /* translators: %s: review author */ |
| 37 | - echo wp_kses_post( esc_html__( 'by ', 'lsx' ) . get_comment_author( $the_comment->comment_ID ) ); |
|
| 37 | + echo wp_kses_post(esc_html__('by ', 'lsx') . get_comment_author($the_comment->comment_ID)); |
|
| 38 | 38 | ?> |
| 39 | 39 | </p> |
| 40 | 40 | |
| 41 | 41 | <div class="lsx-woocommerce-content"> |
| 42 | - <p><?php echo wp_kses_post( $the_comment->comment_content ); ?></p> |
|
| 43 | - <p><a href="<?php echo esc_url( get_comment_link( $the_comment->comment_ID ) ); ?>" class="moretag"><?php esc_html_e( 'View more', 'lsx' ); ?></a></p> |
|
| 42 | + <p><?php echo wp_kses_post($the_comment->comment_content); ?></p> |
|
| 43 | + <p><a href="<?php echo esc_url(get_comment_link($the_comment->comment_ID)); ?>" class="moretag"><?php esc_html_e('View more', 'lsx'); ?></a></p> |
|
| 44 | 44 | </div> |
| 45 | 45 | </div> |
| 46 | 46 | </div> |
@@ -6,12 +6,12 @@ discard block |
||
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | 8 | if ( ! defined( 'ABSPATH' ) ) { |
| 9 | - exit; |
|
| 9 | + exit; |
|
| 10 | 10 | } |
| 11 | 11 | global $comment, $stored_comment, $_product, $rating; |
| 12 | 12 | $the_comment = $comment; |
| 13 | 13 | if ( null !== $stored_comment ) { |
| 14 | - $the_comment = $stored_comment; |
|
| 14 | + $the_comment = $stored_comment; |
|
| 15 | 15 | } |
| 16 | 16 | ?> |
| 17 | 17 | <div class="lsx-woocommerce-review-slot"> |
@@ -33,9 +33,9 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | <p class="lsx-woocommerce-reviewer"> |
| 35 | 35 | <?php |
| 36 | - /* translators: %s: review author */ |
|
| 37 | - echo wp_kses_post( esc_html__( 'by ', 'lsx' ) . get_comment_author( $the_comment->comment_ID ) ); |
|
| 38 | - ?> |
|
| 36 | + /* translators: %s: review author */ |
|
| 37 | + echo wp_kses_post( esc_html__( 'by ', 'lsx' ) . get_comment_author( $the_comment->comment_ID ) ); |
|
| 38 | + ?> |
|
| 39 | 39 | </p> |
| 40 | 40 | |
| 41 | 41 | <div class="lsx-woocommerce-content"> |
@@ -15,42 +15,42 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | 17 | // Exit if accessed directly. |
| 18 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 18 | +if ( ! defined('ABSPATH')) { |
|
| 19 | 19 | exit; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | global $product; |
| 23 | 23 | |
| 24 | -if ( ! is_a( $product, 'WC_Product' ) ) { |
|
| 24 | +if ( ! is_a($product, 'WC_Product')) { |
|
| 25 | 25 | return; |
| 26 | 26 | } ?> |
| 27 | 27 | |
| 28 | 28 | <div class="lsx-woocommerce-slot"> |
| 29 | - <a href="<?php echo esc_url( $product->get_permalink() ); ?>"> |
|
| 29 | + <a href="<?php echo esc_url($product->get_permalink()); ?>"> |
|
| 30 | 30 | <figure class="lsx-woocommerce-avatar"> |
| 31 | - <?php echo wp_kses_post( $product->get_image( 'lsx-thumbnail-square' ) ); ?> |
|
| 31 | + <?php echo wp_kses_post($product->get_image('lsx-thumbnail-square')); ?> |
|
| 32 | 32 | </figure> |
| 33 | 33 | </a> |
| 34 | 34 | |
| 35 | 35 | <h5 class="lsx-woocommerce-title"> |
| 36 | - <a href="<?php echo esc_url( $product->get_permalink() ); ?>"><?php echo wp_kses_post( $product->get_name() ); ?></a> |
|
| 36 | + <a href="<?php echo esc_url($product->get_permalink()); ?>"><?php echo wp_kses_post($product->get_name()); ?></a> |
|
| 37 | 37 | </h5> |
| 38 | 38 | |
| 39 | - <?php if ( ! empty( $show_rating ) ) : ?> |
|
| 39 | + <?php if ( ! empty($show_rating)) : ?> |
|
| 40 | 40 | <div class="lsx-woocommerce-rating"> |
| 41 | - <?php echo wp_kses_post( wc_get_rating_html( $product->get_average_rating() ) ); ?> |
|
| 41 | + <?php echo wp_kses_post(wc_get_rating_html($product->get_average_rating())); ?> |
|
| 42 | 42 | </div> |
| 43 | 43 | <?php endif; ?> |
| 44 | 44 | |
| 45 | 45 | <?php |
| 46 | 46 | $price_html = $product->get_price_html(); |
| 47 | - if ( $price_html ) : ?> |
|
| 47 | + if ($price_html) : ?> |
|
| 48 | 48 | <div class="lsx-woocommerce-price"> |
| 49 | - <?php echo wp_kses_post( $price_html ); ?> |
|
| 49 | + <?php echo wp_kses_post($price_html); ?> |
|
| 50 | 50 | </div> |
| 51 | 51 | <?php endif; ?> |
| 52 | 52 | |
| 53 | 53 | <div class="lsx-woocommerce-content"> |
| 54 | - <a href="<?php echo esc_url( $product->get_permalink() ); ?>" class="moretag"><?php esc_html_e( 'View more', 'lsx' ); ?></a> |
|
| 54 | + <a href="<?php echo esc_url($product->get_permalink()); ?>" class="moretag"><?php esc_html_e('View more', 'lsx'); ?></a> |
|
| 55 | 55 | </div> |
| 56 | 56 | </div> |
@@ -16,13 +16,13 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | // Exit if accessed directly. |
| 18 | 18 | if ( ! defined( 'ABSPATH' ) ) { |
| 19 | - exit; |
|
| 19 | + exit; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | global $product; |
| 23 | 23 | |
| 24 | 24 | if ( ! is_a( $product, 'WC_Product' ) ) { |
| 25 | - return; |
|
| 25 | + return; |
|
| 26 | 26 | } ?> |
| 27 | 27 | |
| 28 | 28 | <div class="lsx-woocommerce-slot"> |
@@ -43,8 +43,8 @@ discard block |
||
| 43 | 43 | <?php endif; ?> |
| 44 | 44 | |
| 45 | 45 | <?php |
| 46 | - $price_html = $product->get_price_html(); |
|
| 47 | - if ( $price_html ) : ?> |
|
| 46 | + $price_html = $product->get_price_html(); |
|
| 47 | + if ( $price_html ) : ?> |
|
| 48 | 48 | <div class="lsx-woocommerce-price"> |
| 49 | 49 | <?php echo wp_kses_post( $price_html ); ?> |
| 50 | 50 | </div> |
@@ -5,32 +5,32 @@ |
||
| 5 | 5 | * @package lsx |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | -$show_on_front = get_option( 'show_on_front' ); |
|
| 8 | +$show_on_front = get_option('show_on_front'); |
|
| 9 | 9 | |
| 10 | -$layout = get_theme_mod( 'lsx_layout', '2cr' ); |
|
| 11 | -$layout = apply_filters( 'lsx_layout', $layout ); |
|
| 10 | +$layout = get_theme_mod('lsx_layout', '2cr'); |
|
| 11 | +$layout = apply_filters('lsx_layout', $layout); |
|
| 12 | 12 | |
| 13 | -if ( 'posts' === $show_on_front && is_home() ) { |
|
| 13 | +if ('posts' === $show_on_front && is_home()) { |
|
| 14 | 14 | $sidebar = 'home'; |
| 15 | 15 | } else { |
| 16 | 16 | $sidebar = 'sidebar-1'; |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | -if ( '1c' !== $layout ) : ?> |
|
| 19 | +if ('1c' !== $layout) : ?> |
|
| 20 | 20 | |
| 21 | 21 | <?php lsx_sidebars_before(); ?> |
| 22 | 22 | |
| 23 | - <div id="secondary" class="widget-area <?php echo esc_attr( lsx_sidebar_class() ); ?>" role="complementary"> |
|
| 23 | + <div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class()); ?>" role="complementary"> |
|
| 24 | 24 | |
| 25 | 25 | <?php lsx_sidebar_top(); ?> |
| 26 | 26 | |
| 27 | - <h2><?php esc_html_e( 'Categories', 'lsx' ); ?></h2> |
|
| 27 | + <h2><?php esc_html_e('Categories', 'lsx'); ?></h2> |
|
| 28 | 28 | |
| 29 | 29 | <aside id="categories" class="widget widget_categories"> |
| 30 | 30 | <?php |
| 31 | - echo wp_tag_cloud( array( |
|
| 31 | + echo wp_tag_cloud(array( |
|
| 32 | 32 | 'taxonomy' => 'category', |
| 33 | - ) ); |
|
| 33 | + )); |
|
| 34 | 34 | ?> |
| 35 | 35 | </aside> |
| 36 | 36 | |
@@ -11,9 +11,9 @@ discard block |
||
| 11 | 11 | $layout = apply_filters( 'lsx_layout', $layout ); |
| 12 | 12 | |
| 13 | 13 | if ( 'posts' === $show_on_front && is_home() ) { |
| 14 | - $sidebar = 'home'; |
|
| 14 | + $sidebar = 'home'; |
|
| 15 | 15 | } else { |
| 16 | - $sidebar = 'sidebar-1'; |
|
| 16 | + $sidebar = 'sidebar-1'; |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | if ( '1c' !== $layout ) : ?> |
@@ -28,10 +28,10 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | <aside id="categories" class="widget widget_categories"> |
| 30 | 30 | <?php |
| 31 | - echo wp_tag_cloud( array( |
|
| 32 | - 'taxonomy' => 'category', |
|
| 33 | - ) ); |
|
| 34 | - ?> |
|
| 31 | + echo wp_tag_cloud( array( |
|
| 32 | + 'taxonomy' => 'category', |
|
| 33 | + ) ); |
|
| 34 | + ?> |
|
| 35 | 35 | </aside> |
| 36 | 36 | |
| 37 | 37 | <?php lsx_sitemap_taxonomy_clouds(); ?> |
@@ -5,54 +5,54 @@ |
||
| 5 | 5 | * @package lsx |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | -$sidebar_enabled = apply_filters( 'lsx_sidebar_enable', true ); |
|
| 8 | +$sidebar_enabled = apply_filters('lsx_sidebar_enable', true); |
|
| 9 | 9 | |
| 10 | -if ( true !== $sidebar_enabled ) { |
|
| 10 | +if (true !== $sidebar_enabled) { |
|
| 11 | 11 | return true; |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | -$show_on_front = get_option( 'show_on_front' ); |
|
| 14 | +$show_on_front = get_option('show_on_front'); |
|
| 15 | 15 | |
| 16 | -if ( 'page' === $show_on_front && is_front_page() ) { |
|
| 16 | +if ('page' === $show_on_front && is_front_page()) { |
|
| 17 | 17 | $layout = '1c'; |
| 18 | 18 | $sidebar = 'home'; |
| 19 | 19 | } else { |
| 20 | - $layout = get_theme_mod( 'lsx_layout', '2cr' ); |
|
| 21 | - $layout = apply_filters( 'lsx_layout', $layout ); |
|
| 20 | + $layout = get_theme_mod('lsx_layout', '2cr'); |
|
| 21 | + $layout = apply_filters('lsx_layout', $layout); |
|
| 22 | 22 | |
| 23 | - if ( 'posts' === $show_on_front && is_home() ) { |
|
| 23 | + if ('posts' === $show_on_front && is_home()) { |
|
| 24 | 24 | $sidebar = 'home'; |
| 25 | 25 | } else { |
| 26 | 26 | $sidebar = 'sidebar-1'; |
| 27 | 27 | } |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | -if ( '1c' !== $layout ) : ?> |
|
| 30 | +if ('1c' !== $layout) : ?> |
|
| 31 | 31 | <?php lsx_sidebars_before(); ?> |
| 32 | - <div id="secondary" class="widget-area <?php echo esc_attr( lsx_sidebar_class() ); ?>" role="complementary"> |
|
| 32 | + <div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class()); ?>" role="complementary"> |
|
| 33 | 33 | |
| 34 | 34 | <?php lsx_sidebar_top(); ?> |
| 35 | 35 | |
| 36 | - <?php if ( ! dynamic_sidebar( $sidebar ) ) : ?> |
|
| 36 | + <?php if ( ! dynamic_sidebar($sidebar)) : ?> |
|
| 37 | 37 | |
| 38 | 38 | <aside id="search" class="widget widget_search"> |
| 39 | 39 | <?php get_search_form(); ?> |
| 40 | 40 | </aside> |
| 41 | 41 | |
| 42 | 42 | <aside id="archives" class="widget"> |
| 43 | - <h1 class="widget-title"><?php esc_html_e( 'Archives', 'lsx' ); ?></h1> |
|
| 43 | + <h1 class="widget-title"><?php esc_html_e('Archives', 'lsx'); ?></h1> |
|
| 44 | 44 | |
| 45 | 45 | <ul> |
| 46 | 46 | <?php |
| 47 | - wp_get_archives( array( |
|
| 47 | + wp_get_archives(array( |
|
| 48 | 48 | 'type' => 'monthly', |
| 49 | - ) ); |
|
| 49 | + )); |
|
| 50 | 50 | ?> |
| 51 | 51 | </ul> |
| 52 | 52 | </aside> |
| 53 | 53 | |
| 54 | 54 | <aside id="meta" class="widget"> |
| 55 | - <h1 class="widget-title"><?php esc_html_e( 'Meta', 'lsx' ); ?></h1> |
|
| 55 | + <h1 class="widget-title"><?php esc_html_e('Meta', 'lsx'); ?></h1> |
|
| 56 | 56 | |
| 57 | 57 | <ul> |
| 58 | 58 | <?php wp_register(); ?> |
@@ -8,23 +8,23 @@ discard block |
||
| 8 | 8 | $sidebar_enabled = apply_filters( 'lsx_sidebar_enable', true ); |
| 9 | 9 | |
| 10 | 10 | if ( true !== $sidebar_enabled ) { |
| 11 | - return true; |
|
| 11 | + return true; |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | $show_on_front = get_option( 'show_on_front' ); |
| 15 | 15 | |
| 16 | 16 | if ( 'page' === $show_on_front && is_front_page() ) { |
| 17 | - $layout = '1c'; |
|
| 18 | - $sidebar = 'home'; |
|
| 17 | + $layout = '1c'; |
|
| 18 | + $sidebar = 'home'; |
|
| 19 | 19 | } else { |
| 20 | - $layout = get_theme_mod( 'lsx_layout', '2cr' ); |
|
| 21 | - $layout = apply_filters( 'lsx_layout', $layout ); |
|
| 22 | - |
|
| 23 | - if ( 'posts' === $show_on_front && is_home() ) { |
|
| 24 | - $sidebar = 'home'; |
|
| 25 | - } else { |
|
| 26 | - $sidebar = 'sidebar-1'; |
|
| 27 | - } |
|
| 20 | + $layout = get_theme_mod( 'lsx_layout', '2cr' ); |
|
| 21 | + $layout = apply_filters( 'lsx_layout', $layout ); |
|
| 22 | + |
|
| 23 | + if ( 'posts' === $show_on_front && is_home() ) { |
|
| 24 | + $sidebar = 'home'; |
|
| 25 | + } else { |
|
| 26 | + $sidebar = 'sidebar-1'; |
|
| 27 | + } |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | if ( '1c' !== $layout ) : ?> |
@@ -44,10 +44,10 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | <ul> |
| 46 | 46 | <?php |
| 47 | - wp_get_archives( array( |
|
| 48 | - 'type' => 'monthly', |
|
| 49 | - ) ); |
|
| 50 | - ?> |
|
| 47 | + wp_get_archives( array( |
|
| 48 | + 'type' => 'monthly', |
|
| 49 | + ) ); |
|
| 50 | + ?> |
|
| 51 | 51 | </ul> |
| 52 | 52 | </aside> |
| 53 | 53 | |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | * @subpackage hooks |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 9 | +if ( ! defined('ABSPATH')) { |
|
| 10 | 10 | exit; |
| 11 | 11 | } |
| 12 | 12 | |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | * This is the 1st action in the theme that fires after <head>. |
| 15 | 15 | */ |
| 16 | 16 | function lsx_head_top() { |
| 17 | - do_action( 'lsx_head_top' ); |
|
| 17 | + do_action('lsx_head_top'); |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | /** |
@@ -23,14 +23,14 @@ discard block |
||
| 23 | 23 | * @return void |
| 24 | 24 | */ |
| 25 | 25 | function lsx_head_bottom() { |
| 26 | - do_action( 'lsx_head_bottom' ); |
|
| 26 | + do_action('lsx_head_bottom'); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * The 3rd action thta fires after <body> |
| 31 | 31 | */ |
| 32 | 32 | function lsx_body_top() { |
| 33 | - do_action( 'lsx_body_top' ); |
|
| 33 | + do_action('lsx_body_top'); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * $lsx_supports[] = 'header'; |
| 40 | 40 | */ |
| 41 | 41 | function lsx_header_before() { |
| 42 | - do_action( 'lsx_header_before' ); |
|
| 42 | + do_action('lsx_header_before'); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | * @return void |
| 49 | 49 | */ |
| 50 | 50 | function lsx_header_top() { |
| 51 | - do_action( 'lsx_header_top' ); |
|
| 51 | + do_action('lsx_header_top'); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | * @return void |
| 58 | 58 | */ |
| 59 | 59 | function lsx_nav_before() { |
| 60 | - do_action( 'lsx_nav_before' ); |
|
| 60 | + do_action('lsx_nav_before'); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | * @return void |
| 67 | 67 | */ |
| 68 | 68 | function lsx_nav_after() { |
| 69 | - do_action( 'lsx_nav_after' ); |
|
| 69 | + do_action('lsx_nav_after'); |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /** |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | * @return void |
| 76 | 76 | */ |
| 77 | 77 | function lsx_header_bottom() { |
| 78 | - do_action( 'lsx_header_bottom' ); |
|
| 78 | + do_action('lsx_header_bottom'); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | * @return void |
| 85 | 85 | */ |
| 86 | 86 | function lsx_header_after() { |
| 87 | - do_action( 'lsx_header_after' ); |
|
| 87 | + do_action('lsx_header_after'); |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | /** |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | * @return void |
| 94 | 94 | */ |
| 95 | 95 | function lsx_header_wrap_after() { |
| 96 | - do_action( 'lsx_header_wrap_after' ); |
|
| 96 | + do_action('lsx_header_wrap_after'); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | /** |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | * @return void |
| 103 | 103 | */ |
| 104 | 104 | function lsx_header_wrap_container_top() { |
| 105 | - do_action( 'lsx_header_wrap_container_top' ); |
|
| 105 | + do_action('lsx_header_wrap_container_top'); |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | /** |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | * @return void |
| 112 | 112 | */ |
| 113 | 113 | function lsx_body_bottom() { |
| 114 | - do_action( 'lsx_body_bottom' ); |
|
| 114 | + do_action('lsx_body_bottom'); |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | /** |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | * $lsx_supports[] = 'banner'; |
| 121 | 121 | */ |
| 122 | 122 | function lsx_banner_content() { |
| 123 | - do_action( 'lsx_banner_content' ); |
|
| 123 | + do_action('lsx_banner_content'); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | /** |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | * @return void |
| 130 | 130 | */ |
| 131 | 131 | function lsx_banner_inner_top() { |
| 132 | - do_action( 'lsx_banner_inner_top' ); |
|
| 132 | + do_action('lsx_banner_inner_top'); |
|
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | /** |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | * @return void |
| 139 | 139 | */ |
| 140 | 140 | function lsx_banner_inner_bottom() { |
| 141 | - do_action( 'lsx_banner_inner_bottom' ); |
|
| 141 | + do_action('lsx_banner_inner_bottom'); |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | /** |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | * $lsx_supports[] = 'global_header'; |
| 148 | 148 | */ |
| 149 | 149 | function lsx_global_header_inner_bottom() { |
| 150 | - do_action( 'lsx_global_header_inner_bottom' ); |
|
| 150 | + do_action('lsx_global_header_inner_bottom'); |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | /** |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | * $lsx_supports[] = 'content'; |
| 157 | 157 | */ |
| 158 | 158 | function lsx_content_wrap_before() { |
| 159 | - do_action( 'lsx_content_wrap_before' ); |
|
| 159 | + do_action('lsx_content_wrap_before'); |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | /** |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | * @return void |
| 166 | 166 | */ |
| 167 | 167 | function lsx_content_wrap_after() { |
| 168 | - do_action( 'lsx_content_wrap_after' ); |
|
| 168 | + do_action('lsx_content_wrap_after'); |
|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /** |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | * @return void |
| 175 | 175 | */ |
| 176 | 176 | function lsx_content_before() { |
| 177 | - do_action( 'lsx_content_before' ); |
|
| 177 | + do_action('lsx_content_before'); |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | /** |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | * @return void |
| 184 | 184 | */ |
| 185 | 185 | function lsx_content_after() { |
| 186 | - do_action( 'lsx_content_after' ); |
|
| 186 | + do_action('lsx_content_after'); |
|
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | /** |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | * @return void |
| 193 | 193 | */ |
| 194 | 194 | function lsx_content_top() { |
| 195 | - do_action( 'lsx_content_top' ); |
|
| 195 | + do_action('lsx_content_top'); |
|
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | /** |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | * @return void |
| 202 | 202 | */ |
| 203 | 203 | function lsx_content_bottom() { |
| 204 | - do_action( 'lsx_content_bottom' ); |
|
| 204 | + do_action('lsx_content_bottom'); |
|
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | /** |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | * @return void |
| 211 | 211 | */ |
| 212 | 212 | function lsx_content_post_tags() { |
| 213 | - do_action( 'lsx_content_post_tags' ); |
|
| 213 | + do_action('lsx_content_post_tags'); |
|
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | /** |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | * @return void |
| 220 | 220 | */ |
| 221 | 221 | function lsx_content_sharing() { |
| 222 | - do_action( 'lsx_content_sharing' ); |
|
| 222 | + do_action('lsx_content_sharing'); |
|
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | /** |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | * $lsx_supports[] = 'entry'; |
| 229 | 229 | */ |
| 230 | 230 | function lsx_entry_before() { |
| 231 | - do_action( 'lsx_entry_before' ); |
|
| 231 | + do_action('lsx_entry_before'); |
|
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | /** |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | * @return void |
| 238 | 238 | */ |
| 239 | 239 | function lsx_entry_after() { |
| 240 | - do_action( 'lsx_entry_after' ); |
|
| 240 | + do_action('lsx_entry_after'); |
|
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | /** |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | * @return void |
| 247 | 247 | */ |
| 248 | 248 | function lsx_entry_top() { |
| 249 | - do_action( 'lsx_entry_top' ); |
|
| 249 | + do_action('lsx_entry_top'); |
|
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | /** |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | * @return void |
| 256 | 256 | */ |
| 257 | 257 | function lsx_entry_inside_top() { |
| 258 | - do_action( 'lsx_entry_inside_top' ); |
|
| 258 | + do_action('lsx_entry_inside_top'); |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | /** |
@@ -264,14 +264,14 @@ discard block |
||
| 264 | 264 | * @return void |
| 265 | 265 | */ |
| 266 | 266 | function lsx_entry_bottom() { |
| 267 | - do_action( 'lsx_entry_bottom' ); |
|
| 267 | + do_action('lsx_entry_bottom'); |
|
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | /** |
| 271 | 271 | * Semantic <entry> hooks |
| 272 | 272 | */ |
| 273 | 273 | function lsx_post_meta_top() { |
| 274 | - do_action( 'lsx_post_meta_top' ); |
|
| 274 | + do_action('lsx_post_meta_top'); |
|
| 275 | 275 | } |
| 276 | 276 | |
| 277 | 277 | /** |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | * $lsx_supports[] = 'entry'; |
| 281 | 281 | */ |
| 282 | 282 | function lsx_widget_entry_before() { |
| 283 | - do_action( 'lsx_widget_entry_before' ); |
|
| 283 | + do_action('lsx_widget_entry_before'); |
|
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | /** |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | * @return void |
| 290 | 290 | */ |
| 291 | 291 | function lsx_widget_entry_after() { |
| 292 | - do_action( 'lsx_widget_entry_after' ); |
|
| 292 | + do_action('lsx_widget_entry_after'); |
|
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | /** |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | * @return void |
| 299 | 299 | */ |
| 300 | 300 | function lsx_widget_entry_top() { |
| 301 | - do_action( 'lsx_widget_entry_top' ); |
|
| 301 | + do_action('lsx_widget_entry_top'); |
|
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | /** |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | * @return void |
| 308 | 308 | */ |
| 309 | 309 | function lsx_widget_entry_bottom() { |
| 310 | - do_action( 'lsx_widget_entry_bottom' ); |
|
| 310 | + do_action('lsx_widget_entry_bottom'); |
|
| 311 | 311 | } |
| 312 | 312 | |
| 313 | 313 | /** |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | * @return void |
| 317 | 317 | */ |
| 318 | 318 | function lsx_widget_entry_content_top() { |
| 319 | - do_action( 'lsx_widget_entry_content_top' ); |
|
| 319 | + do_action('lsx_widget_entry_content_top'); |
|
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | /** |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | * @return void |
| 326 | 326 | */ |
| 327 | 327 | function lsx_widget_entry_content_bottom() { |
| 328 | - do_action( 'lsx_widget_entry_content_bottom' ); |
|
| 328 | + do_action('lsx_widget_entry_content_bottom'); |
|
| 329 | 329 | } |
| 330 | 330 | |
| 331 | 331 | /** |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | * $lsx_supports[] = 'comments'; |
| 335 | 335 | */ |
| 336 | 336 | function lsx_comments_before() { |
| 337 | - do_action( 'lsx_comments_before' ); |
|
| 337 | + do_action('lsx_comments_before'); |
|
| 338 | 338 | } |
| 339 | 339 | |
| 340 | 340 | /** |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | * @return void |
| 344 | 344 | */ |
| 345 | 345 | function lsx_comments_after() { |
| 346 | - do_action( 'lsx_comments_after' ); |
|
| 346 | + do_action('lsx_comments_after'); |
|
| 347 | 347 | } |
| 348 | 348 | |
| 349 | 349 | /** |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | * $lsx_supports[] = 'sidebar'; |
| 353 | 353 | */ |
| 354 | 354 | function lsx_sidebars_before() { |
| 355 | - do_action( 'lsx_sidebars_before' ); |
|
| 355 | + do_action('lsx_sidebars_before'); |
|
| 356 | 356 | } |
| 357 | 357 | |
| 358 | 358 | /** |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | * @return void |
| 362 | 362 | */ |
| 363 | 363 | function lsx_sidebars_after() { |
| 364 | - do_action( 'lsx_sidebars_after' ); |
|
| 364 | + do_action('lsx_sidebars_after'); |
|
| 365 | 365 | } |
| 366 | 366 | |
| 367 | 367 | /** |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | * @return void |
| 371 | 371 | */ |
| 372 | 372 | function lsx_sidebar_top() { |
| 373 | - do_action( 'lsx_sidebar_top' ); |
|
| 373 | + do_action('lsx_sidebar_top'); |
|
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | /** |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | * @return void |
| 380 | 380 | */ |
| 381 | 381 | function lsx_sidebar_bottom() { |
| 382 | - do_action( 'lsx_sidebar_bottom' ); |
|
| 382 | + do_action('lsx_sidebar_bottom'); |
|
| 383 | 383 | } |
| 384 | 384 | |
| 385 | 385 | /** |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | * $lsx_supports[] = 'footer'; |
| 389 | 389 | */ |
| 390 | 390 | function lsx_footer_before() { |
| 391 | - do_action( 'lsx_footer_before' ); |
|
| 391 | + do_action('lsx_footer_before'); |
|
| 392 | 392 | } |
| 393 | 393 | |
| 394 | 394 | /** |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | * @return void |
| 398 | 398 | */ |
| 399 | 399 | function lsx_footer_after() { |
| 400 | - do_action( 'lsx_footer_after' ); |
|
| 400 | + do_action('lsx_footer_after'); |
|
| 401 | 401 | } |
| 402 | 402 | |
| 403 | 403 | /** |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | * @return void |
| 407 | 407 | */ |
| 408 | 408 | function lsx_footer_top() { |
| 409 | - do_action( 'lsx_footer_top' ); |
|
| 409 | + do_action('lsx_footer_top'); |
|
| 410 | 410 | } |
| 411 | 411 | |
| 412 | 412 | /** |
@@ -415,5 +415,5 @@ discard block |
||
| 415 | 415 | * @return void |
| 416 | 416 | */ |
| 417 | 417 | function lsx_footer_bottom() { |
| 418 | - do_action( 'lsx_footer_bottom' ); |
|
| 418 | + do_action('lsx_footer_bottom'); |
|
| 419 | 419 | } |
@@ -7,14 +7,14 @@ discard block |
||
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | - exit; |
|
| 10 | + exit; |
|
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * This is the 1st action in the theme that fires after <head>. |
| 15 | 15 | */ |
| 16 | 16 | function lsx_head_top() { |
| 17 | - do_action( 'lsx_head_top' ); |
|
| 17 | + do_action( 'lsx_head_top' ); |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | /** |
@@ -23,14 +23,14 @@ discard block |
||
| 23 | 23 | * @return void |
| 24 | 24 | */ |
| 25 | 25 | function lsx_head_bottom() { |
| 26 | - do_action( 'lsx_head_bottom' ); |
|
| 26 | + do_action( 'lsx_head_bottom' ); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * The 3rd action thta fires after <body> |
| 31 | 31 | */ |
| 32 | 32 | function lsx_body_top() { |
| 33 | - do_action( 'lsx_body_top' ); |
|
| 33 | + do_action( 'lsx_body_top' ); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * $lsx_supports[] = 'header'; |
| 40 | 40 | */ |
| 41 | 41 | function lsx_header_before() { |
| 42 | - do_action( 'lsx_header_before' ); |
|
| 42 | + do_action( 'lsx_header_before' ); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | * @return void |
| 49 | 49 | */ |
| 50 | 50 | function lsx_header_top() { |
| 51 | - do_action( 'lsx_header_top' ); |
|
| 51 | + do_action( 'lsx_header_top' ); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | * @return void |
| 58 | 58 | */ |
| 59 | 59 | function lsx_nav_before() { |
| 60 | - do_action( 'lsx_nav_before' ); |
|
| 60 | + do_action( 'lsx_nav_before' ); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | * @return void |
| 67 | 67 | */ |
| 68 | 68 | function lsx_nav_after() { |
| 69 | - do_action( 'lsx_nav_after' ); |
|
| 69 | + do_action( 'lsx_nav_after' ); |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /** |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | * @return void |
| 76 | 76 | */ |
| 77 | 77 | function lsx_header_bottom() { |
| 78 | - do_action( 'lsx_header_bottom' ); |
|
| 78 | + do_action( 'lsx_header_bottom' ); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | * @return void |
| 85 | 85 | */ |
| 86 | 86 | function lsx_header_after() { |
| 87 | - do_action( 'lsx_header_after' ); |
|
| 87 | + do_action( 'lsx_header_after' ); |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | /** |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | * @return void |
| 94 | 94 | */ |
| 95 | 95 | function lsx_header_wrap_after() { |
| 96 | - do_action( 'lsx_header_wrap_after' ); |
|
| 96 | + do_action( 'lsx_header_wrap_after' ); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | /** |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | * @return void |
| 103 | 103 | */ |
| 104 | 104 | function lsx_header_wrap_container_top() { |
| 105 | - do_action( 'lsx_header_wrap_container_top' ); |
|
| 105 | + do_action( 'lsx_header_wrap_container_top' ); |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | /** |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | * @return void |
| 112 | 112 | */ |
| 113 | 113 | function lsx_body_bottom() { |
| 114 | - do_action( 'lsx_body_bottom' ); |
|
| 114 | + do_action( 'lsx_body_bottom' ); |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | /** |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | * $lsx_supports[] = 'banner'; |
| 121 | 121 | */ |
| 122 | 122 | function lsx_banner_content() { |
| 123 | - do_action( 'lsx_banner_content' ); |
|
| 123 | + do_action( 'lsx_banner_content' ); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | /** |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | * @return void |
| 130 | 130 | */ |
| 131 | 131 | function lsx_banner_inner_top() { |
| 132 | - do_action( 'lsx_banner_inner_top' ); |
|
| 132 | + do_action( 'lsx_banner_inner_top' ); |
|
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | /** |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | * @return void |
| 139 | 139 | */ |
| 140 | 140 | function lsx_banner_inner_bottom() { |
| 141 | - do_action( 'lsx_banner_inner_bottom' ); |
|
| 141 | + do_action( 'lsx_banner_inner_bottom' ); |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | /** |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | * $lsx_supports[] = 'global_header'; |
| 148 | 148 | */ |
| 149 | 149 | function lsx_global_header_inner_bottom() { |
| 150 | - do_action( 'lsx_global_header_inner_bottom' ); |
|
| 150 | + do_action( 'lsx_global_header_inner_bottom' ); |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | /** |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | * $lsx_supports[] = 'content'; |
| 157 | 157 | */ |
| 158 | 158 | function lsx_content_wrap_before() { |
| 159 | - do_action( 'lsx_content_wrap_before' ); |
|
| 159 | + do_action( 'lsx_content_wrap_before' ); |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | /** |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | * @return void |
| 166 | 166 | */ |
| 167 | 167 | function lsx_content_wrap_after() { |
| 168 | - do_action( 'lsx_content_wrap_after' ); |
|
| 168 | + do_action( 'lsx_content_wrap_after' ); |
|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /** |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | * @return void |
| 175 | 175 | */ |
| 176 | 176 | function lsx_content_before() { |
| 177 | - do_action( 'lsx_content_before' ); |
|
| 177 | + do_action( 'lsx_content_before' ); |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | /** |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | * @return void |
| 184 | 184 | */ |
| 185 | 185 | function lsx_content_after() { |
| 186 | - do_action( 'lsx_content_after' ); |
|
| 186 | + do_action( 'lsx_content_after' ); |
|
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | /** |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | * @return void |
| 193 | 193 | */ |
| 194 | 194 | function lsx_content_top() { |
| 195 | - do_action( 'lsx_content_top' ); |
|
| 195 | + do_action( 'lsx_content_top' ); |
|
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | /** |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | * @return void |
| 202 | 202 | */ |
| 203 | 203 | function lsx_content_bottom() { |
| 204 | - do_action( 'lsx_content_bottom' ); |
|
| 204 | + do_action( 'lsx_content_bottom' ); |
|
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | /** |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | * @return void |
| 211 | 211 | */ |
| 212 | 212 | function lsx_content_post_tags() { |
| 213 | - do_action( 'lsx_content_post_tags' ); |
|
| 213 | + do_action( 'lsx_content_post_tags' ); |
|
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | /** |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | * @return void |
| 220 | 220 | */ |
| 221 | 221 | function lsx_content_sharing() { |
| 222 | - do_action( 'lsx_content_sharing' ); |
|
| 222 | + do_action( 'lsx_content_sharing' ); |
|
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | /** |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | * $lsx_supports[] = 'entry'; |
| 229 | 229 | */ |
| 230 | 230 | function lsx_entry_before() { |
| 231 | - do_action( 'lsx_entry_before' ); |
|
| 231 | + do_action( 'lsx_entry_before' ); |
|
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | /** |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | * @return void |
| 238 | 238 | */ |
| 239 | 239 | function lsx_entry_after() { |
| 240 | - do_action( 'lsx_entry_after' ); |
|
| 240 | + do_action( 'lsx_entry_after' ); |
|
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | /** |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | * @return void |
| 247 | 247 | */ |
| 248 | 248 | function lsx_entry_top() { |
| 249 | - do_action( 'lsx_entry_top' ); |
|
| 249 | + do_action( 'lsx_entry_top' ); |
|
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | /** |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | * @return void |
| 256 | 256 | */ |
| 257 | 257 | function lsx_entry_inside_top() { |
| 258 | - do_action( 'lsx_entry_inside_top' ); |
|
| 258 | + do_action( 'lsx_entry_inside_top' ); |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | /** |
@@ -264,14 +264,14 @@ discard block |
||
| 264 | 264 | * @return void |
| 265 | 265 | */ |
| 266 | 266 | function lsx_entry_bottom() { |
| 267 | - do_action( 'lsx_entry_bottom' ); |
|
| 267 | + do_action( 'lsx_entry_bottom' ); |
|
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | /** |
| 271 | 271 | * Semantic <entry> hooks |
| 272 | 272 | */ |
| 273 | 273 | function lsx_post_meta_top() { |
| 274 | - do_action( 'lsx_post_meta_top' ); |
|
| 274 | + do_action( 'lsx_post_meta_top' ); |
|
| 275 | 275 | } |
| 276 | 276 | |
| 277 | 277 | /** |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | * $lsx_supports[] = 'entry'; |
| 281 | 281 | */ |
| 282 | 282 | function lsx_widget_entry_before() { |
| 283 | - do_action( 'lsx_widget_entry_before' ); |
|
| 283 | + do_action( 'lsx_widget_entry_before' ); |
|
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | /** |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | * @return void |
| 290 | 290 | */ |
| 291 | 291 | function lsx_widget_entry_after() { |
| 292 | - do_action( 'lsx_widget_entry_after' ); |
|
| 292 | + do_action( 'lsx_widget_entry_after' ); |
|
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | /** |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | * @return void |
| 299 | 299 | */ |
| 300 | 300 | function lsx_widget_entry_top() { |
| 301 | - do_action( 'lsx_widget_entry_top' ); |
|
| 301 | + do_action( 'lsx_widget_entry_top' ); |
|
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | /** |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | * @return void |
| 308 | 308 | */ |
| 309 | 309 | function lsx_widget_entry_bottom() { |
| 310 | - do_action( 'lsx_widget_entry_bottom' ); |
|
| 310 | + do_action( 'lsx_widget_entry_bottom' ); |
|
| 311 | 311 | } |
| 312 | 312 | |
| 313 | 313 | /** |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | * @return void |
| 317 | 317 | */ |
| 318 | 318 | function lsx_widget_entry_content_top() { |
| 319 | - do_action( 'lsx_widget_entry_content_top' ); |
|
| 319 | + do_action( 'lsx_widget_entry_content_top' ); |
|
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | /** |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | * @return void |
| 326 | 326 | */ |
| 327 | 327 | function lsx_widget_entry_content_bottom() { |
| 328 | - do_action( 'lsx_widget_entry_content_bottom' ); |
|
| 328 | + do_action( 'lsx_widget_entry_content_bottom' ); |
|
| 329 | 329 | } |
| 330 | 330 | |
| 331 | 331 | /** |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | * $lsx_supports[] = 'comments'; |
| 335 | 335 | */ |
| 336 | 336 | function lsx_comments_before() { |
| 337 | - do_action( 'lsx_comments_before' ); |
|
| 337 | + do_action( 'lsx_comments_before' ); |
|
| 338 | 338 | } |
| 339 | 339 | |
| 340 | 340 | /** |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | * @return void |
| 344 | 344 | */ |
| 345 | 345 | function lsx_comments_after() { |
| 346 | - do_action( 'lsx_comments_after' ); |
|
| 346 | + do_action( 'lsx_comments_after' ); |
|
| 347 | 347 | } |
| 348 | 348 | |
| 349 | 349 | /** |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | * $lsx_supports[] = 'sidebar'; |
| 353 | 353 | */ |
| 354 | 354 | function lsx_sidebars_before() { |
| 355 | - do_action( 'lsx_sidebars_before' ); |
|
| 355 | + do_action( 'lsx_sidebars_before' ); |
|
| 356 | 356 | } |
| 357 | 357 | |
| 358 | 358 | /** |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | * @return void |
| 362 | 362 | */ |
| 363 | 363 | function lsx_sidebars_after() { |
| 364 | - do_action( 'lsx_sidebars_after' ); |
|
| 364 | + do_action( 'lsx_sidebars_after' ); |
|
| 365 | 365 | } |
| 366 | 366 | |
| 367 | 367 | /** |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | * @return void |
| 371 | 371 | */ |
| 372 | 372 | function lsx_sidebar_top() { |
| 373 | - do_action( 'lsx_sidebar_top' ); |
|
| 373 | + do_action( 'lsx_sidebar_top' ); |
|
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | /** |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | * @return void |
| 380 | 380 | */ |
| 381 | 381 | function lsx_sidebar_bottom() { |
| 382 | - do_action( 'lsx_sidebar_bottom' ); |
|
| 382 | + do_action( 'lsx_sidebar_bottom' ); |
|
| 383 | 383 | } |
| 384 | 384 | |
| 385 | 385 | /** |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | * $lsx_supports[] = 'footer'; |
| 389 | 389 | */ |
| 390 | 390 | function lsx_footer_before() { |
| 391 | - do_action( 'lsx_footer_before' ); |
|
| 391 | + do_action( 'lsx_footer_before' ); |
|
| 392 | 392 | } |
| 393 | 393 | |
| 394 | 394 | /** |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | * @return void |
| 398 | 398 | */ |
| 399 | 399 | function lsx_footer_after() { |
| 400 | - do_action( 'lsx_footer_after' ); |
|
| 400 | + do_action( 'lsx_footer_after' ); |
|
| 401 | 401 | } |
| 402 | 402 | |
| 403 | 403 | /** |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | * @return void |
| 407 | 407 | */ |
| 408 | 408 | function lsx_footer_top() { |
| 409 | - do_action( 'lsx_footer_top' ); |
|
| 409 | + do_action( 'lsx_footer_top' ); |
|
| 410 | 410 | } |
| 411 | 411 | |
| 412 | 412 | /** |
@@ -415,5 +415,5 @@ discard block |
||
| 415 | 415 | * @return void |
| 416 | 416 | */ |
| 417 | 417 | function lsx_footer_bottom() { |
| 418 | - do_action( 'lsx_footer_bottom' ); |
|
| 418 | + do_action( 'lsx_footer_bottom' ); |
|
| 419 | 419 | } |
@@ -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. |
@@ -22,26 +22,26 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | // Get plugin version. |
| 24 | 24 | $plugin = 'the-events-calendar/the-events-calendar.php'; |
| 25 | - $data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ); |
|
| 25 | + $data = get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin); |
|
| 26 | 26 | $version = $data['Version']; |
| 27 | 27 | |
| 28 | - if ( substr( $version, 0, 1 ) >= '5' ) { |
|
| 28 | + if (substr($version, 0, 1) >= '5') { |
|
| 29 | 29 | // New Version 5.0 and up. |
| 30 | - wp_enqueue_style( 'the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar-5.css', array( 'lsx_main' ), LSX_VERSION ); |
|
| 30 | + wp_enqueue_style('the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar-5.css', array('lsx_main'), LSX_VERSION); |
|
| 31 | 31 | } else { |
| 32 | 32 | // Old Version. |
| 33 | - wp_enqueue_style( 'the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar.css', array( 'lsx_main' ), LSX_VERSION ); |
|
| 33 | + wp_enqueue_style('the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar.css', array('lsx_main'), LSX_VERSION); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - wp_enqueue_style( 'the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar.css', array( 'lsx_main' ), LSX_VERSION ); |
|
| 37 | - wp_style_add_data( 'the-events-calendar-lsx', 'rtl', 'replace' ); |
|
| 36 | + wp_enqueue_style('the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar.css', array('lsx_main'), LSX_VERSION); |
|
| 37 | + wp_style_add_data('the-events-calendar-lsx', 'rtl', 'replace'); |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - add_action( 'wp_enqueue_scripts', 'lsx_tec_scripts_add_styles' ); |
|
| 40 | + add_action('wp_enqueue_scripts', 'lsx_tec_scripts_add_styles'); |
|
| 41 | 41 | |
| 42 | 42 | endif; |
| 43 | 43 | |
| 44 | -if ( ! function_exists( 'lsx_tec_theme_wrapper_start' ) ) : |
|
| 44 | +if ( ! function_exists('lsx_tec_theme_wrapper_start')) : |
|
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | 47 | * The Events Calendar wrapper start. |
@@ -50,21 +50,21 @@ discard block |
||
| 50 | 50 | * @subpackage the-events-calendar |
| 51 | 51 | */ |
| 52 | 52 | function lsx_tec_theme_wrapper_start() { |
| 53 | - if ( function_exists( 'lsx_is_rest_api_request' ) && lsx_is_rest_api_request() ) { |
|
| 53 | + if (function_exists('lsx_is_rest_api_request') && lsx_is_rest_api_request()) { |
|
| 54 | 54 | return; |
| 55 | 55 | } |
| 56 | 56 | lsx_content_wrap_before(); |
| 57 | - echo '<div id="primary" class="content-area ' . esc_attr( lsx_main_class() ) . '">'; |
|
| 57 | + echo '<div id="primary" class="content-area ' . esc_attr(lsx_main_class()) . '">'; |
|
| 58 | 58 | lsx_content_before(); |
| 59 | 59 | echo '<main id="main" class="site-main" role="main">'; |
| 60 | 60 | lsx_content_top(); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - add_action( 'tribe_events_before_html', 'lsx_tec_theme_wrapper_start', 9 ); |
|
| 63 | + add_action('tribe_events_before_html', 'lsx_tec_theme_wrapper_start', 9); |
|
| 64 | 64 | |
| 65 | 65 | endif; |
| 66 | 66 | |
| 67 | -if ( ! function_exists( 'lsx_tec_theme_wrapper_end' ) ) : |
|
| 67 | +if ( ! function_exists('lsx_tec_theme_wrapper_end')) : |
|
| 68 | 68 | |
| 69 | 69 | /** |
| 70 | 70 | * The Events Calendar wrapper end. |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | * @subpackage the-events-calendar |
| 74 | 74 | */ |
| 75 | 75 | function lsx_tec_theme_wrapper_end() { |
| 76 | - if ( function_exists( 'lsx_is_rest_api_request' ) && lsx_is_rest_api_request() ) { |
|
| 76 | + if (function_exists('lsx_is_rest_api_request') && lsx_is_rest_api_request()) { |
|
| 77 | 77 | return; |
| 78 | 78 | } |
| 79 | 79 | lsx_content_bottom(); |
@@ -83,11 +83,11 @@ discard block |
||
| 83 | 83 | lsx_content_wrap_after(); |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - add_action( 'tribe_events_after_html', 'lsx_tec_theme_wrapper_end', 11 ); |
|
| 86 | + add_action('tribe_events_after_html', 'lsx_tec_theme_wrapper_end', 11); |
|
| 87 | 87 | |
| 88 | 88 | endif; |
| 89 | 89 | |
| 90 | -if ( ! function_exists( 'lsx_tec_global_header_title' ) ) : |
|
| 90 | +if ( ! function_exists('lsx_tec_global_header_title')) : |
|
| 91 | 91 | |
| 92 | 92 | /** |
| 93 | 93 | * Move the events title into the global header |
@@ -95,45 +95,45 @@ discard block |
||
| 95 | 95 | * @package lsx |
| 96 | 96 | * @subpackage the-events-calendar |
| 97 | 97 | */ |
| 98 | - function lsx_tec_global_header_title( $title ) { |
|
| 98 | + function lsx_tec_global_header_title($title) { |
|
| 99 | 99 | |
| 100 | - if ( tribe_is_community_edit_event_page() ) { |
|
| 100 | + if (tribe_is_community_edit_event_page()) { |
|
| 101 | 101 | |
| 102 | - $is_route = get_query_var( 'WP_Route' ); |
|
| 103 | - switch ( $is_route ) { |
|
| 102 | + $is_route = get_query_var('WP_Route'); |
|
| 103 | + switch ($is_route) { |
|
| 104 | 104 | case 'ce-edit-route': |
| 105 | - $title = apply_filters( 'tribe_ce_edit_event_page_title', __( 'Edit an Event', 'lsx' ) ); |
|
| 105 | + $title = apply_filters('tribe_ce_edit_event_page_title', __('Edit an Event', 'lsx')); |
|
| 106 | 106 | break; |
| 107 | 107 | |
| 108 | 108 | case 'ce-edit-organizer-route': |
| 109 | - $title = __( 'Edit an Organizer', 'lsx' ); |
|
| 109 | + $title = __('Edit an Organizer', 'lsx'); |
|
| 110 | 110 | break; |
| 111 | 111 | |
| 112 | 112 | case 'ce-edit-venue-route': |
| 113 | - $title = __( 'Edit a Venue', 'lsx' ); |
|
| 113 | + $title = __('Edit a Venue', 'lsx'); |
|
| 114 | 114 | break; |
| 115 | 115 | |
| 116 | 116 | default: |
| 117 | - $title = apply_filters( 'tribe_ce_submit_event_page_title', __( 'Submit an Event', 'lsx' ) ); |
|
| 117 | + $title = apply_filters('tribe_ce_submit_event_page_title', __('Submit an Event', 'lsx')); |
|
| 118 | 118 | break; |
| 119 | 119 | } |
| 120 | - } elseif ( tribe_is_community_my_events_page() ) { |
|
| 121 | - $title = apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ); |
|
| 122 | - } elseif ( tribe_is_event() ) { |
|
| 120 | + } elseif (tribe_is_community_my_events_page()) { |
|
| 121 | + $title = apply_filters('tribe_ce_submit_event_page_title', __('My Events', 'lsx')); |
|
| 122 | + } elseif (tribe_is_event()) { |
|
| 123 | 123 | $title = tribe_get_events_title(); |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | // Only disable the title after we have retrieved it. |
| 127 | - add_filter( 'tribe_get_events_title', 'lsx_text_disable_body_title', 200, 1 ); |
|
| 127 | + add_filter('tribe_get_events_title', 'lsx_text_disable_body_title', 200, 1); |
|
| 128 | 128 | |
| 129 | - if ( is_singular( 'tribe_events' ) ) { |
|
| 130 | - add_filter( 'the_title', 'lsx_text_disable_body_title', 200, 1 ); |
|
| 129 | + if (is_singular('tribe_events')) { |
|
| 130 | + add_filter('the_title', 'lsx_text_disable_body_title', 200, 1); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | - if ( class_exists( 'LSX_Banners' ) ) { |
|
| 134 | - if ( is_archive() && is_post_type_archive( 'tribe_events' ) ) { |
|
| 135 | - $options = get_option( '_lsx_settings', false ); |
|
| 136 | - if ( is_array( $options ) && isset( $options['tribe_events'] ) && isset( $options['tribe_events']['title'] ) && '' !== $options['tribe_events']['title'] ) { |
|
| 133 | + if (class_exists('LSX_Banners')) { |
|
| 134 | + if (is_archive() && is_post_type_archive('tribe_events')) { |
|
| 135 | + $options = get_option('_lsx_settings', false); |
|
| 136 | + if (is_array($options) && isset($options['tribe_events']) && isset($options['tribe_events']['title']) && '' !== $options['tribe_events']['title']) { |
|
| 137 | 137 | $title = $options['tribe_events']['title']; |
| 138 | 138 | } |
| 139 | 139 | } |
@@ -141,63 +141,63 @@ discard block |
||
| 141 | 141 | } |
| 142 | 142 | return $title; |
| 143 | 143 | } |
| 144 | - add_filter( 'lsx_banner_title', 'lsx_tec_global_header_title', 200, 1 ); |
|
| 145 | - add_filter( 'lsx_global_header_title', 'lsx_tec_global_header_title', 200, 1 ); |
|
| 144 | + add_filter('lsx_banner_title', 'lsx_tec_global_header_title', 200, 1); |
|
| 145 | + add_filter('lsx_global_header_title', 'lsx_tec_global_header_title', 200, 1); |
|
| 146 | 146 | |
| 147 | 147 | endif; |
| 148 | 148 | |
| 149 | -if ( ! function_exists( 'lsx_text_disable_body_title' ) ) : |
|
| 149 | +if ( ! function_exists('lsx_text_disable_body_title')) : |
|
| 150 | 150 | /** |
| 151 | 151 | * Disable the events title for the post archive if the dynamic setting is active. |
| 152 | 152 | * |
| 153 | 153 | * @param $title |
| 154 | 154 | * @return string |
| 155 | 155 | */ |
| 156 | - function lsx_text_disable_body_title( $title ) { |
|
| 156 | + function lsx_text_disable_body_title($title) { |
|
| 157 | 157 | $title = ''; |
| 158 | - remove_filter( 'the_title', 'lsx_text_disable_body_title', 200, 1 ); |
|
| 158 | + remove_filter('the_title', 'lsx_text_disable_body_title', 200, 1); |
|
| 159 | 159 | return $title; |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | endif; |
| 163 | 163 | |
| 164 | -if ( ! function_exists( 'lsx_tec_breadcrumb_filter' ) ) : |
|
| 164 | +if ( ! function_exists('lsx_tec_breadcrumb_filter')) : |
|
| 165 | 165 | /** |
| 166 | 166 | * Fixes the community events breadcrumb |
| 167 | 167 | * |
| 168 | 168 | * @package lsx |
| 169 | 169 | * @subpackage the-events-calendar |
| 170 | 170 | */ |
| 171 | - function lsx_tec_breadcrumb_filter( $crumbs ) { |
|
| 171 | + function lsx_tec_breadcrumb_filter($crumbs) { |
|
| 172 | 172 | |
| 173 | - if ( tribe_is_venue() || tribe_is_organizer() || tribe_is_community_edit_event_page() || tribe_is_community_my_events_page() ) { |
|
| 173 | + if (tribe_is_venue() || tribe_is_organizer() || tribe_is_community_edit_event_page() || tribe_is_community_my_events_page()) { |
|
| 174 | 174 | $new_crumbs = array(); |
| 175 | 175 | $new_crumbs[0] = $crumbs[0]; |
| 176 | 176 | |
| 177 | - if ( function_exists( 'woocommerce_breadcrumb' ) ) { |
|
| 177 | + if (function_exists('woocommerce_breadcrumb')) { |
|
| 178 | 178 | $new_crumbs[1] = array( |
| 179 | - 0 => __( 'Events', 'lsx' ), |
|
| 180 | - 1 => get_post_type_archive_link( 'tribe_events' ), |
|
| 179 | + 0 => __('Events', 'lsx'), |
|
| 180 | + 1 => get_post_type_archive_link('tribe_events'), |
|
| 181 | 181 | ); |
| 182 | 182 | } else { |
| 183 | 183 | $new_crumbs[1] = array( |
| 184 | - 'text' => __( 'Events', 'lsx' ), |
|
| 185 | - 'url' => get_post_type_archive_link( 'tribe_events' ), |
|
| 184 | + 'text' => __('Events', 'lsx'), |
|
| 185 | + 'url' => get_post_type_archive_link('tribe_events'), |
|
| 186 | 186 | ); |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | - if ( tribe_is_community_my_events_page() ) { |
|
| 189 | + if (tribe_is_community_my_events_page()) { |
|
| 190 | 190 | $new_crumbs[2] = $crumbs[2]; |
| 191 | - } elseif ( tribe_is_community_edit_event_page() ) { |
|
| 191 | + } elseif (tribe_is_community_edit_event_page()) { |
|
| 192 | 192 | |
| 193 | - if ( function_exists( 'woocommerce_breadcrumb' ) ) { |
|
| 193 | + if (function_exists('woocommerce_breadcrumb')) { |
|
| 194 | 194 | $new_crumbs[2] = array( |
| 195 | - 0 => apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ), |
|
| 195 | + 0 => apply_filters('tribe_ce_submit_event_page_title', __('My Events', 'lsx')), |
|
| 196 | 196 | 1 => tribe_community_events_list_events_link(), |
| 197 | 197 | ); |
| 198 | 198 | } else { |
| 199 | 199 | $new_crumbs[2] = array( |
| 200 | - 'text' => apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ), |
|
| 200 | + 'text' => apply_filters('tribe_ce_submit_event_page_title', __('My Events', 'lsx')), |
|
| 201 | 201 | 'url' => tribe_community_events_list_events_link(), |
| 202 | 202 | ); |
| 203 | 203 | } |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | } |
| 211 | 211 | return $crumbs; |
| 212 | 212 | } |
| 213 | - add_filter( 'wpseo_breadcrumb_links', 'lsx_tec_breadcrumb_filter', 30, 1 ); |
|
| 214 | - add_filter( 'woocommerce_get_breadcrumb', 'lsx_tec_breadcrumb_filter', 30, 1 ); |
|
| 213 | + add_filter('wpseo_breadcrumb_links', 'lsx_tec_breadcrumb_filter', 30, 1); |
|
| 214 | + add_filter('woocommerce_get_breadcrumb', 'lsx_tec_breadcrumb_filter', 30, 1); |
|
| 215 | 215 | |
| 216 | 216 | endif; |
@@ -7,210 +7,210 @@ |
||
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | - exit; |
|
| 10 | + exit; |
|
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | if ( ! function_exists( 'lsx_tec_scripts_add_styles' ) ) : |
| 14 | 14 | |
| 15 | - /** |
|
| 16 | - * The Events Calendar enqueue styles. |
|
| 17 | - * |
|
| 18 | - * @package lsx |
|
| 19 | - * @subpackage the-events-calendar |
|
| 20 | - */ |
|
| 21 | - function lsx_tec_scripts_add_styles() { |
|
| 22 | - |
|
| 23 | - // Get plugin version. |
|
| 24 | - $plugin = 'the-events-calendar/the-events-calendar.php'; |
|
| 25 | - $data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ); |
|
| 26 | - $version = $data['Version']; |
|
| 27 | - |
|
| 28 | - if ( substr( $version, 0, 1 ) >= '5' ) { |
|
| 29 | - // New Version 5.0 and up. |
|
| 30 | - wp_enqueue_style( 'the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar-5.css', array( 'lsx_main' ), LSX_VERSION ); |
|
| 31 | - } else { |
|
| 32 | - // Old Version. |
|
| 33 | - wp_enqueue_style( 'the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar.css', array( 'lsx_main' ), LSX_VERSION ); |
|
| 34 | - } |
|
| 35 | - |
|
| 36 | - wp_enqueue_style( 'the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar.css', array( 'lsx_main' ), LSX_VERSION ); |
|
| 37 | - wp_style_add_data( 'the-events-calendar-lsx', 'rtl', 'replace' ); |
|
| 38 | - } |
|
| 39 | - |
|
| 40 | - add_action( 'wp_enqueue_scripts', 'lsx_tec_scripts_add_styles' ); |
|
| 15 | + /** |
|
| 16 | + * The Events Calendar enqueue styles. |
|
| 17 | + * |
|
| 18 | + * @package lsx |
|
| 19 | + * @subpackage the-events-calendar |
|
| 20 | + */ |
|
| 21 | + function lsx_tec_scripts_add_styles() { |
|
| 22 | + |
|
| 23 | + // Get plugin version. |
|
| 24 | + $plugin = 'the-events-calendar/the-events-calendar.php'; |
|
| 25 | + $data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ); |
|
| 26 | + $version = $data['Version']; |
|
| 27 | + |
|
| 28 | + if ( substr( $version, 0, 1 ) >= '5' ) { |
|
| 29 | + // New Version 5.0 and up. |
|
| 30 | + wp_enqueue_style( 'the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar-5.css', array( 'lsx_main' ), LSX_VERSION ); |
|
| 31 | + } else { |
|
| 32 | + // Old Version. |
|
| 33 | + wp_enqueue_style( 'the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar.css', array( 'lsx_main' ), LSX_VERSION ); |
|
| 34 | + } |
|
| 35 | + |
|
| 36 | + wp_enqueue_style( 'the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar.css', array( 'lsx_main' ), LSX_VERSION ); |
|
| 37 | + wp_style_add_data( 'the-events-calendar-lsx', 'rtl', 'replace' ); |
|
| 38 | + } |
|
| 39 | + |
|
| 40 | + add_action( 'wp_enqueue_scripts', 'lsx_tec_scripts_add_styles' ); |
|
| 41 | 41 | |
| 42 | 42 | endif; |
| 43 | 43 | |
| 44 | 44 | if ( ! function_exists( 'lsx_tec_theme_wrapper_start' ) ) : |
| 45 | 45 | |
| 46 | - /** |
|
| 47 | - * The Events Calendar wrapper start. |
|
| 48 | - * |
|
| 49 | - * @package lsx |
|
| 50 | - * @subpackage the-events-calendar |
|
| 51 | - */ |
|
| 52 | - function lsx_tec_theme_wrapper_start() { |
|
| 53 | - if ( function_exists( 'lsx_is_rest_api_request' ) && lsx_is_rest_api_request() ) { |
|
| 54 | - return; |
|
| 55 | - } |
|
| 56 | - lsx_content_wrap_before(); |
|
| 57 | - echo '<div id="primary" class="content-area ' . esc_attr( lsx_main_class() ) . '">'; |
|
| 58 | - lsx_content_before(); |
|
| 59 | - echo '<main id="main" class="site-main" role="main">'; |
|
| 60 | - lsx_content_top(); |
|
| 61 | - } |
|
| 62 | - |
|
| 63 | - add_action( 'tribe_events_before_html', 'lsx_tec_theme_wrapper_start', 9 ); |
|
| 46 | + /** |
|
| 47 | + * The Events Calendar wrapper start. |
|
| 48 | + * |
|
| 49 | + * @package lsx |
|
| 50 | + * @subpackage the-events-calendar |
|
| 51 | + */ |
|
| 52 | + function lsx_tec_theme_wrapper_start() { |
|
| 53 | + if ( function_exists( 'lsx_is_rest_api_request' ) && lsx_is_rest_api_request() ) { |
|
| 54 | + return; |
|
| 55 | + } |
|
| 56 | + lsx_content_wrap_before(); |
|
| 57 | + echo '<div id="primary" class="content-area ' . esc_attr( lsx_main_class() ) . '">'; |
|
| 58 | + lsx_content_before(); |
|
| 59 | + echo '<main id="main" class="site-main" role="main">'; |
|
| 60 | + lsx_content_top(); |
|
| 61 | + } |
|
| 62 | + |
|
| 63 | + add_action( 'tribe_events_before_html', 'lsx_tec_theme_wrapper_start', 9 ); |
|
| 64 | 64 | |
| 65 | 65 | endif; |
| 66 | 66 | |
| 67 | 67 | if ( ! function_exists( 'lsx_tec_theme_wrapper_end' ) ) : |
| 68 | 68 | |
| 69 | - /** |
|
| 70 | - * The Events Calendar wrapper end. |
|
| 71 | - * |
|
| 72 | - * @package lsx |
|
| 73 | - * @subpackage the-events-calendar |
|
| 74 | - */ |
|
| 75 | - function lsx_tec_theme_wrapper_end() { |
|
| 76 | - if ( function_exists( 'lsx_is_rest_api_request' ) && lsx_is_rest_api_request() ) { |
|
| 77 | - return; |
|
| 78 | - } |
|
| 79 | - lsx_content_bottom(); |
|
| 80 | - echo '</main>'; |
|
| 81 | - lsx_content_after(); |
|
| 82 | - echo '</div>'; |
|
| 83 | - lsx_content_wrap_after(); |
|
| 84 | - } |
|
| 85 | - |
|
| 86 | - add_action( 'tribe_events_after_html', 'lsx_tec_theme_wrapper_end', 11 ); |
|
| 69 | + /** |
|
| 70 | + * The Events Calendar wrapper end. |
|
| 71 | + * |
|
| 72 | + * @package lsx |
|
| 73 | + * @subpackage the-events-calendar |
|
| 74 | + */ |
|
| 75 | + function lsx_tec_theme_wrapper_end() { |
|
| 76 | + if ( function_exists( 'lsx_is_rest_api_request' ) && lsx_is_rest_api_request() ) { |
|
| 77 | + return; |
|
| 78 | + } |
|
| 79 | + lsx_content_bottom(); |
|
| 80 | + echo '</main>'; |
|
| 81 | + lsx_content_after(); |
|
| 82 | + echo '</div>'; |
|
| 83 | + lsx_content_wrap_after(); |
|
| 84 | + } |
|
| 85 | + |
|
| 86 | + add_action( 'tribe_events_after_html', 'lsx_tec_theme_wrapper_end', 11 ); |
|
| 87 | 87 | |
| 88 | 88 | endif; |
| 89 | 89 | |
| 90 | 90 | if ( ! function_exists( 'lsx_tec_global_header_title' ) ) : |
| 91 | 91 | |
| 92 | - /** |
|
| 93 | - * Move the events title into the global header |
|
| 94 | - * |
|
| 95 | - * @package lsx |
|
| 96 | - * @subpackage the-events-calendar |
|
| 97 | - */ |
|
| 98 | - function lsx_tec_global_header_title( $title ) { |
|
| 99 | - |
|
| 100 | - if ( tribe_is_community_edit_event_page() ) { |
|
| 101 | - |
|
| 102 | - $is_route = get_query_var( 'WP_Route' ); |
|
| 103 | - switch ( $is_route ) { |
|
| 104 | - case 'ce-edit-route': |
|
| 105 | - $title = apply_filters( 'tribe_ce_edit_event_page_title', __( 'Edit an Event', 'lsx' ) ); |
|
| 106 | - break; |
|
| 107 | - |
|
| 108 | - case 'ce-edit-organizer-route': |
|
| 109 | - $title = __( 'Edit an Organizer', 'lsx' ); |
|
| 110 | - break; |
|
| 111 | - |
|
| 112 | - case 'ce-edit-venue-route': |
|
| 113 | - $title = __( 'Edit a Venue', 'lsx' ); |
|
| 114 | - break; |
|
| 115 | - |
|
| 116 | - default: |
|
| 117 | - $title = apply_filters( 'tribe_ce_submit_event_page_title', __( 'Submit an Event', 'lsx' ) ); |
|
| 118 | - break; |
|
| 119 | - } |
|
| 120 | - } elseif ( tribe_is_community_my_events_page() ) { |
|
| 121 | - $title = apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ); |
|
| 122 | - } elseif ( tribe_is_event() ) { |
|
| 123 | - $title = tribe_get_events_title(); |
|
| 124 | - } |
|
| 125 | - |
|
| 126 | - // Only disable the title after we have retrieved it. |
|
| 127 | - add_filter( 'tribe_get_events_title', 'lsx_text_disable_body_title', 200, 1 ); |
|
| 128 | - |
|
| 129 | - if ( is_singular( 'tribe_events' ) ) { |
|
| 130 | - add_filter( 'the_title', 'lsx_text_disable_body_title', 200, 1 ); |
|
| 131 | - } |
|
| 132 | - |
|
| 133 | - if ( class_exists( 'LSX_Banners' ) ) { |
|
| 134 | - if ( is_archive() && is_post_type_archive( 'tribe_events' ) ) { |
|
| 135 | - $options = get_option( '_lsx_settings', false ); |
|
| 136 | - if ( is_array( $options ) && isset( $options['tribe_events'] ) && isset( $options['tribe_events']['title'] ) && '' !== $options['tribe_events']['title'] ) { |
|
| 137 | - $title = $options['tribe_events']['title']; |
|
| 138 | - } |
|
| 139 | - } |
|
| 140 | - $title = '<h1 class="page-title">' . $title . '</h1>'; |
|
| 141 | - } |
|
| 142 | - return $title; |
|
| 143 | - } |
|
| 144 | - add_filter( 'lsx_banner_title', 'lsx_tec_global_header_title', 200, 1 ); |
|
| 145 | - add_filter( 'lsx_global_header_title', 'lsx_tec_global_header_title', 200, 1 ); |
|
| 92 | + /** |
|
| 93 | + * Move the events title into the global header |
|
| 94 | + * |
|
| 95 | + * @package lsx |
|
| 96 | + * @subpackage the-events-calendar |
|
| 97 | + */ |
|
| 98 | + function lsx_tec_global_header_title( $title ) { |
|
| 99 | + |
|
| 100 | + if ( tribe_is_community_edit_event_page() ) { |
|
| 101 | + |
|
| 102 | + $is_route = get_query_var( 'WP_Route' ); |
|
| 103 | + switch ( $is_route ) { |
|
| 104 | + case 'ce-edit-route': |
|
| 105 | + $title = apply_filters( 'tribe_ce_edit_event_page_title', __( 'Edit an Event', 'lsx' ) ); |
|
| 106 | + break; |
|
| 107 | + |
|
| 108 | + case 'ce-edit-organizer-route': |
|
| 109 | + $title = __( 'Edit an Organizer', 'lsx' ); |
|
| 110 | + break; |
|
| 111 | + |
|
| 112 | + case 'ce-edit-venue-route': |
|
| 113 | + $title = __( 'Edit a Venue', 'lsx' ); |
|
| 114 | + break; |
|
| 115 | + |
|
| 116 | + default: |
|
| 117 | + $title = apply_filters( 'tribe_ce_submit_event_page_title', __( 'Submit an Event', 'lsx' ) ); |
|
| 118 | + break; |
|
| 119 | + } |
|
| 120 | + } elseif ( tribe_is_community_my_events_page() ) { |
|
| 121 | + $title = apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ); |
|
| 122 | + } elseif ( tribe_is_event() ) { |
|
| 123 | + $title = tribe_get_events_title(); |
|
| 124 | + } |
|
| 125 | + |
|
| 126 | + // Only disable the title after we have retrieved it. |
|
| 127 | + add_filter( 'tribe_get_events_title', 'lsx_text_disable_body_title', 200, 1 ); |
|
| 128 | + |
|
| 129 | + if ( is_singular( 'tribe_events' ) ) { |
|
| 130 | + add_filter( 'the_title', 'lsx_text_disable_body_title', 200, 1 ); |
|
| 131 | + } |
|
| 132 | + |
|
| 133 | + if ( class_exists( 'LSX_Banners' ) ) { |
|
| 134 | + if ( is_archive() && is_post_type_archive( 'tribe_events' ) ) { |
|
| 135 | + $options = get_option( '_lsx_settings', false ); |
|
| 136 | + if ( is_array( $options ) && isset( $options['tribe_events'] ) && isset( $options['tribe_events']['title'] ) && '' !== $options['tribe_events']['title'] ) { |
|
| 137 | + $title = $options['tribe_events']['title']; |
|
| 138 | + } |
|
| 139 | + } |
|
| 140 | + $title = '<h1 class="page-title">' . $title . '</h1>'; |
|
| 141 | + } |
|
| 142 | + return $title; |
|
| 143 | + } |
|
| 144 | + add_filter( 'lsx_banner_title', 'lsx_tec_global_header_title', 200, 1 ); |
|
| 145 | + add_filter( 'lsx_global_header_title', 'lsx_tec_global_header_title', 200, 1 ); |
|
| 146 | 146 | |
| 147 | 147 | endif; |
| 148 | 148 | |
| 149 | 149 | if ( ! function_exists( 'lsx_text_disable_body_title' ) ) : |
| 150 | - /** |
|
| 151 | - * Disable the events title for the post archive if the dynamic setting is active. |
|
| 152 | - * |
|
| 153 | - * @param $title |
|
| 154 | - * @return string |
|
| 155 | - */ |
|
| 156 | - function lsx_text_disable_body_title( $title ) { |
|
| 157 | - $title = ''; |
|
| 158 | - remove_filter( 'the_title', 'lsx_text_disable_body_title', 200, 1 ); |
|
| 159 | - return $title; |
|
| 160 | - } |
|
| 150 | + /** |
|
| 151 | + * Disable the events title for the post archive if the dynamic setting is active. |
|
| 152 | + * |
|
| 153 | + * @param $title |
|
| 154 | + * @return string |
|
| 155 | + */ |
|
| 156 | + function lsx_text_disable_body_title( $title ) { |
|
| 157 | + $title = ''; |
|
| 158 | + remove_filter( 'the_title', 'lsx_text_disable_body_title', 200, 1 ); |
|
| 159 | + return $title; |
|
| 160 | + } |
|
| 161 | 161 | |
| 162 | 162 | endif; |
| 163 | 163 | |
| 164 | 164 | if ( ! function_exists( 'lsx_tec_breadcrumb_filter' ) ) : |
| 165 | - /** |
|
| 166 | - * Fixes the community events breadcrumb |
|
| 167 | - * |
|
| 168 | - * @package lsx |
|
| 169 | - * @subpackage the-events-calendar |
|
| 170 | - */ |
|
| 171 | - function lsx_tec_breadcrumb_filter( $crumbs ) { |
|
| 172 | - |
|
| 173 | - if ( tribe_is_venue() || tribe_is_organizer() || tribe_is_community_edit_event_page() || tribe_is_community_my_events_page() ) { |
|
| 174 | - $new_crumbs = array(); |
|
| 175 | - $new_crumbs[0] = $crumbs[0]; |
|
| 176 | - |
|
| 177 | - if ( function_exists( 'woocommerce_breadcrumb' ) ) { |
|
| 178 | - $new_crumbs[1] = array( |
|
| 179 | - 0 => __( 'Events', 'lsx' ), |
|
| 180 | - 1 => get_post_type_archive_link( 'tribe_events' ), |
|
| 181 | - ); |
|
| 182 | - } else { |
|
| 183 | - $new_crumbs[1] = array( |
|
| 184 | - 'text' => __( 'Events', 'lsx' ), |
|
| 185 | - 'url' => get_post_type_archive_link( 'tribe_events' ), |
|
| 186 | - ); |
|
| 187 | - } |
|
| 188 | - |
|
| 189 | - if ( tribe_is_community_my_events_page() ) { |
|
| 190 | - $new_crumbs[2] = $crumbs[2]; |
|
| 191 | - } elseif ( tribe_is_community_edit_event_page() ) { |
|
| 192 | - |
|
| 193 | - if ( function_exists( 'woocommerce_breadcrumb' ) ) { |
|
| 194 | - $new_crumbs[2] = array( |
|
| 195 | - 0 => apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ), |
|
| 196 | - 1 => tribe_community_events_list_events_link(), |
|
| 197 | - ); |
|
| 198 | - } else { |
|
| 199 | - $new_crumbs[2] = array( |
|
| 200 | - 'text' => apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ), |
|
| 201 | - 'url' => tribe_community_events_list_events_link(), |
|
| 202 | - ); |
|
| 203 | - } |
|
| 204 | - |
|
| 205 | - $new_crumbs[3] = $crumbs[2]; |
|
| 206 | - } else { |
|
| 207 | - $new_crumbs[2] = $crumbs[1]; |
|
| 208 | - } |
|
| 209 | - $crumbs = $new_crumbs; |
|
| 210 | - } |
|
| 211 | - return $crumbs; |
|
| 212 | - } |
|
| 213 | - add_filter( 'wpseo_breadcrumb_links', 'lsx_tec_breadcrumb_filter', 30, 1 ); |
|
| 214 | - add_filter( 'woocommerce_get_breadcrumb', 'lsx_tec_breadcrumb_filter', 30, 1 ); |
|
| 165 | + /** |
|
| 166 | + * Fixes the community events breadcrumb |
|
| 167 | + * |
|
| 168 | + * @package lsx |
|
| 169 | + * @subpackage the-events-calendar |
|
| 170 | + */ |
|
| 171 | + function lsx_tec_breadcrumb_filter( $crumbs ) { |
|
| 172 | + |
|
| 173 | + if ( tribe_is_venue() || tribe_is_organizer() || tribe_is_community_edit_event_page() || tribe_is_community_my_events_page() ) { |
|
| 174 | + $new_crumbs = array(); |
|
| 175 | + $new_crumbs[0] = $crumbs[0]; |
|
| 176 | + |
|
| 177 | + if ( function_exists( 'woocommerce_breadcrumb' ) ) { |
|
| 178 | + $new_crumbs[1] = array( |
|
| 179 | + 0 => __( 'Events', 'lsx' ), |
|
| 180 | + 1 => get_post_type_archive_link( 'tribe_events' ), |
|
| 181 | + ); |
|
| 182 | + } else { |
|
| 183 | + $new_crumbs[1] = array( |
|
| 184 | + 'text' => __( 'Events', 'lsx' ), |
|
| 185 | + 'url' => get_post_type_archive_link( 'tribe_events' ), |
|
| 186 | + ); |
|
| 187 | + } |
|
| 188 | + |
|
| 189 | + if ( tribe_is_community_my_events_page() ) { |
|
| 190 | + $new_crumbs[2] = $crumbs[2]; |
|
| 191 | + } elseif ( tribe_is_community_edit_event_page() ) { |
|
| 192 | + |
|
| 193 | + if ( function_exists( 'woocommerce_breadcrumb' ) ) { |
|
| 194 | + $new_crumbs[2] = array( |
|
| 195 | + 0 => apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ), |
|
| 196 | + 1 => tribe_community_events_list_events_link(), |
|
| 197 | + ); |
|
| 198 | + } else { |
|
| 199 | + $new_crumbs[2] = array( |
|
| 200 | + 'text' => apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ), |
|
| 201 | + 'url' => tribe_community_events_list_events_link(), |
|
| 202 | + ); |
|
| 203 | + } |
|
| 204 | + |
|
| 205 | + $new_crumbs[3] = $crumbs[2]; |
|
| 206 | + } else { |
|
| 207 | + $new_crumbs[2] = $crumbs[1]; |
|
| 208 | + } |
|
| 209 | + $crumbs = $new_crumbs; |
|
| 210 | + } |
|
| 211 | + return $crumbs; |
|
| 212 | + } |
|
| 213 | + add_filter( 'wpseo_breadcrumb_links', 'lsx_tec_breadcrumb_filter', 30, 1 ); |
|
| 214 | + add_filter( 'woocommerce_get_breadcrumb', 'lsx_tec_breadcrumb_filter', 30, 1 ); |
|
| 215 | 215 | |
| 216 | 216 | endif; |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 3 | +if ( ! defined('ABSPATH')) { |
|
| 4 | 4 | exit; |
| 5 | 5 | } |
| 6 | 6 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | * Constructor. |
| 34 | 34 | */ |
| 35 | 35 | public function __construct() { |
| 36 | - add_filter( 'tribe_events_views_v2_rest_params', array( $this, 'check_event_request' ), 10, 2 ); |
|
| 36 | + add_filter('tribe_events_views_v2_rest_params', array($this, 'check_event_request'), 10, 2); |
|
| 37 | 37 | } |
| 38 | 38 | /** |
| 39 | 39 | * Return an instance of this class. |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public static function get_instance() { |
| 45 | 45 | // If the single instance hasn't been set, set it now. |
| 46 | - if ( null === self::$instance ) { |
|
| 46 | + if (null === self::$instance) { |
|
| 47 | 47 | self::$instance = new self; |
| 48 | 48 | } |
| 49 | 49 | return self::$instance; |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | * @param array $request |
| 57 | 57 | * @return void |
| 58 | 58 | */ |
| 59 | - public function check_event_request( $params, $request ) { |
|
| 59 | + public function check_event_request($params, $request) { |
|
| 60 | 60 | $this->is_rest_request = true; |
| 61 | 61 | return $params; |
| 62 | 62 | } |
@@ -67,15 +67,15 @@ discard block |
||
| 67 | 67 | * @return bool True if it's a REST API request, false otherwise. |
| 68 | 68 | */ |
| 69 | 69 | public function is_rest_api_request() { |
| 70 | - if ( true === $this->is_rest_request ) { |
|
| 70 | + if (true === $this->is_rest_request) { |
|
| 71 | 71 | return $this->is_rest_request; |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - if ( empty( $_SERVER['REQUEST_URI'] ) ) { |
|
| 74 | + if (empty($_SERVER['REQUEST_URI'])) { |
|
| 75 | 75 | return false; |
| 76 | 76 | } |
| 77 | - $rest_prefix = trailingslashit( rest_get_url_prefix() ); |
|
| 78 | - $this->is_rest_request = ( false !== strpos( $_SERVER['REQUEST_URI'], $rest_prefix ) ); |
|
| 77 | + $rest_prefix = trailingslashit(rest_get_url_prefix()); |
|
| 78 | + $this->is_rest_request = (false !== strpos($_SERVER['REQUEST_URI'], $rest_prefix)); |
|
| 79 | 79 | return $this->is_rest_request; |
| 80 | 80 | } |
| 81 | 81 | } |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | - exit; |
|
| 4 | + exit; |
|
| 5 | 5 | } |
| 6 | 6 | |
| 7 | 7 | /** |
@@ -14,69 +14,69 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | class LSX_Rest_Helper { |
| 16 | 16 | |
| 17 | - /** |
|
| 18 | - * Holds class instance |
|
| 19 | - * |
|
| 20 | - * @since 1.0.0 |
|
| 21 | - * @var object |
|
| 22 | - */ |
|
| 23 | - protected static $instance = null; |
|
| 17 | + /** |
|
| 18 | + * Holds class instance |
|
| 19 | + * |
|
| 20 | + * @since 1.0.0 |
|
| 21 | + * @var object |
|
| 22 | + */ |
|
| 23 | + protected static $instance = null; |
|
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * Holds the conditional. |
|
| 27 | - * |
|
| 28 | - * @var boolean |
|
| 29 | - */ |
|
| 30 | - protected $is_rest_request = false; |
|
| 25 | + /** |
|
| 26 | + * Holds the conditional. |
|
| 27 | + * |
|
| 28 | + * @var boolean |
|
| 29 | + */ |
|
| 30 | + protected $is_rest_request = false; |
|
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * Constructor. |
|
| 34 | - */ |
|
| 35 | - public function __construct() { |
|
| 36 | - add_filter( 'tribe_events_views_v2_rest_params', array( $this, 'check_event_request' ), 10, 2 ); |
|
| 37 | - } |
|
| 38 | - /** |
|
| 39 | - * Return an instance of this class. |
|
| 40 | - * |
|
| 41 | - * @since 1.0.0 |
|
| 42 | - * @return object A single instance of this class. |
|
| 43 | - */ |
|
| 44 | - public static function get_instance() { |
|
| 45 | - // If the single instance hasn't been set, set it now. |
|
| 46 | - if ( null === self::$instance ) { |
|
| 47 | - self::$instance = new self; |
|
| 48 | - } |
|
| 49 | - return self::$instance; |
|
| 50 | - } |
|
| 32 | + /** |
|
| 33 | + * Constructor. |
|
| 34 | + */ |
|
| 35 | + public function __construct() { |
|
| 36 | + add_filter( 'tribe_events_views_v2_rest_params', array( $this, 'check_event_request' ), 10, 2 ); |
|
| 37 | + } |
|
| 38 | + /** |
|
| 39 | + * Return an instance of this class. |
|
| 40 | + * |
|
| 41 | + * @since 1.0.0 |
|
| 42 | + * @return object A single instance of this class. |
|
| 43 | + */ |
|
| 44 | + public static function get_instance() { |
|
| 45 | + // If the single instance hasn't been set, set it now. |
|
| 46 | + if ( null === self::$instance ) { |
|
| 47 | + self::$instance = new self; |
|
| 48 | + } |
|
| 49 | + return self::$instance; |
|
| 50 | + } |
|
| 51 | 51 | |
| 52 | - /** |
|
| 53 | - * This will set the 'is_rest_request' variable as true if it runs. Tribe has already done the checkes for us. |
|
| 54 | - * |
|
| 55 | - * @param array $params |
|
| 56 | - * @param array $request |
|
| 57 | - * @return void |
|
| 58 | - */ |
|
| 59 | - public function check_event_request( $params, $request ) { |
|
| 60 | - $this->is_rest_request = true; |
|
| 61 | - return $params; |
|
| 62 | - } |
|
| 52 | + /** |
|
| 53 | + * This will set the 'is_rest_request' variable as true if it runs. Tribe has already done the checkes for us. |
|
| 54 | + * |
|
| 55 | + * @param array $params |
|
| 56 | + * @param array $request |
|
| 57 | + * @return void |
|
| 58 | + */ |
|
| 59 | + public function check_event_request( $params, $request ) { |
|
| 60 | + $this->is_rest_request = true; |
|
| 61 | + return $params; |
|
| 62 | + } |
|
| 63 | 63 | |
| 64 | - /** |
|
| 65 | - * Determines if the request is an REST API request. |
|
| 66 | - * |
|
| 67 | - * @return bool True if it's a REST API request, false otherwise. |
|
| 68 | - */ |
|
| 69 | - public function is_rest_api_request() { |
|
| 70 | - if ( true === $this->is_rest_request ) { |
|
| 71 | - return $this->is_rest_request; |
|
| 72 | - } |
|
| 64 | + /** |
|
| 65 | + * Determines if the request is an REST API request. |
|
| 66 | + * |
|
| 67 | + * @return bool True if it's a REST API request, false otherwise. |
|
| 68 | + */ |
|
| 69 | + public function is_rest_api_request() { |
|
| 70 | + if ( true === $this->is_rest_request ) { |
|
| 71 | + return $this->is_rest_request; |
|
| 72 | + } |
|
| 73 | 73 | |
| 74 | - if ( empty( $_SERVER['REQUEST_URI'] ) ) { |
|
| 75 | - return false; |
|
| 76 | - } |
|
| 77 | - $rest_prefix = trailingslashit( rest_get_url_prefix() ); |
|
| 78 | - $this->is_rest_request = ( false !== strpos( $_SERVER['REQUEST_URI'], $rest_prefix ) ); |
|
| 79 | - return $this->is_rest_request; |
|
| 80 | - } |
|
| 74 | + if ( empty( $_SERVER['REQUEST_URI'] ) ) { |
|
| 75 | + return false; |
|
| 76 | + } |
|
| 77 | + $rest_prefix = trailingslashit( rest_get_url_prefix() ); |
|
| 78 | + $this->is_rest_request = ( false !== strpos( $_SERVER['REQUEST_URI'], $rest_prefix ) ); |
|
| 79 | + return $this->is_rest_request; |
|
| 80 | + } |
|
| 81 | 81 | } |
| 82 | 82 | $rest_helper = LSX_Rest_Helper::get_instance(); |
@@ -21,14 +21,14 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | <?php lsx_content_top(); ?> |
| 23 | 23 | |
| 24 | - <?php if ( have_posts() ) : ?> |
|
| 24 | + <?php if (have_posts()) : ?> |
|
| 25 | 25 | |
| 26 | 26 | <?php |
| 27 | - while ( have_posts() ) : |
|
| 27 | + while (have_posts()) : |
|
| 28 | 28 | the_post(); |
| 29 | 29 | ?> |
| 30 | 30 | |
| 31 | - <?php get_template_part( 'partials/content', 'page-cover' ); ?> |
|
| 31 | + <?php get_template_part('partials/content', 'page-cover'); ?> |
|
| 32 | 32 | |
| 33 | 33 | <?php endwhile; ?> |
| 34 | 34 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | <?php lsx_content_bottom(); ?> |
| 38 | 38 | |
| 39 | 39 | <?php |
| 40 | - if ( comments_open() ) { |
|
| 40 | + if (comments_open()) { |
|
| 41 | 41 | comments_template(); |
| 42 | 42 | } |
| 43 | 43 | ?> |
@@ -24,9 +24,9 @@ discard block |
||
| 24 | 24 | <?php if ( have_posts() ) : ?> |
| 25 | 25 | |
| 26 | 26 | <?php |
| 27 | - while ( have_posts() ) : |
|
| 28 | - the_post(); |
|
| 29 | - ?> |
|
| 27 | + while ( have_posts() ) : |
|
| 28 | + the_post(); |
|
| 29 | + ?> |
|
| 30 | 30 | |
| 31 | 31 | <?php get_template_part( 'partials/content', 'page-cover' ); ?> |
| 32 | 32 | |
@@ -37,10 +37,10 @@ discard block |
||
| 37 | 37 | <?php lsx_content_bottom(); ?> |
| 38 | 38 | |
| 39 | 39 | <?php |
| 40 | - if ( comments_open() ) { |
|
| 41 | - comments_template(); |
|
| 42 | - } |
|
| 43 | - ?> |
|
| 40 | + if ( comments_open() ) { |
|
| 41 | + comments_template(); |
|
| 42 | + } |
|
| 43 | + ?> |
|
| 44 | 44 | |
| 45 | 45 | </main><!-- #main --> |
| 46 | 46 | |