@@ -1,5 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + return; |
|
4 | +} |
|
5 | +// Exit if accessed directly |
|
3 | 6 | |
4 | 7 | /** |
5 | 8 | * Yoast Breadcrumbs on Twitter Bootstrap |
@@ -24,7 +27,7 @@ discard block |
||
24 | 27 | woocommerce_breadcrumb(); |
25 | 28 | $output = ob_get_clean(); |
26 | 29 | $output = str_replace('woocommerce-breadcrumb', 'woocommerce-breadcrumb breadcrumbs-container', $output); |
27 | - }elseif(function_exists('yoast_breadcrumb')){ |
|
30 | + } elseif(function_exists('yoast_breadcrumb')){ |
|
28 | 31 | // Default Yoast Breadcrumbs Separator |
29 | 32 | $old_sep = '\»\;'; |
30 | 33 | |
@@ -326,9 +329,9 @@ discard block |
||
326 | 329 | |
327 | 330 | if(current_theme_supports('infinite-scroll') && class_exists('The_Neverending_Home_Page')){ |
328 | 331 | return true; |
329 | - }elseif(function_exists('wp_pagenavi')){ |
|
332 | + } elseif(function_exists('wp_pagenavi')){ |
|
330 | 333 | wp_pagenavi(); |
331 | - }else{ |
|
334 | + } else{ |
|
332 | 335 | |
333 | 336 | $labels = array( |
334 | 337 | 'next' => '<span class="meta-nav">←</span> '.esc_html__( 'Older posts', 'lsx' ), |
@@ -406,9 +409,9 @@ discard block |
||
406 | 409 | |
407 | 410 | if ( function_exists('has_custom_logo') && has_custom_logo() ) { |
408 | 411 | the_custom_logo(); |
409 | - }elseif ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) { |
|
412 | + } elseif ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) { |
|
410 | 413 | jetpack_the_site_logo(); |
411 | - }else{ |
|
414 | + } else{ |
|
412 | 415 | // shouldn't show both together.. its just strange |
413 | 416 | if(true == get_theme_mod('site_logo_header_text',1)){ |
414 | 417 | lsx_site_title(); |
@@ -534,7 +537,7 @@ discard block |
||
534 | 537 | $post_type_object = get_post_type_object($post_type); |
535 | 538 | if(null != $post_type_object){ |
536 | 539 | $title = $post_type_object->labels->name; |
537 | - }else{ |
|
540 | + } else{ |
|
538 | 541 | $title = ucwords($post_type); |
539 | 542 | } |
540 | 543 | |
@@ -689,8 +692,9 @@ discard block |
||
689 | 692 | * @category urls |
690 | 693 | */ |
691 | 694 | function lsx_get_my_url() { |
692 | - if ( ! preg_match( '/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) ) |
|
693 | - return false; |
|
695 | + if ( ! preg_match( '/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) ) { |
|
696 | + return false; |
|
697 | + } |
|
694 | 698 | |
695 | 699 | return esc_url_raw( $matches[1] ); |
696 | 700 | } |
@@ -707,14 +711,14 @@ discard block |
||
707 | 711 | $part = (string) $part; |
708 | 712 | if ( '' !== $part ){ |
709 | 713 | $template = "{$slug}-{$part}.php"; |
710 | - }else{ |
|
714 | + } else{ |
|
711 | 715 | $template = "{$slug}.php"; |
712 | 716 | } |
713 | 717 | $file_path = apply_filters('lsx_content_path',false,$slug,$part); |
714 | 718 | |
715 | 719 | if ( false !== $file_path && '' == locate_template( array( $template ) ) && file_exists( $file_path.$template) ) { |
716 | 720 | load_template( $file_path.$template, false ); |
717 | - }else{ |
|
721 | + } else{ |
|
718 | 722 | get_template_part($slug,$part); |
719 | 723 | } |
720 | 724 | } |
721 | 725 | \ No newline at end of file |
@@ -40,29 +40,29 @@ |
||
40 | 40 | $output = str_replace('Page','<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.esc_html__('Events','lsx').'</a>',$output); |
41 | 41 | if(isset($wp_query->query_vars['eventDisplay']) && 'all' === $wp_query->query_vars['eventDisplay']){ |
42 | 42 | $output = str_replace($closing_div,get_the_title($wp_query->query_vars['post_parent']).$closing_div,$output); |
43 | - }else{ |
|
43 | + } else{ |
|
44 | 44 | $single_event = get_queried_object(); |
45 | 45 | $output = str_replace($closing_div,apply_filters('the_title',$single_event->post_title).$closing_div,$output); |
46 | 46 | } |
47 | - }elseif( is_tax()) { |
|
47 | + } elseif( is_tax()) { |
|
48 | 48 | $tax_event = get_queried_object(); |
49 | 49 | $output = str_replace('Page','<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.esc_html__('Events','lsx').'</a>',$output); |
50 | 50 | $output = str_replace($closing_div,' / '.apply_filters('the_title',$tax_event->name).$closing_div,$output); |
51 | - }else{ |
|
51 | + } else{ |
|
52 | 52 | $output = str_replace('Page',esc_html__('Events','lsx'),$output); |
53 | 53 | } |
54 | - }elseif(function_exists('yoast_breadcrumb')){ |
|
54 | + } elseif(function_exists('yoast_breadcrumb')){ |
|
55 | 55 | $closing_div = '</div>'; |
56 | 56 | $last_breadcrumb = '<span class="breadcrumb_last">'.esc_html__('Events','lsx').'</span>'; |
57 | 57 | |
58 | 58 | if( is_single()) { |
59 | 59 | $single_event = get_queried_object(); |
60 | 60 | $output = str_replace($closing_div,'<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.esc_html__('Events','lsx').'</a> / '.apply_filters('the_title',$single_event->post_title),$output); |
61 | - }elseif( is_tax()) { |
|
61 | + } elseif( is_tax()) { |
|
62 | 62 | $tax_event = get_queried_object(); |
63 | 63 | $output = str_replace($last_breadcrumb,'<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.esc_html__('Events','lsx').'</a> / '.apply_filters('the_title',$tax_event->name),$output); |
64 | 64 | |
65 | - }else{ |
|
65 | + } else{ |
|
66 | 66 | $output = str_replace('Page',esc_html__('Events','lsx'),$output); |
67 | 67 | } |
68 | 68 | } |
@@ -47,9 +47,12 @@ |
||
47 | 47 | |
48 | 48 | <?php lsx_paging_nav(); ?> |
49 | 49 | |
50 | - <?php else : ?> |
|
50 | + <?php else { |
|
51 | + : ?> |
|
51 | 52 | |
52 | - <?php get_template_part( 'content', 'none' ); ?> |
|
53 | + <?php get_template_part( 'content', 'none' ); |
|
54 | +} |
|
55 | +?> |
|
53 | 56 | |
54 | 57 | <?php endif; ?> |
55 | 58 |
@@ -4,7 +4,10 @@ |
||
4 | 4 | * |
5 | 5 | * @package lsx |
6 | 6 | */ |
7 | -if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly |
|
7 | +if ( ! defined( 'ABSPATH' ) ) { |
|
8 | + return; |
|
9 | +} |
|
10 | +// Exit if accessed directly |
|
8 | 11 | |
9 | 12 | define('LSX_VERSION', '1.8.3'); |
10 | 13 |