Passed
Push — dependabot/composer/wpackagist... ( 94e20d )
by
unknown
04:45
created
includes/popup-maker/class-lsx-popup-maker.php 1 patch
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -7,70 +7,70 @@
 block discarded – undo
7 7
  */
8 8
 
9 9
 if ( ! defined( 'ABSPATH' ) ) {
10
-	exit;
10
+     exit;
11 11
 }
12 12
 
13 13
 if ( ! class_exists( 'LSX_Popup_Maker' ) ) :
14 14
 
15
-	/**
16
-	 * The LSX Popup_Maker integration class
17
-	 */
18
-	class LSX_Popup_Maker {
15
+     /**
16
+      * The LSX Popup_Maker integration class
17
+      */
18
+     class LSX_Popup_Maker {
19 19
 
20
-		/**
21
-		 * Holds class instance
22
-		 *
23
-		 * @since 1.0.0
24
-		 * @var      object
25
-		 */
26
-		protected static $instance = null;
20
+          /**
21
+           * Holds class instance
22
+           *
23
+           * @since 1.0.0
24
+           * @var      object
25
+           */
26
+          protected static $instance = null;
27 27
 
28
-		/**
29
-		 * Setup class.
30
-		 *
31
-		 * @since 1.0
32
-		 */
33
-		public function __construct() {
34
-			add_action( 'init', array( $this, 'remove_pop_up_controls_panel' ) );
35
-			add_action( 'wp_enqueue_scripts', array( $this, 'lsx_popup_maker_scripts_add_styles' ) );
36
-		}
28
+          /**
29
+           * Setup class.
30
+           *
31
+           * @since 1.0
32
+           */
33
+          public function __construct() {
34
+               add_action( 'init', array( $this, 'remove_pop_up_controls_panel' ) );
35
+               add_action( 'wp_enqueue_scripts', array( $this, 'lsx_popup_maker_scripts_add_styles' ) );
36
+          }
37 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
-		}
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
-		 * Popup_Maker enqueue styles.
54
-		 *
55
-		 * @package    lsx
56
-		 * @subpackage popup-maker
57
-		 */
58
-		public function lsx_popup_maker_scripts_add_styles() {
59
-			wp_enqueue_style( 'popup-maker-lsx', get_template_directory_uri() . '/assets/css/popup-maker/popup-maker.css', array( 'lsx_main' ), LSX_VERSION );
60
-		}
52
+          /**
53
+           * Popup_Maker enqueue styles.
54
+           *
55
+           * @package    lsx
56
+           * @subpackage popup-maker
57
+           */
58
+          public function lsx_popup_maker_scripts_add_styles() {
59
+               wp_enqueue_style( 'popup-maker-lsx', get_template_directory_uri() . '/assets/css/popup-maker/popup-maker.css', array( 'lsx_main' ), LSX_VERSION );
60
+          }
61 61
 
62
-		/**
63
-		 * This removes the PUM pop up controls box.
64
-		 *
65
-		 * @return void
66
-		 */
67
-		public function remove_pop_up_controls_panel() {
68
-			if ( is_admin() ) {
69
-				remove_action( 'enqueue_block_editor_assets', array( 'PUM_Site_Assets', 'register_styles' ) );
70
-				remove_action( 'enqueue_block_editor_assets', array( 'PUM_Admin_BlockEditor', 'register_editor_assets' ) );
71
-			}
72
-		}
73
-	}
62
+          /**
63
+           * This removes the PUM pop up controls box.
64
+           *
65
+           * @return void
66
+           */
67
+          public function remove_pop_up_controls_panel() {
68
+               if ( is_admin() ) {
69
+                    remove_action( 'enqueue_block_editor_assets', array( 'PUM_Site_Assets', 'register_styles' ) );
70
+                    remove_action( 'enqueue_block_editor_assets', array( 'PUM_Admin_BlockEditor', 'register_editor_assets' ) );
71
+               }
72
+          }
73
+     }
74 74
 
75 75
 endif;
76 76
 
Please login to merge, or discard this patch.
includes/widgets.php 1 patch
Indentation   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -7,62 +7,62 @@  discard block
 block discarded – undo
7 7
  */
8 8
 
9 9
 if ( ! defined( 'ABSPATH' ) ) {
10
-	exit;
10
+     exit;
11 11
 }
12 12
 
13 13
 if ( ! function_exists( 'lsx_widget_area_init' ) ) :
14 14
 
15
-	/**
16
-	 * Register widgetized area and update sidebar with default widgets.
17
-	 *
18
-	 * @package    lsx
19
-	 * @subpackage widgets
20
-	 */
21
-	function lsx_widget_area_init() {
22
-		register_sidebar(
23
-			array(
24
-				'name'          => esc_html__( 'Home', 'lsx' ),
25
-				'id'            => 'sidebar-home',
26
-				'before_widget' => '<aside id="%1$s" class="widget %2$s">',
27
-				'after_widget'  => '</aside>',
28
-				'before_title'  => '<h3 class="widget-title">',
29
-				'after_title'   => '</h3>',
30
-			)
31
-		);
15
+     /**
16
+      * Register widgetized area and update sidebar with default widgets.
17
+      *
18
+      * @package    lsx
19
+      * @subpackage widgets
20
+      */
21
+     function lsx_widget_area_init() {
22
+          register_sidebar(
23
+               array(
24
+                    'name'          => esc_html__( 'Home', 'lsx' ),
25
+                    'id'            => 'sidebar-home',
26
+                    'before_widget' => '<aside id="%1$s" class="widget %2$s">',
27
+                    'after_widget'  => '</aside>',
28
+                    'before_title'  => '<h3 class="widget-title">',
29
+                    'after_title'   => '</h3>',
30
+               )
31
+          );
32 32
 
33
-		register_sidebar(
34
-			array(
35
-				'name'          => esc_html__( 'Sidebar', 'lsx' ),
36
-				'id'            => 'sidebar-1',
37
-				'before_widget' => '<aside id="%1$s" class="widget %2$s">',
38
-				'after_widget'  => '</aside>',
39
-				'before_title'  => '<h3 class="widget-title">',
40
-				'after_title'   => '</h3>',
41
-			)
42
-		);
33
+          register_sidebar(
34
+               array(
35
+                    'name'          => esc_html__( 'Sidebar', 'lsx' ),
36
+                    'id'            => 'sidebar-1',
37
+                    'before_widget' => '<aside id="%1$s" class="widget %2$s">',
38
+                    'after_widget'  => '</aside>',
39
+                    'before_title'  => '<h3 class="widget-title">',
40
+                    'after_title'   => '</h3>',
41
+               )
42
+          );
43 43
 
44
-		register_sidebar(
45
-			array(
46
-				'name'          => esc_html__( 'Footer', 'lsx' ),
47
-				'id'            => 'sidebar-footer',
48
-				'before_widget' => '<div class="styler"><aside id="%1$s" class="widget %2$s">',
49
-				'after_widget'  => '</aside></div>',
50
-				'before_title'  => '<h3 class="widget-title">',
51
-				'after_title'   => '</h3>',
52
-			)
53
-		);
44
+          register_sidebar(
45
+               array(
46
+                    'name'          => esc_html__( 'Footer', 'lsx' ),
47
+                    'id'            => 'sidebar-footer',
48
+                    'before_widget' => '<div class="styler"><aside id="%1$s" class="widget %2$s">',
49
+                    'after_widget'  => '</aside></div>',
50
+                    'before_title'  => '<h3 class="widget-title">',
51
+                    'after_title'   => '</h3>',
52
+               )
53
+          );
54 54
 
55
-		register_sidebar(
56
-			array(
57
-				'name'          => esc_html__( 'Footer Call to Action', 'lsx' ),
58
-				'id'            => 'sidebar-footer-cta',
59
-				'before_widget' => '<aside id="%1$s" class="widget %2$s">',
60
-				'after_widget'  => '</aside>',
61
-				'before_title'  => '<h3 class="widget-title">',
62
-				'after_title'   => '</h3>',
63
-			)
64
-		);
65
-	}
55
+          register_sidebar(
56
+               array(
57
+                    'name'          => esc_html__( 'Footer Call to Action', 'lsx' ),
58
+                    'id'            => 'sidebar-footer-cta',
59
+                    'before_widget' => '<aside id="%1$s" class="widget %2$s">',
60
+                    'after_widget'  => '</aside>',
61
+                    'before_title'  => '<h3 class="widget-title">',
62
+                    'after_title'   => '</h3>',
63
+               )
64
+          );
65
+     }
66 66
 
67 67
 endif;
68 68
 
@@ -70,24 +70,24 @@  discard block
 block discarded – undo
70 70
 
71 71
 if ( ! function_exists( 'lsx_sidebar_footer_params' ) ) :
72 72
 
73
-	/**
74
-	 * Register widgetized area and update sidebar with default widgets.
75
-	 *
76
-	 * @package    lsx
77
-	 * @subpackage widgets
78
-	 * @return $params
79
-	 */
80
-	function lsx_sidebar_footer_params( $params ) {
81
-		$sidebar_id = $params[0]['id'];
73
+     /**
74
+      * Register widgetized area and update sidebar with default widgets.
75
+      *
76
+      * @package    lsx
77
+      * @subpackage widgets
78
+      * @return $params
79
+      */
80
+     function lsx_sidebar_footer_params( $params ) {
81
+          $sidebar_id = $params[0]['id'];
82 82
 
83
-		if ( 'sidebar-footer' === $sidebar_id ) {
84
-			$total_widgets              = wp_get_sidebars_widgets();
85
-			$sidebar_widgets            = count( $total_widgets[ $sidebar_id ] );
86
-			$params[0]['before_widget'] = str_replace( 'class="styler', 'class="col-md-' . floor( 12 / $sidebar_widgets ), $params[0]['before_widget'] );
87
-		}
83
+          if ( 'sidebar-footer' === $sidebar_id ) {
84
+               $total_widgets              = wp_get_sidebars_widgets();
85
+               $sidebar_widgets            = count( $total_widgets[ $sidebar_id ] );
86
+               $params[0]['before_widget'] = str_replace( 'class="styler', 'class="col-md-' . floor( 12 / $sidebar_widgets ), $params[0]['before_widget'] );
87
+          }
88 88
 
89
-		return $params;
90
-	}
89
+          return $params;
90
+     }
91 91
 
92 92
 endif;
93 93
 
Please login to merge, or discard this patch.
includes/customizer.php 1 patch
Indentation   +233 added lines, -233 removed lines patch added patch discarded remove patch
@@ -7,52 +7,52 @@  discard block
 block discarded – undo
7 7
  */
8 8
 
9 9
 if ( ! defined( 'ABSPATH' ) ) {
10
-	exit;
10
+     exit;
11 11
 }
12 12
 
13 13
 if ( ! function_exists( 'lsx_customizer_core_controls' ) ) :
14 14
 
15
-	/**
16
-	 * Returns an array of the core panel.
17
-	 *
18
-	 * @package    lsx
19
-	 * @subpackage customizer
20
-	 *
21
-	 * @return $lsx_controls array()
22
-	 */
23
-	function lsx_customizer_core_controls( $lsx_controls ) {
24
-		$lsx_controls['sections']['lsx-core'] = array(
25
-			'title'       => esc_html__( 'Core Settings', 'lsx' ),
26
-			'description' => esc_html__( 'Change the core settings.', 'lsx' ),
27
-			'priority'    => 21,
28
-		);
29
-
30
-		$lsx_controls['settings']['lsx_preloader_content_status'] = array(
31
-			'default'           => '1',
32
-			'sanitize_callback' => 'lsx_sanitize_checkbox',
33
-			'transport'         => 'postMessage',
34
-		);
35
-
36
-		$lsx_controls['fields']['lsx_preloader_content_status'] = array(
37
-			'label'   => esc_html__( 'Preloader Content', 'lsx' ),
38
-			'section' => 'lsx-core',
39
-			'type'    => 'checkbox',
40
-		);
41
-
42
-		$lsx_controls['settings']['lsx_disable_fonts'] = array(
43
-			'default'           => 0,
44
-			'sanitize_callback' => 'lsx_sanitize_checkbox',
45
-			'transport'         => 'postMessage',
46
-		);
47
-
48
-		$lsx_controls['fields']['lsx_disable_fonts'] = array(
49
-			'label'   => esc_html__( 'Disable Fonts', 'lsx' ),
50
-			'section' => 'lsx-core',
51
-			'type'    => 'checkbox',
52
-		);
53
-
54
-		return $lsx_controls;
55
-	}
15
+     /**
16
+      * Returns an array of the core panel.
17
+      *
18
+      * @package    lsx
19
+      * @subpackage customizer
20
+      *
21
+      * @return $lsx_controls array()
22
+      */
23
+     function lsx_customizer_core_controls( $lsx_controls ) {
24
+          $lsx_controls['sections']['lsx-core'] = array(
25
+               'title'       => esc_html__( 'Core Settings', 'lsx' ),
26
+               'description' => esc_html__( 'Change the core settings.', 'lsx' ),
27
+               'priority'    => 21,
28
+          );
29
+
30
+          $lsx_controls['settings']['lsx_preloader_content_status'] = array(
31
+               'default'           => '1',
32
+               'sanitize_callback' => 'lsx_sanitize_checkbox',
33
+               'transport'         => 'postMessage',
34
+          );
35
+
36
+          $lsx_controls['fields']['lsx_preloader_content_status'] = array(
37
+               'label'   => esc_html__( 'Preloader Content', 'lsx' ),
38
+               'section' => 'lsx-core',
39
+               'type'    => 'checkbox',
40
+          );
41
+
42
+          $lsx_controls['settings']['lsx_disable_fonts'] = array(
43
+               'default'           => 0,
44
+               'sanitize_callback' => 'lsx_sanitize_checkbox',
45
+               'transport'         => 'postMessage',
46
+          );
47
+
48
+          $lsx_controls['fields']['lsx_disable_fonts'] = array(
49
+               'label'   => esc_html__( 'Disable Fonts', 'lsx' ),
50
+               'section' => 'lsx-core',
51
+               'type'    => 'checkbox',
52
+          );
53
+
54
+          return $lsx_controls;
55
+     }
56 56
 
57 57
 endif;
58 58
 
@@ -60,110 +60,110 @@  discard block
 block discarded – undo
60 60
 
61 61
 if ( ! function_exists( 'lsx_customizer_layout_controls' ) ) :
62 62
 
63
-	/**
64
-	 * Returns an array of the layout panel.
65
-	 *
66
-	 * @package    lsx
67
-	 * @subpackage customizer
68
-	 *
69
-	 * @return $lsx_controls array()
70
-	 */
71
-	function lsx_customizer_layout_controls( $lsx_controls ) {
72
-		$lsx_controls['sections']['lsx-layout'] = array(
73
-			'title'       => esc_html__( 'Layout', 'lsx' ),
74
-			'description' => esc_html__( 'Change the layout sitewide. If your homepage is set to use a page with a template, the following will not apply to it.', 'lsx' ),
75
-			'priority'    => 22,
76
-		);
77
-
78
-		$lsx_controls['settings']['lsx_header_layout'] = array(
79
-			'default'   => 'inline',
80
-			'type'      => 'theme_mod',
81
-			'transport' => 'postMessage',
82
-		);
83
-
84
-		$lsx_controls['fields']['lsx_header_layout'] = array(
85
-			'label'   => esc_html__( 'Header', 'lsx' ),
86
-			'section' => 'lsx-layout',
87
-			'control' => 'LSX_Customize_Header_Layout_Control',
88
-			'choices' => array(
89
-				'central',
90
-				'expanded',
91
-				'inline',
92
-			),
93
-		);
94
-
95
-		$lsx_controls['settings']['lsx_header_mobile_layout'] = array(
96
-			'default'   => 'navigation-bar',
97
-			'type'      => 'theme_mod',
98
-			'transport' => 'postMessage',
99
-		);
100
-
101
-		$lsx_controls['fields']['lsx_header_mobile_layout'] = array(
102
-			'label'   => esc_html__( 'Mobile Header', 'lsx' ),
103
-			'section' => 'lsx-layout',
104
-			'control' => 'LSX_Customize_Mobile_Header_Layout_Control',
105
-			'choices' => array(
106
-				'navigation-bar',
107
-				'hamburger',
108
-			),
109
-		);
110
-
111
-		$lsx_controls['settings']['lsx_layout'] = array(
112
-			'default'   => '1c',
113
-			'type'      => 'theme_mod',
114
-			'transport' => 'refresh',
115
-		);
116
-
117
-		$lsx_controls['fields']['lsx_layout'] = array(
118
-			'label'   => esc_html__( 'Body', 'lsx' ),
119
-			'section' => 'lsx-layout',
120
-			'control' => 'LSX_Customize_Layout_Control',
121
-			'choices' => array(
122
-				'1c',
123
-				'2cr',
124
-				'2cl',
125
-			),
126
-		);
127
-
128
-		$lsx_controls['settings']['lsx_header_fixed'] = array(
129
-			'default'           => false,
130
-			'sanitize_callback' => 'lsx_sanitize_checkbox',
131
-			'transport'         => 'postMessage',
132
-		);
133
-
134
-		$lsx_controls['fields']['lsx_header_fixed'] = array(
135
-			'label'   => esc_html__( 'Fixed Header', 'lsx' ),
136
-			'section' => 'lsx-layout',
137
-			'type'    => 'checkbox',
138
-		);
139
-
140
-		$lsx_controls['settings']['lsx_header_search'] = array(
141
-			'default'           => false,
142
-			'sanitize_callback' => 'lsx_sanitize_checkbox',
143
-			'transport'         => 'postMessage',
144
-		);
145
-
146
-		$lsx_controls['fields']['lsx_header_search'] = array(
147
-			'label'   => esc_html__( 'Search Box in Header', 'lsx' ),
148
-			'section' => 'lsx-layout',
149
-			'type'    => 'checkbox',
150
-		);
151
-
152
-		$lsx_controls['selective_refresh']['lsx_header_search'] = array(
153
-			'selector'        => '#lsx-header-search-css',
154
-			'render_callback' => function() {
155
-				$search_form = get_theme_mod( 'lsx_header_search' );
156
-
157
-				if ( false !== $search_form ) {
158
-					echo 'body #searchform { display: block; }';
159
-				} else {
160
-					echo 'body #searchform { display: none; }';
161
-				}
162
-			},
163
-		);
164
-
165
-		return $lsx_controls;
166
-	}
63
+     /**
64
+      * Returns an array of the layout panel.
65
+      *
66
+      * @package    lsx
67
+      * @subpackage customizer
68
+      *
69
+      * @return $lsx_controls array()
70
+      */
71
+     function lsx_customizer_layout_controls( $lsx_controls ) {
72
+          $lsx_controls['sections']['lsx-layout'] = array(
73
+               'title'       => esc_html__( 'Layout', 'lsx' ),
74
+               'description' => esc_html__( 'Change the layout sitewide. If your homepage is set to use a page with a template, the following will not apply to it.', 'lsx' ),
75
+               'priority'    => 22,
76
+          );
77
+
78
+          $lsx_controls['settings']['lsx_header_layout'] = array(
79
+               'default'   => 'inline',
80
+               'type'      => 'theme_mod',
81
+               'transport' => 'postMessage',
82
+          );
83
+
84
+          $lsx_controls['fields']['lsx_header_layout'] = array(
85
+               'label'   => esc_html__( 'Header', 'lsx' ),
86
+               'section' => 'lsx-layout',
87
+               'control' => 'LSX_Customize_Header_Layout_Control',
88
+               'choices' => array(
89
+                    'central',
90
+                    'expanded',
91
+                    'inline',
92
+               ),
93
+          );
94
+
95
+          $lsx_controls['settings']['lsx_header_mobile_layout'] = array(
96
+               'default'   => 'navigation-bar',
97
+               'type'      => 'theme_mod',
98
+               'transport' => 'postMessage',
99
+          );
100
+
101
+          $lsx_controls['fields']['lsx_header_mobile_layout'] = array(
102
+               'label'   => esc_html__( 'Mobile Header', 'lsx' ),
103
+               'section' => 'lsx-layout',
104
+               'control' => 'LSX_Customize_Mobile_Header_Layout_Control',
105
+               'choices' => array(
106
+                    'navigation-bar',
107
+                    'hamburger',
108
+               ),
109
+          );
110
+
111
+          $lsx_controls['settings']['lsx_layout'] = array(
112
+               'default'   => '1c',
113
+               'type'      => 'theme_mod',
114
+               'transport' => 'refresh',
115
+          );
116
+
117
+          $lsx_controls['fields']['lsx_layout'] = array(
118
+               'label'   => esc_html__( 'Body', 'lsx' ),
119
+               'section' => 'lsx-layout',
120
+               'control' => 'LSX_Customize_Layout_Control',
121
+               'choices' => array(
122
+                    '1c',
123
+                    '2cr',
124
+                    '2cl',
125
+               ),
126
+          );
127
+
128
+          $lsx_controls['settings']['lsx_header_fixed'] = array(
129
+               'default'           => false,
130
+               'sanitize_callback' => 'lsx_sanitize_checkbox',
131
+               'transport'         => 'postMessage',
132
+          );
133
+
134
+          $lsx_controls['fields']['lsx_header_fixed'] = array(
135
+               'label'   => esc_html__( 'Fixed Header', 'lsx' ),
136
+               'section' => 'lsx-layout',
137
+               'type'    => 'checkbox',
138
+          );
139
+
140
+          $lsx_controls['settings']['lsx_header_search'] = array(
141
+               'default'           => false,
142
+               'sanitize_callback' => 'lsx_sanitize_checkbox',
143
+               'transport'         => 'postMessage',
144
+          );
145
+
146
+          $lsx_controls['fields']['lsx_header_search'] = array(
147
+               'label'   => esc_html__( 'Search Box in Header', 'lsx' ),
148
+               'section' => 'lsx-layout',
149
+               'type'    => 'checkbox',
150
+          );
151
+
152
+          $lsx_controls['selective_refresh']['lsx_header_search'] = array(
153
+               'selector'        => '#lsx-header-search-css',
154
+               'render_callback' => function() {
155
+                    $search_form = get_theme_mod( 'lsx_header_search' );
156
+
157
+                    if ( false !== $search_form ) {
158
+                         echo 'body #searchform { display: block; }';
159
+                    } else {
160
+                         echo 'body #searchform { display: none; }';
161
+                    }
162
+               },
163
+          );
164
+
165
+          return $lsx_controls;
166
+     }
167 167
 
168 168
 endif;
169 169
 
@@ -171,80 +171,80 @@  discard block
 block discarded – undo
171 171
 
172 172
 if ( ! function_exists( 'lsx_customizer_template_cover_controls' ) ) :
173 173
 
174
-	/**
175
-	 * Returns an array of the Cover Template panel.
176
-	 *
177
-	 * @package    lsx
178
-	 * @subpackage customizer
179
-	 *
180
-	 * @return $lsx_controls array()
181
-	 */
182
-	function lsx_customizer_template_cover_controls( $lsx_controls ) {
183
-		$lsx_controls['sections']['lsx-cover-template'] = array(
184
-			'title'       => esc_html__( 'Cover Template Settings', 'lsx' ),
185
-			'description' => esc_html__( 'Change the cover template settings.', 'lsx' ),
186
-			'priority'    => 23,
187
-		);
188
-
189
-		$lsx_controls['settings']['lsx_cover_template_fixed_background'] = array(
190
-			'default'           => '1',
191
-			'sanitize_callback' => 'lsx_sanitize_checkbox',
192
-			'transport'         => 'postMessage',
193
-		);
194
-
195
-		$lsx_controls['fields']['lsx_cover_template_fixed_background'] = array(
196
-			'label'   => esc_html__( 'Fixed Background Image', 'lsx' ),
197
-			'section' => 'lsx-cover-template',
198
-			'type'    => 'checkbox',
199
-		);
200
-
201
-		$lsx_controls['settings']['lsx_cover_template_overlay_background_color'] = array(
202
-			'default'           => '#000000',
203
-			'sanitize_callback' => 'sanitize_hex_color',
204
-			'type'              => 'theme_mod',
205
-			'transport'         => 'postMessage',
206
-		);
207
-
208
-		$lsx_controls['fields']['lsx_cover_template_overlay_background_color'] = array(
209
-			'label'       => esc_html__( 'Overlay Background Color', 'lsx' ),
210
-			'description' => __( 'The color used for the overlay. Defaults to black.', 'lsx' ),
211
-			'section'     => 'lsx-cover-template',
212
-			'control'     => 'WP_Customize_Color_Control',
213
-		);
214
-
215
-		$lsx_controls['settings']['lsx_cover_template_overlay_text_color'] = array(
216
-			'default'           => '#ffffff',
217
-			'sanitize_callback' => 'sanitize_hex_color',
218
-			'type'              => 'theme_mod',
219
-			'transport'         => 'postMessage',
220
-		);
221
-
222
-		$lsx_controls['fields']['lsx_cover_template_overlay_text_color'] = (
223
-			array(
224
-				'label'       => __( 'Overlay Text Color', 'lsx' ),
225
-				'description' => __( 'The color used for the text in the overlay.', 'lsx' ),
226
-				'section'     => 'lsx-cover-template',
227
-				'control'     => 'WP_Customize_Color_Control',
228
-			)
229
-		);
230
-
231
-		$lsx_controls['settings']['lsx_cover_template_overlay_opacity'] = array(
232
-			'default'           => 80,
233
-			'sanitize_callback' => 'absint',
234
-			'transport'         => 'postMessage',
235
-		);
236
-
237
-		$lsx_controls['fields']['lsx_cover_template_overlay_opacity'] = (
238
-			array(
239
-				'label'       => __( 'Overlay Opacity', 'lsx' ),
240
-				'description' => __( 'Make sure that the contrast is high enough so that the text is readable.', 'lsx' ),
241
-				'section'     => 'lsx-cover-template',
242
-				'type'        => 'range',
243
-			)
244
-		);
245
-
246
-		return $lsx_controls;
247
-	}
174
+     /**
175
+      * Returns an array of the Cover Template panel.
176
+      *
177
+      * @package    lsx
178
+      * @subpackage customizer
179
+      *
180
+      * @return $lsx_controls array()
181
+      */
182
+     function lsx_customizer_template_cover_controls( $lsx_controls ) {
183
+          $lsx_controls['sections']['lsx-cover-template'] = array(
184
+               'title'       => esc_html__( 'Cover Template Settings', 'lsx' ),
185
+               'description' => esc_html__( 'Change the cover template settings.', 'lsx' ),
186
+               'priority'    => 23,
187
+          );
188
+
189
+          $lsx_controls['settings']['lsx_cover_template_fixed_background'] = array(
190
+               'default'           => '1',
191
+               'sanitize_callback' => 'lsx_sanitize_checkbox',
192
+               'transport'         => 'postMessage',
193
+          );
194
+
195
+          $lsx_controls['fields']['lsx_cover_template_fixed_background'] = array(
196
+               'label'   => esc_html__( 'Fixed Background Image', 'lsx' ),
197
+               'section' => 'lsx-cover-template',
198
+               'type'    => 'checkbox',
199
+          );
200
+
201
+          $lsx_controls['settings']['lsx_cover_template_overlay_background_color'] = array(
202
+               'default'           => '#000000',
203
+               'sanitize_callback' => 'sanitize_hex_color',
204
+               'type'              => 'theme_mod',
205
+               'transport'         => 'postMessage',
206
+          );
207
+
208
+          $lsx_controls['fields']['lsx_cover_template_overlay_background_color'] = array(
209
+               'label'       => esc_html__( 'Overlay Background Color', 'lsx' ),
210
+               'description' => __( 'The color used for the overlay. Defaults to black.', 'lsx' ),
211
+               'section'     => 'lsx-cover-template',
212
+               'control'     => 'WP_Customize_Color_Control',
213
+          );
214
+
215
+          $lsx_controls['settings']['lsx_cover_template_overlay_text_color'] = array(
216
+               'default'           => '#ffffff',
217
+               'sanitize_callback' => 'sanitize_hex_color',
218
+               'type'              => 'theme_mod',
219
+               'transport'         => 'postMessage',
220
+          );
221
+
222
+          $lsx_controls['fields']['lsx_cover_template_overlay_text_color'] = (
223
+               array(
224
+                    'label'       => __( 'Overlay Text Color', 'lsx' ),
225
+                    'description' => __( 'The color used for the text in the overlay.', 'lsx' ),
226
+                    'section'     => 'lsx-cover-template',
227
+                    'control'     => 'WP_Customize_Color_Control',
228
+               )
229
+          );
230
+
231
+          $lsx_controls['settings']['lsx_cover_template_overlay_opacity'] = array(
232
+               'default'           => 80,
233
+               'sanitize_callback' => 'absint',
234
+               'transport'         => 'postMessage',
235
+          );
236
+
237
+          $lsx_controls['fields']['lsx_cover_template_overlay_opacity'] = (
238
+               array(
239
+                    'label'       => __( 'Overlay Opacity', 'lsx' ),
240
+                    'description' => __( 'Make sure that the contrast is high enough so that the text is readable.', 'lsx' ),
241
+                    'section'     => 'lsx-cover-template',
242
+                    'type'        => 'range',
243
+               )
244
+          );
245
+
246
+          return $lsx_controls;
247
+     }
248 248
 
249 249
 endif;
250 250
 
@@ -253,19 +253,19 @@  discard block
 block discarded – undo
253 253
 
254 254
 if ( ! function_exists( 'lsx_get_customizer_controls' ) ) :
255 255
 
256
-	/**
257
-	 * Returns an array of $controls for the customizer class to generate.
258
-	 *
259
-	 * @package    lsx
260
-	 * @subpackage customizer
261
-	 *
262
-	 * @return $lsx_controls array()
263
-	 */
264
-	function lsx_get_customizer_controls() {
265
-		$lsx_controls = array();
266
-		$lsx_controls = apply_filters( 'lsx_customizer_controls', $lsx_controls );
267
-		return $lsx_controls;
268
-	}
256
+     /**
257
+      * Returns an array of $controls for the customizer class to generate.
258
+      *
259
+      * @package    lsx
260
+      * @subpackage customizer
261
+      *
262
+      * @return $lsx_controls array()
263
+      */
264
+     function lsx_get_customizer_controls() {
265
+          $lsx_controls = array();
266
+          $lsx_controls = apply_filters( 'lsx_customizer_controls', $lsx_controls );
267
+          return $lsx_controls;
268
+     }
269 269
 
270 270
 endif;
271 271
 
Please login to merge, or discard this patch.
includes/sanitize.php 1 patch
Indentation   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -7,112 +7,112 @@
 block discarded – undo
7 7
  */
8 8
 
9 9
 if ( ! defined( 'ABSPATH' ) ) {
10
-	exit;
10
+     exit;
11 11
 }
12 12
 
13 13
 if ( ! function_exists( 'lsx_sanitize_choices' ) ) :
14 14
 
15
-	/**
16
-	 * Sanitize a value from a list of allowed values.
17
-	 *
18
-	 * @package    lsx
19
-	 * @subpackage sanitize
20
-	 *
21
-	 * @param mixed $value      The value to sanitize.
22
-	 * @param mixed $setting    The setting for which the sanitizing is occurring.
23
-	 * @return mixed                The sanitized value.
24
-	 */
25
-	function lsx_sanitize_choices( $value, $setting ) {
26
-		if ( is_object( $setting ) ) {
27
-			$setting = $setting->id;
28
-		}
29
-
30
-		$choices = lsx_customizer_sanitize_get_choices( $setting );
31
-
32
-		if ( ! is_wp_error( $choices ) && ! empty( $choices ) ) {
33
-			$allowed_choices = array_keys( $choices );
34
-
35
-			if ( ! in_array( $value, $allowed_choices ) ) {
36
-				$value = lsx_customizer_sanitize_get_default( $setting );
37
-			}
38
-
39
-			return $value;
40
-		} else {
41
-			return $choices;
42
-		}
43
-	}
15
+     /**
16
+      * Sanitize a value from a list of allowed values.
17
+      *
18
+      * @package    lsx
19
+      * @subpackage sanitize
20
+      *
21
+      * @param mixed $value      The value to sanitize.
22
+      * @param mixed $setting    The setting for which the sanitizing is occurring.
23
+      * @return mixed                The sanitized value.
24
+      */
25
+     function lsx_sanitize_choices( $value, $setting ) {
26
+          if ( is_object( $setting ) ) {
27
+               $setting = $setting->id;
28
+          }
29
+
30
+          $choices = lsx_customizer_sanitize_get_choices( $setting );
31
+
32
+          if ( ! is_wp_error( $choices ) && ! empty( $choices ) ) {
33
+               $allowed_choices = array_keys( $choices );
34
+
35
+               if ( ! in_array( $value, $allowed_choices ) ) {
36
+                    $value = lsx_customizer_sanitize_get_default( $setting );
37
+               }
38
+
39
+               return $value;
40
+          } else {
41
+               return $choices;
42
+          }
43
+     }
44 44
 
45 45
 endif;
46 46
 
47 47
 if ( ! function_exists( 'lsx_customizer_sanitize_get_choices' ) ) :
48 48
 
49
-	/**
50
-	 * Helper function to return the choices for a field.
51
-	 *
52
-	 * @package    lsx
53
-	 * @subpackage sanitize
54
-	 *
55
-	 * @param string
56
-	 * @return mixed $field
57
-	 */
58
-	function lsx_customizer_sanitize_get_choices( $id ) {
59
-		global $lsx_customizer;
49
+     /**
50
+      * Helper function to return the choices for a field.
51
+      *
52
+      * @package    lsx
53
+      * @subpackage sanitize
54
+      *
55
+      * @param string
56
+      * @return mixed $field
57
+      */
58
+     function lsx_customizer_sanitize_get_choices( $id ) {
59
+          global $lsx_customizer;
60 60
 
61
-		$can_validate = method_exists( 'WP_Customize_Setting', 'validate' );
62
-		$field        = $lsx_customizer->get_control( $id );
61
+          $can_validate = method_exists( 'WP_Customize_Setting', 'validate' );
62
+          $field        = $lsx_customizer->get_control( $id );
63 63
 
64
-		if ( ! isset( $field['choices'] ) ) {
65
-			return $can_validate ? new WP_Error( 'notexists', esc_html__( 'Choice doesn\'t exist', 'lsx' ) ) : false;
66
-		}
64
+          if ( ! isset( $field['choices'] ) ) {
65
+               return $can_validate ? new WP_Error( 'notexists', esc_html__( 'Choice doesn\'t exist', 'lsx' ) ) : false;
66
+          }
67 67
 
68
-		return $field['choices'];
69
-	}
68
+          return $field['choices'];
69
+     }
70 70
 
71 71
 endif;
72 72
 
73 73
 if ( ! function_exists( 'lsx_customizer_sanitize_get_default' ) ) :
74 74
 
75
-	/**
76
-	 * Helper function to return defaults.
77
-	 *
78
-	 * @package    lsx
79
-	 * @subpackage sanitize
80
-	 *
81
-	 * @param string
82
-	 * @return mixed $default
83
-	 */
84
-	function lsx_customizer_sanitize_get_default( $id ) {
85
-		global $lsx_customizer;
86
-		$setting = $lsx_customizer->get_setting( $id );
87
-
88
-		if ( isset( $setting['default'] ) ) {
89
-			return $setting['default'];
90
-		}
91
-
92
-		return false;
93
-	}
75
+     /**
76
+      * Helper function to return defaults.
77
+      *
78
+      * @package    lsx
79
+      * @subpackage sanitize
80
+      *
81
+      * @param string
82
+      * @return mixed $default
83
+      */
84
+     function lsx_customizer_sanitize_get_default( $id ) {
85
+          global $lsx_customizer;
86
+          $setting = $lsx_customizer->get_setting( $id );
87
+
88
+          if ( isset( $setting['default'] ) ) {
89
+               return $setting['default'];
90
+          }
91
+
92
+          return false;
93
+     }
94 94
 
95 95
 endif;
96 96
 
97 97
 if ( ! function_exists( 'lsx_sanitize_checkbox' ) ) :
98 98
 
99
-	/**
100
-	 * Sanitizes an single or multiple checkbox input.
101
-	 *
102
-	 * @package    lsx
103
-	 * @subpackage sanitize
104
-	 *
105
-	 * @param array $input
106
-	 * @return array $output
107
-	 */
108
-	function lsx_sanitize_checkbox( $input ) {
109
-		$can_validate = method_exists( 'WP_Customize_Setting', 'validate' );
110
-
111
-		if ( ! is_bool( $input ) ) {
112
-			return $can_validate ? new WP_Error( 'notboolean', esc_html__( 'Not a boolean', 'lsx' ) ) : false;
113
-		}
114
-
115
-		return $input;
116
-	}
99
+     /**
100
+      * Sanitizes an single or multiple checkbox input.
101
+      *
102
+      * @package    lsx
103
+      * @subpackage sanitize
104
+      *
105
+      * @param array $input
106
+      * @return array $output
107
+      */
108
+     function lsx_sanitize_checkbox( $input ) {
109
+          $can_validate = method_exists( 'WP_Customize_Setting', 'validate' );
110
+
111
+          if ( ! is_bool( $input ) ) {
112
+               return $can_validate ? new WP_Error( 'notboolean', esc_html__( 'Not a boolean', 'lsx' ) ) : false;
113
+          }
114
+
115
+          return $input;
116
+     }
117 117
 
118 118
 endif;
Please login to merge, or discard this patch.
includes/yoast/class-lsx-yoast.php 1 patch
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -7,59 +7,59 @@
 block discarded – undo
7 7
  */
8 8
 
9 9
 if ( ! defined( 'ABSPATH' ) ) {
10
-	exit;
10
+     exit;
11 11
 }
12 12
 
13 13
 if ( ! class_exists( 'LSX_Yoast' ) ) :
14 14
 
15
-	/**
16
-	 * The LSX Yoast integration class
17
-	 */
18
-	class LSX_Yoast {
15
+     /**
16
+      * The LSX Yoast integration class
17
+      */
18
+     class LSX_Yoast {
19 19
 
20
-		/**
21
-		 * Holds class instance
22
-		 *
23
-		 * @since 1.0.0
24
-		 * @var      object
25
-		 */
26
-		protected static $instance = null;
20
+          /**
21
+           * Holds class instance
22
+           *
23
+           * @since 1.0.0
24
+           * @var      object
25
+           */
26
+          protected static $instance = null;
27 27
 
28
-		/**
29
-		 * Setup class.
30
-		 *
31
-		 * @since 1.0
32
-		 */
33
-		public function __construct() {
28
+          /**
29
+           * Setup class.
30
+           *
31
+           * @since 1.0
32
+           */
33
+          public function __construct() {
34 34
 
35
-			add_action( 'wp_enqueue_scripts', array( $this, 'lsx_yoast_scripts_add_styles' ) );
36
-		}
35
+               add_action( 'wp_enqueue_scripts', array( $this, 'lsx_yoast_scripts_add_styles' ) );
36
+          }
37 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
-		}
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
-		 * Yoast enqueue styles.
54
-		 *
55
-		 * @package    lsx
56
-		 * @subpackage yoast
57
-		 */
58
-		public function lsx_yoast_scripts_add_styles() {
59
-			wp_enqueue_script( 'lsx_yoast_js', get_template_directory_uri() . '/assets/js/yoast/yoast.js', array( 'jquery' ), LSX_VERSION, true );
60
-			wp_enqueue_style( 'lsx_yoast_css', get_template_directory_uri() . '/assets/css/yoast/yoast.css', array( 'lsx_main' ), LSX_VERSION );
61
-		}
62
-	}
52
+          /**
53
+           * Yoast enqueue styles.
54
+           *
55
+           * @package    lsx
56
+           * @subpackage yoast
57
+           */
58
+          public function lsx_yoast_scripts_add_styles() {
59
+               wp_enqueue_script( 'lsx_yoast_js', get_template_directory_uri() . '/assets/js/yoast/yoast.js', array( 'jquery' ), LSX_VERSION, true );
60
+               wp_enqueue_style( 'lsx_yoast_css', get_template_directory_uri() . '/assets/css/yoast/yoast.css', array( 'lsx_main' ), LSX_VERSION );
61
+          }
62
+     }
63 63
 
64 64
 endif;
65 65
 
Please login to merge, or discard this patch.
includes/the-events-calendar/the-events-calendar.php 1 patch
Indentation   +178 added lines, -178 removed lines patch added patch discarded remove patch
@@ -7,210 +7,210 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
includes/hooks.php 1 patch
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
includes/config.php 1 patch
Indentation   +315 added lines, -315 removed lines patch added patch discarded remove patch
@@ -7,273 +7,273 @@  discard block
 block discarded – undo
7 7
  */
8 8
 
9 9
 if ( ! defined( 'ABSPATH' ) ) {
10
-	exit;
10
+     exit;
11 11
 }
12 12
 
13 13
 if ( ! function_exists( 'lsx_setup' ) ) :
14 14
 
15
-	/**
16
-	 * Theme after_setup_theme action.
17
-	 *
18
-	 * @package    lsx
19
-	 * @subpackage config
20
-	 */
21
-	function lsx_setup() {
22
-		global $content_width;
23
-		$content_width = 1140;
24
-
25
-		load_theme_textdomain( 'lsx', get_template_directory() . '/languages' );
26
-
27
-		add_image_size( 'lsx-thumbnail-carousel', 350, 230, true );
28
-		add_image_size( 'lsx-thumbnail-wide', 360, 168, true );
29
-		add_image_size( 'lsx-thumbnail-square', 350, 350, true );
30
-		add_image_size( 'lsx-thumbnail-single', 750, 350, true );
31
-		add_image_size( 'lsx-banner', 1920, 600, true );
32
-
33
-		register_nav_menus(
34
-			array(
35
-				'primary'       => esc_html__( 'Primary Menu', 'lsx' ),
36
-				'top-menu'      => esc_html__( 'Top Menu (right)', 'lsx' ),
37
-				'top-menu-left' => esc_html__( 'Top Menu (left)', 'lsx' ),
38
-				'social'        => esc_html__( 'Social Menu', 'lsx' ),
39
-				'footer'        => esc_html__( 'Footer Menu', 'lsx' ),
40
-			)
41
-		);
42
-
43
-		add_theme_support( 'automatic-feed-links' );
44
-		add_theme_support( 'custom-background' );
45
-
46
-		add_theme_support(
47
-			'custom-logo',
48
-			array(
49
-				'height'      => 50,
50
-				'width'       => 160,
51
-				'flex-width'  => true,
52
-				'flex-height' => true,
53
-			)
54
-		);
55
-
56
-		add_theme_support( 'html5', array( 'caption' ) );
57
-
58
-		add_theme_support(
59
-			'post-formats',
60
-			array(
61
-				'image',
62
-				'video',
63
-				'gallery',
64
-				'audio',
65
-				'quote',
66
-			)
67
-		);
68
-
69
-		add_theme_support( 'post-thumbnails' );
70
-		add_theme_support( 'sensei' );
71
-
72
-		add_theme_support(
73
-			'site-logo',
74
-			array(
75
-				'header-text' => array(
76
-					'site-title',
77
-					'site-description',
78
-				),
79
-				'size'        => 'medium',
80
-			)
81
-		);
82
-
83
-		add_theme_support( 'title-tag' );
84
-
85
-		/*
15
+     /**
16
+      * Theme after_setup_theme action.
17
+      *
18
+      * @package    lsx
19
+      * @subpackage config
20
+      */
21
+     function lsx_setup() {
22
+          global $content_width;
23
+          $content_width = 1140;
24
+
25
+          load_theme_textdomain( 'lsx', get_template_directory() . '/languages' );
26
+
27
+          add_image_size( 'lsx-thumbnail-carousel', 350, 230, true );
28
+          add_image_size( 'lsx-thumbnail-wide', 360, 168, true );
29
+          add_image_size( 'lsx-thumbnail-square', 350, 350, true );
30
+          add_image_size( 'lsx-thumbnail-single', 750, 350, true );
31
+          add_image_size( 'lsx-banner', 1920, 600, true );
32
+
33
+          register_nav_menus(
34
+               array(
35
+                    'primary'       => esc_html__( 'Primary Menu', 'lsx' ),
36
+                    'top-menu'      => esc_html__( 'Top Menu (right)', 'lsx' ),
37
+                    'top-menu-left' => esc_html__( 'Top Menu (left)', 'lsx' ),
38
+                    'social'        => esc_html__( 'Social Menu', 'lsx' ),
39
+                    'footer'        => esc_html__( 'Footer Menu', 'lsx' ),
40
+               )
41
+          );
42
+
43
+          add_theme_support( 'automatic-feed-links' );
44
+          add_theme_support( 'custom-background' );
45
+
46
+          add_theme_support(
47
+               'custom-logo',
48
+               array(
49
+                    'height'      => 50,
50
+                    'width'       => 160,
51
+                    'flex-width'  => true,
52
+                    'flex-height' => true,
53
+               )
54
+          );
55
+
56
+          add_theme_support( 'html5', array( 'caption' ) );
57
+
58
+          add_theme_support(
59
+               'post-formats',
60
+               array(
61
+                    'image',
62
+                    'video',
63
+                    'gallery',
64
+                    'audio',
65
+                    'quote',
66
+               )
67
+          );
68
+
69
+          add_theme_support( 'post-thumbnails' );
70
+          add_theme_support( 'sensei' );
71
+
72
+          add_theme_support(
73
+               'site-logo',
74
+               array(
75
+                    'header-text' => array(
76
+                         'site-title',
77
+                         'site-description',
78
+                    ),
79
+                    'size'        => 'medium',
80
+               )
81
+          );
82
+
83
+          add_theme_support( 'title-tag' );
84
+
85
+          /*
86 86
 		 * @TODO - Necessary to test it
87 87
 		 */
88 88
 
89
-		// add_theme_support( 'woocommerce' );.
90
-		add_theme_support( 'starter-content', array(
91
-			'widgets'     => array(
92
-				'sidebar-home'       => array(
93
-					'custom_widget_1' => array(
94
-						'text',
95
-
96
-						array(
97
-							'title' => '',
98
-							'text'  => wp_kses_post( '<div class="row"><div class="col-sm-12 text-center"><h3>Build your perfect website <small>with the LSX theme</small></h3></div></div><div class="row"><div class="col-sm-4 text-center"><h4>Fast</h4><p>"Quick" isn\'t a word most people use when describing their website building experience.</p></div><div class="col-sm-4 text-center"><h4>Easy</h4><p>We\'ve built websites for countless clients, and we know what kind of back-end makes sense easily.</p></div><div class="col-sm-4 text-center"><h4>Comprehensive</h4><p>The LSX extensions come with features out the box that are essential.</p></div></div>' ),
99
-						),
100
-					),
101
-
102
-					'custom_widget_2' => array(
103
-						'text',
104
-
105
-						array(
106
-							'title' => '',
107
-							'text'  => wp_kses_post( '<div class="lsx-full-width-alt"><div class="row"><div class="col-xs-12"><h3>A big CTA title</h3><p class="text-center"><a class="btn cta-btn" href="http://www.lsdeb.biz/" target="_blank" rel="noreferrer noopener">Hire Us</a><p></div></div></div>' ),
108
-						),
109
-					),
110
-
111
-					'custom_widget_3' => array(
112
-						'text',
113
-
114
-						array(
115
-							'title' => '',
116
-							'text'  => wp_kses_post( '<div class="row"><div class="col-xs-12"><h3>Homepage Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p></div></div>' ),
117
-						),
118
-					),
119
-				),
120
-
121
-				'sidebar-footer'     => array(
122
-					'custom_widget_1' => array(
123
-						'text',
124
-
125
-						array(
126
-							'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
127
-							'text'  => esc_html__( 'This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx' ),
128
-						),
129
-					),
130
-
131
-					'custom_widget_2' => array(
132
-						'text',
133
-
134
-						array(
135
-							'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
136
-							'text'  => esc_html__( 'This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx' ),
137
-						),
138
-					),
139
-
140
-					'custom_widget_3' => array(
141
-						'text',
142
-
143
-						array(
144
-							'title' => esc_html__( 'Contact us:', 'lsx' ),
145
-							'text'  => wp_kses_post( '<a href="mailto:[email protected]><i class="fa fa-envelope fa-fw"></i> [email protected]</a><br><a href="tel:+27214489843"><i class="fa fa-phone fa-fw"></i> +27 21 448 9843</a><br><i class="fa fa-skype fa-fw"></i> /lightspeeddevelopment' ),
146
-						),
147
-					),
148
-				),
149
-
150
-				'sidebar-footer-cta' => array(
151
-					'custom_widget_1' => array(
152
-						'text',
153
-
154
-						array(
155
-							'title' => esc_html__( 'A Footer Call to Action', 'lsx' ),
156
-							'text'  => esc_html__( 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.', 'lsx' ),
157
-						),
158
-					),
159
-				),
160
-			),
161
-
162
-			'posts'       => array(
163
-				'home'    => array(
164
-					'template'     => 'page-templates/template-front-page.php',
165
-					'thumbnail'    => '{{image-banner-example-01}}',
166
-					'post_title'   => esc_html__( 'LSX is a free WordPress theme', 'lsx' ),
167
-					'post_content' => '',
168
-				),
169
-
170
-				'about'   => array(
171
-					'thumbnail' => '{{image-banner-example-02}}',
172
-				),
173
-
174
-				'blog',
175
-
176
-				'contact' => array(
177
-					'thumbnail' => '{{image-banner-example-03}}',
178
-				),
179
-			),
180
-
181
-			'attachments' => array(
182
-				'image-banner-example-01' => array(
183
-					'post_title' => esc_html_x( 'Banner Example 01', 'Theme starter content', 'lsx' ),
184
-					'file'       => 'assets/images/admin/banner-example-01.jpg',
185
-				),
186
-
187
-				'image-banner-example-02' => array(
188
-					'post_title' => esc_html_x( 'Banner Example 02', 'Theme starter content', 'lsx' ),
189
-					'file'       => 'assets/images/admin/banner-example-02.jpg',
190
-				),
191
-
192
-				'image-banner-example-03' => array(
193
-					'post_title' => esc_html_x( 'Banner Example 03', 'Theme starter content', 'lsx' ),
194
-					'file'       => 'assets/images/admin/banner-example-03.jpg',
195
-				),
196
-			),
197
-
198
-			'options'     => array(
199
-				'show_on_front'   => 'page',
200
-				'page_on_front'   => '{{home}}',
201
-				'page_for_posts'  => '{{blog}}',
202
-				'blogdescription' => esc_html__( 'LSX starter content example', 'lsx' ),
203
-			),
204
-
205
-			'nav_menus'   => array(
206
-				'primary'  => array(
207
-					'name'  => esc_html__( 'Primary Menu', 'lsx' ),
208
-
209
-					'items' => array(
210
-						'page_home',
211
-						'page_about',
212
-						'page_blog',
213
-						'page_contact',
214
-					),
215
-				),
216
-
217
-				'top-menu' => array(
218
-					'name'  => esc_html__( 'Top Menu', 'lsx' ),
219
-
220
-					'items' => array(
221
-						'custom_link_1' => array(
222
-							'title'   => 'View Map',
223
-							'url'     => 'https://www.google.com/maps/place/LightSpeed+WordPress+Development/@-33.92945,18.45345,17z/data=!3m1!4b1!4m2!3m1!1s0x1dcc5da1b2446d25:0xc8ecdb1cc8afd170',
224
-							'classes' => 'map',
225
-						),
226
-
227
-						'custom_link_2' => array(
228
-							'title'   => '+27 21 448 9843',
229
-							'url'     => 'tel:+27214489843',
230
-							'classes' => 'tel',
231
-						),
232
-
233
-						'custom_link_3' => array(
234
-							'title'   => '[email protected]',
235
-							'url'     => 'mailto:[email protected]',
236
-							'classes' => 'email',
237
-						),
238
-
239
-						'page_contact'  => array(
240
-							'classes' => 'cta',
241
-						),
242
-					),
243
-				),
244
-
245
-				'social'   => array(
246
-					'name'  => esc_html__( 'Social Menu', 'lsx' ),
247
-
248
-					'items' => array(
249
-						'link_facebook',
250
-						'link_foursquare',
251
-						'link_github',
252
-						'link_instagram',
253
-						'link_linkedin',
254
-						'link_pinterest',
255
-						'link_twitter',
256
-						'link_youtube',
257
-					),
258
-				),
259
-
260
-				'footer'   => array(
261
-					'name'  => esc_html__( 'Footer Menu', 'lsx' ),
262
-
263
-					'items' => array(
264
-						'page_about',
265
-						'page_contact',
266
-					),
267
-				),
268
-			),
269
-
270
-			'theme_mods'  => array(
271
-				'lsx_header_fixed'  => true,
272
-				'lsx_header_search' => false,
273
-				'lsx_layout'        => '1c',
274
-			),
275
-		) );
276
-	}
89
+          // add_theme_support( 'woocommerce' );.
90
+          add_theme_support( 'starter-content', array(
91
+               'widgets'     => array(
92
+                    'sidebar-home'       => array(
93
+                         'custom_widget_1' => array(
94
+                              'text',
95
+
96
+                              array(
97
+                                   'title' => '',
98
+                                   'text'  => wp_kses_post( '<div class="row"><div class="col-sm-12 text-center"><h3>Build your perfect website <small>with the LSX theme</small></h3></div></div><div class="row"><div class="col-sm-4 text-center"><h4>Fast</h4><p>"Quick" isn\'t a word most people use when describing their website building experience.</p></div><div class="col-sm-4 text-center"><h4>Easy</h4><p>We\'ve built websites for countless clients, and we know what kind of back-end makes sense easily.</p></div><div class="col-sm-4 text-center"><h4>Comprehensive</h4><p>The LSX extensions come with features out the box that are essential.</p></div></div>' ),
99
+                              ),
100
+                         ),
101
+
102
+                         'custom_widget_2' => array(
103
+                              'text',
104
+
105
+                              array(
106
+                                   'title' => '',
107
+                                   'text'  => wp_kses_post( '<div class="lsx-full-width-alt"><div class="row"><div class="col-xs-12"><h3>A big CTA title</h3><p class="text-center"><a class="btn cta-btn" href="http://www.lsdeb.biz/" target="_blank" rel="noreferrer noopener">Hire Us</a><p></div></div></div>' ),
108
+                              ),
109
+                         ),
110
+
111
+                         'custom_widget_3' => array(
112
+                              'text',
113
+
114
+                              array(
115
+                                   'title' => '',
116
+                                   'text'  => wp_kses_post( '<div class="row"><div class="col-xs-12"><h3>Homepage Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p></div></div>' ),
117
+                              ),
118
+                         ),
119
+                    ),
120
+
121
+                    'sidebar-footer'     => array(
122
+                         'custom_widget_1' => array(
123
+                              'text',
124
+
125
+                              array(
126
+                                   'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
127
+                                   'text'  => esc_html__( 'This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx' ),
128
+                              ),
129
+                         ),
130
+
131
+                         'custom_widget_2' => array(
132
+                              'text',
133
+
134
+                              array(
135
+                                   'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
136
+                                   'text'  => esc_html__( 'This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx' ),
137
+                              ),
138
+                         ),
139
+
140
+                         'custom_widget_3' => array(
141
+                              'text',
142
+
143
+                              array(
144
+                                   'title' => esc_html__( 'Contact us:', 'lsx' ),
145
+                                   'text'  => wp_kses_post( '<a href="mailto:[email protected]><i class="fa fa-envelope fa-fw"></i> [email protected]</a><br><a href="tel:+27214489843"><i class="fa fa-phone fa-fw"></i> +27 21 448 9843</a><br><i class="fa fa-skype fa-fw"></i> /lightspeeddevelopment' ),
146
+                              ),
147
+                         ),
148
+                    ),
149
+
150
+                    'sidebar-footer-cta' => array(
151
+                         'custom_widget_1' => array(
152
+                              'text',
153
+
154
+                              array(
155
+                                   'title' => esc_html__( 'A Footer Call to Action', 'lsx' ),
156
+                                   'text'  => esc_html__( 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.', 'lsx' ),
157
+                              ),
158
+                         ),
159
+                    ),
160
+               ),
161
+
162
+               'posts'       => array(
163
+                    'home'    => array(
164
+                         'template'     => 'page-templates/template-front-page.php',
165
+                         'thumbnail'    => '{{image-banner-example-01}}',
166
+                         'post_title'   => esc_html__( 'LSX is a free WordPress theme', 'lsx' ),
167
+                         'post_content' => '',
168
+                    ),
169
+
170
+                    'about'   => array(
171
+                         'thumbnail' => '{{image-banner-example-02}}',
172
+                    ),
173
+
174
+                    'blog',
175
+
176
+                    'contact' => array(
177
+                         'thumbnail' => '{{image-banner-example-03}}',
178
+                    ),
179
+               ),
180
+
181
+               'attachments' => array(
182
+                    'image-banner-example-01' => array(
183
+                         'post_title' => esc_html_x( 'Banner Example 01', 'Theme starter content', 'lsx' ),
184
+                         'file'       => 'assets/images/admin/banner-example-01.jpg',
185
+                    ),
186
+
187
+                    'image-banner-example-02' => array(
188
+                         'post_title' => esc_html_x( 'Banner Example 02', 'Theme starter content', 'lsx' ),
189
+                         'file'       => 'assets/images/admin/banner-example-02.jpg',
190
+                    ),
191
+
192
+                    'image-banner-example-03' => array(
193
+                         'post_title' => esc_html_x( 'Banner Example 03', 'Theme starter content', 'lsx' ),
194
+                         'file'       => 'assets/images/admin/banner-example-03.jpg',
195
+                    ),
196
+               ),
197
+
198
+               'options'     => array(
199
+                    'show_on_front'   => 'page',
200
+                    'page_on_front'   => '{{home}}',
201
+                    'page_for_posts'  => '{{blog}}',
202
+                    'blogdescription' => esc_html__( 'LSX starter content example', 'lsx' ),
203
+               ),
204
+
205
+               'nav_menus'   => array(
206
+                    'primary'  => array(
207
+                         'name'  => esc_html__( 'Primary Menu', 'lsx' ),
208
+
209
+                         'items' => array(
210
+                              'page_home',
211
+                              'page_about',
212
+                              'page_blog',
213
+                              'page_contact',
214
+                         ),
215
+                    ),
216
+
217
+                    'top-menu' => array(
218
+                         'name'  => esc_html__( 'Top Menu', 'lsx' ),
219
+
220
+                         'items' => array(
221
+                              'custom_link_1' => array(
222
+                                   'title'   => 'View Map',
223
+                                   'url'     => 'https://www.google.com/maps/place/LightSpeed+WordPress+Development/@-33.92945,18.45345,17z/data=!3m1!4b1!4m2!3m1!1s0x1dcc5da1b2446d25:0xc8ecdb1cc8afd170',
224
+                                   'classes' => 'map',
225
+                              ),
226
+
227
+                              'custom_link_2' => array(
228
+                                   'title'   => '+27 21 448 9843',
229
+                                   'url'     => 'tel:+27214489843',
230
+                                   'classes' => 'tel',
231
+                              ),
232
+
233
+                              'custom_link_3' => array(
234
+                                   'title'   => '[email protected]',
235
+                                   'url'     => 'mailto:[email protected]',
236
+                                   'classes' => 'email',
237
+                              ),
238
+
239
+                              'page_contact'  => array(
240
+                                   'classes' => 'cta',
241
+                              ),
242
+                         ),
243
+                    ),
244
+
245
+                    'social'   => array(
246
+                         'name'  => esc_html__( 'Social Menu', 'lsx' ),
247
+
248
+                         'items' => array(
249
+                              'link_facebook',
250
+                              'link_foursquare',
251
+                              'link_github',
252
+                              'link_instagram',
253
+                              'link_linkedin',
254
+                              'link_pinterest',
255
+                              'link_twitter',
256
+                              'link_youtube',
257
+                         ),
258
+                    ),
259
+
260
+                    'footer'   => array(
261
+                         'name'  => esc_html__( 'Footer Menu', 'lsx' ),
262
+
263
+                         'items' => array(
264
+                              'page_about',
265
+                              'page_contact',
266
+                         ),
267
+                    ),
268
+               ),
269
+
270
+               'theme_mods'  => array(
271
+                    'lsx_header_fixed'  => true,
272
+                    'lsx_header_search' => false,
273
+                    'lsx_layout'        => '1c',
274
+               ),
275
+          ) );
276
+     }
277 277
 
278 278
 endif;
279 279
 
@@ -281,21 +281,21 @@  discard block
 block discarded – undo
281 281
 
282 282
 if ( ! function_exists( 'lsx_init' ) ) :
283 283
 
284
-	/**
285
-	 * Theme init action.
286
-	 *
287
-	 * @package    lsx
288
-	 * @subpackage config
289
-	 */
290
-	function lsx_init() {
291
-		add_post_type_support( 'page', 'excerpt' );
284
+     /**
285
+      * Theme init action.
286
+      *
287
+      * @package    lsx
288
+      * @subpackage config
289
+      */
290
+     function lsx_init() {
291
+          add_post_type_support( 'page', 'excerpt' );
292 292
 
293
-		if ( class_exists( 'WooCommerce' ) ) {
294
-			remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 );
295
-		}
293
+          if ( class_exists( 'WooCommerce' ) ) {
294
+               remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 );
295
+          }
296 296
 
297
-		remove_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce', 10 );
298
-	}
297
+          remove_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce', 10 );
298
+     }
299 299
 
300 300
 endif;
301 301
 
@@ -303,22 +303,22 @@  discard block
 block discarded – undo
303 303
 
304 304
 if ( ! function_exists( 'lsx_process_content_width' ) ) :
305 305
 
306
-	/**
307
-	 * Overwrite the $content_width var, based on the layout of the page.
308
-	 *
309
-	 * @package    lsx
310
-	 * @subpackage config
311
-	 */
312
-	function lsx_process_content_width() {
313
-		global $content_width;
314
-
315
-		if (
316
-			is_page_template( 'page-templates/template-front-page.php' ) ||
317
-			is_page_template( 'page-templates/template-full-width.php' )
318
-		) {
319
-			$content_width = 1140;
320
-		}
321
-	}
306
+     /**
307
+      * Overwrite the $content_width var, based on the layout of the page.
308
+      *
309
+      * @package    lsx
310
+      * @subpackage config
311
+      */
312
+     function lsx_process_content_width() {
313
+          global $content_width;
314
+
315
+          if (
316
+               is_page_template( 'page-templates/template-front-page.php' ) ||
317
+               is_page_template( 'page-templates/template-full-width.php' )
318
+          ) {
319
+               $content_width = 1140;
320
+          }
321
+     }
322 322
 
323 323
 endif;
324 324
 
@@ -326,31 +326,31 @@  discard block
 block discarded – undo
326 326
 
327 327
 if ( ! function_exists( 'lsx_file_get_contents' ) ) :
328 328
 
329
-	/**
330
-	 * Get file contents.
331
-	 *
332
-	 * @package    lsx
333
-	 * @subpackage config
334
-	 */
335
-	function lsx_file_get_contents( $file ) {
336
-		if ( file_exists( $file ) ) {
337
-			global $wp_filesystem;
338
-
339
-			if ( empty( $wp_filesystem ) ) {
340
-				require_once ABSPATH . 'wp-admin/includes/file.php';
341
-				WP_Filesystem();
342
-			}
343
-
344
-			if ( $wp_filesystem ) {
345
-				$contents = $wp_filesystem->get_contents( $file );
346
-
347
-				if ( ! empty( $contents ) ) {
348
-					return $contents;
349
-				}
350
-			}
351
-		}
352
-
353
-		return '';
354
-	}
329
+     /**
330
+      * Get file contents.
331
+      *
332
+      * @package    lsx
333
+      * @subpackage config
334
+      */
335
+     function lsx_file_get_contents( $file ) {
336
+          if ( file_exists( $file ) ) {
337
+               global $wp_filesystem;
338
+
339
+               if ( empty( $wp_filesystem ) ) {
340
+                    require_once ABSPATH . 'wp-admin/includes/file.php';
341
+                    WP_Filesystem();
342
+               }
343
+
344
+               if ( $wp_filesystem ) {
345
+                    $contents = $wp_filesystem->get_contents( $file );
346
+
347
+                    if ( ! empty( $contents ) ) {
348
+                         return $contents;
349
+                    }
350
+               }
351
+          }
352
+
353
+          return '';
354
+     }
355 355
 
356 356
 endif;
Please login to merge, or discard this patch.
includes/walker-comment.php 1 patch
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -7,54 +7,54 @@
 block discarded – undo
7 7
  */
8 8
 
9 9
 if ( ! defined( 'ABSPATH' ) ) {
10
-	exit;
10
+     exit;
11 11
 }
12 12
 
13 13
 if ( ! function_exists( 'lsx_get_avatar' ) ) :
14 14
 
15
-	/**
16
-	 * Comment Form Field Filter.
17
-	 *
18
-	 * @package    lsx
19
-	 * @subpackage comment-walker
20
-	 */
21
-	function lsx_get_avatar( $avatar ) {
22
-		$avatar = str_replace( "class='avatar", "class='avatar pull-left media-object ", $avatar );
23
-		$avatar = str_replace( 'class="avatar', 'class="avatar pull-left media-object ', $avatar );
24
-		return $avatar;
25
-	}
15
+     /**
16
+      * Comment Form Field Filter.
17
+      *
18
+      * @package    lsx
19
+      * @subpackage comment-walker
20
+      */
21
+     function lsx_get_avatar( $avatar ) {
22
+          $avatar = str_replace( "class='avatar", "class='avatar pull-left media-object ", $avatar );
23
+          $avatar = str_replace( 'class="avatar', 'class="avatar pull-left media-object ', $avatar );
24
+          return $avatar;
25
+     }
26 26
 
27 27
 endif;
28 28
 
29 29
 add_filter( 'get_avatar', 'lsx_get_avatar' );
30 30
 
31 31
 add_action( 'admin_bar_menu', function() {
32
-	remove_filter( 'get_avatar', 'lsx_get_avatar' );
32
+     remove_filter( 'get_avatar', 'lsx_get_avatar' );
33 33
 }, 0 );
34 34
 
35 35
 add_action( 'wp_after_admin_bar_render', function() {
36
-	add_filter( 'get_avatar', 'lsx_get_avatar' );
36
+     add_filter( 'get_avatar', 'lsx_get_avatar' );
37 37
 } );
38 38
 
39 39
 if ( ! function_exists( 'lsx_comment_form_fields_filter' ) ) :
40 40
 
41
-	/**
42
-	 * Comment Form Field Filter.
43
-	 *
44
-	 * @package    lsx
45
-	 * @subpackage comment-walker
46
-	 */
47
-	function lsx_comment_form_fields_filter( $fields ) {
48
-		foreach ( $fields as &$field ) {
49
-			if ( stristr( 'class=', $field ) ) {
50
-				$field = str_replace( 'class="', 'class="form-control ', $field );
51
-			} else {
52
-				$field = str_replace( '<input', '<input class="form-control" ', $field );
53
-			}
54
-		}
55
-
56
-		return $fields;
57
-	}
41
+     /**
42
+      * Comment Form Field Filter.
43
+      *
44
+      * @package    lsx
45
+      * @subpackage comment-walker
46
+      */
47
+     function lsx_comment_form_fields_filter( $fields ) {
48
+          foreach ( $fields as &$field ) {
49
+               if ( stristr( 'class=', $field ) ) {
50
+                    $field = str_replace( 'class="', 'class="form-control ', $field );
51
+               } else {
52
+                    $field = str_replace( '<input', '<input class="form-control" ', $field );
53
+               }
54
+          }
55
+
56
+          return $fields;
57
+     }
58 58
 
59 59
 endif;
60 60
 
Please login to merge, or discard this patch.