Completed
Push — master ( 3e9b97...4fb7fa )
by Fernando
02:38
created

the-events-calendar.php ➔ lsx_tec_scripts_add_styles()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 4
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * LSX functions and definitions - The Events Calendar.
4
 *
5
 * @package    lsx
6
 * @subpackage the-events-calendar
7
 */
8
9
if ( ! defined( 'ABSPATH' ) ) {
10
	exit;
11
}
12
13 View Code Duplication
if ( ! function_exists( 'lsx_tec_scripts_add_styles' ) ) :
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
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
		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
	}
25
26
	add_action( 'wp_enqueue_scripts', 'lsx_tec_scripts_add_styles' );
27
28
endif;
29
30
/**
31
 * Adds theme stylesheet
32
 * @package 	lsx
33
 * @subpackage 	tribe-events
34
 * @category 	styles
35
 */
36
// function lsx_tribe_breadcrumbs($output) {
0 ignored issues
show
Unused Code Comprehensibility introduced by
62% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
37
// 	global $wp_query;
38
// 	if( (isset($wp_query->tribe_is_event) && true === $wp_query->tribe_is_event) || (isset($wp_query->query_vars['post_type']) && !is_array($wp_query->query_vars['post_type']) && 'tribe_venue' === $wp_query->query_vars['post_type'])){
39
// 		if(function_exists('woocommerce_breadcrumb')){
40
// 		 	$closing_div = '</nav>';
41
42
// 		 	if( is_single()) {
0 ignored issues
show
Unused Code Comprehensibility introduced by
59% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
43
// 		 		$output = str_replace('Page','<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.esc_html__('Events','lsx').'</a>',$output);
44
// 		 		if(isset($wp_query->query_vars['eventDisplay']) && 'all' === $wp_query->query_vars['eventDisplay']){
45
// 		 			$output = str_replace($closing_div,get_the_title($wp_query->query_vars['post_parent']).$closing_div,$output);
46
// 		 		}else{
47
// 		 			$single_event = get_queried_object();
48
// 		 			$output = str_replace($closing_div,apply_filters('the_title',$single_event->post_title).$closing_div,$output);
49
// 		 		}
50
// 		 	}elseif( is_tax()) {
51
// 		 		$tax_event = get_queried_object();
52
// 		 		$output = str_replace('Page','<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.esc_html__('Events','lsx').'</a>',$output);
53
// 		 		$output = str_replace($closing_div,'&nbsp;/&nbsp;'.apply_filters('the_title',$tax_event->name).$closing_div,$output);
54
// 		 	}else{
55
// 		 		$output = str_replace('Page',esc_html__('Events','lsx'),$output);
56
// 		 	}
57
// 		 }elseif(function_exists('yoast_breadcrumb')){
58
// 		 	$closing_div = '</div>';
59
// 		 	$last_breadcrumb = '<span class="breadcrumb_last">'.esc_html__('Events','lsx').'</span>';
60
61
// 		 	if( is_single()) {
0 ignored issues
show
Unused Code Comprehensibility introduced by
57% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
62
// 		 		$single_event = get_queried_object();
63
// 		 		$output = str_replace($closing_div,'<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.esc_html__('Events','lsx').'</a>&nbsp;/&nbsp;'.apply_filters('the_title',$single_event->post_title),$output);
64
// 		 	}elseif( is_tax()) {
65
// 		 		$tax_event = get_queried_object();
66
// 		 		$output = str_replace($last_breadcrumb,'<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.esc_html__('Events','lsx').'</a>&nbsp;/&nbsp;'.apply_filters('the_title',$tax_event->name),$output);
67
68
// 		 	}else{
0 ignored issues
show
Unused Code Comprehensibility introduced by
57% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
69
// 		 		$output = str_replace('Page',esc_html__('Events','lsx'),$output);
70
// 		 	}
71
// 		 }
72
// 	}
73
// 	return $output;
74
// }
75
// add_filter( 'lsx_breadcrumbs', 'lsx_tribe_breadcrumbs',1,10 );
76