Completed
Push — master ( 386a32...8f5969 )
by Fernando
02:29
created
inc/google-font-collection.php 3 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 	/**
14 14
 	 * Constructor
15
-	**/
15
+	 **/
16 16
 	public function __construct($fonts)
17 17
 	{
18 18
 		if(empty($fonts))
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	/**
34 34
 	 * getFontFamilyNameArray Function
35 35
 	 * this function returns an array containing all of the font family names
36
-	**/
36
+	 **/
37 37
 	function getFontFamilyNameArray()
38 38
 	{
39 39
 		$result;
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	/**
48 48
 	 * getTitle
49 49
 	 * this function returns the font title
50
-	**/
50
+	 **/
51 51
 	function getTitle($key)
52 52
 	{
53 53
 		return $this->fonts[$key]->__get("title");
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	/**
57 57
 	 * getLocation
58 58
 	 * this function returns the font location
59
-	**/
59
+	 **/
60 60
 	function getLocation($key)
61 61
 	{
62 62
 		return $this->fonts[$key]->__get("location");
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	/**
66 66
 	 * getCssDeclaration
67 67
 	 * this function returns the font css declaration
68
-	**/
68
+	 **/
69 69
 	function getCssDeclaration($key)
70 70
 	{
71 71
 		return $this->fonts[$key]->__get("cssDeclaration");
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	 * this function returns an array of css classes
78 78
 	 * this function is used when displaying the fancy list of fonts in the theme customizer
79 79
 	 * this function is used to send a JS file an array for the postMessage transport option in the theme customizer
80
-	**/
80
+	 **/
81 81
 	function getCssClassArray()
82 82
 	{
83 83
 		$result;
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	/**
92 92
 	 * getTotalNumberOfFonts
93 93
 	 * this function returns the total number of fonts
94
-	**/
94
+	 **/
95 95
 	function getTotalNumberOfFonts()
96 96
 	{
97 97
 		return count($this->fonts);
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	/**
101 101
 	 * printThemeCustomizerCssLocations
102 102
 	 * this function prints the links to the css files for the theme customizer
103
-	**/
103
+	 **/
104 104
 	function printThemeCustomizerCssLocations()
105 105
 	{
106 106
 		foreach ($this->fonts as $key => $value) 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 	/**
117 117
 	 * printThemeCustomizerCssClasses
118 118
 	 * this function prints the theme customizer css classes necessary to display all of the fonts
119
-	**/
119
+	 **/
120 120
 	function printThemeCustomizerCssClasses()
121 121
 	{
122 122
 		?>
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	return;
4
+}
5
+// Exit if accessed directly
3 6
 
4 7
 /**
5 8
  * Customize Swatch Control Class
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined('ABSPATH')) return; // Exit if accessed directly
3 3
 /**
4 4
  * Google Font_Collection Class
5 5
 **/
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 	**/
16 16
 	public function __construct($fonts)
17 17
 	{
18
-		if(empty($fonts))
18
+		if (empty($fonts))
19 19
 		{
20 20
 			//we didn't get the required data
21 21
 			return false;
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		// create fonts
25 25
 		foreach ($fonts as $key => $value) 
26 26
 		{	
27
-			if( empty( $value["system"] ) ){
27
+			if (empty($value["system"])) {
28 28
 				$this->fonts[$value["title"]] = new LSX_Google_Font($value["title"], $value["location"], $value["cssDeclaration"], $value["cssClass"]);
29 29
 			}
30 30
 		}
@@ -106,9 +106,9 @@  discard block
 block discarded – undo
106 106
 		foreach ($this->fonts as $key => $value) 
107 107
 		{
108 108
 			$protocol = 'http';
109
-			if(is_ssl()){ $protocol.='s'; }
109
+			if (is_ssl()) { $protocol .= 's'; }
110 110
 			?>
111
-			<link href="<?php echo esc_attr( $protocol ); ?>://fonts.googleapis.com/css?family=<?php echo esc_attr( $value->__get( "location" ) ); ?>" rel='stylesheet'>
111
+			<link href="<?php echo esc_attr($protocol); ?>://fonts.googleapis.com/css?family=<?php echo esc_attr($value->__get("location")); ?>" rel='stylesheet'>
112 112
 			<?php
113 113
 		}
114 114
 	}
@@ -125,8 +125,8 @@  discard block
 block discarded – undo
125 125
 			foreach ($this->fonts as $key => $value) 
126 126
 			{
127 127
 				?>
128
-				.<?php echo esc_attr( $value->__get( "cssClass" ) ); ?>{
129
-					font-family: <?php echo esc_attr( $value->__get( "cssDeclaration" ) ); ?>;
128
+				.<?php echo esc_attr($value->__get("cssClass")); ?>{
129
+					font-family: <?php echo esc_attr($value->__get("cssDeclaration")); ?>;
130 130
 				}
131 131
 				<?php
132 132
 			}
Please login to merge, or discard this patch.
inc/scripts.php 2 patches
Braces   +14 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	return;
4
+}
5
+// Exit if accessed directly
3 6
 
4 7
 /**
5 8
  * Enqueue scripts and styles.
@@ -29,7 +32,7 @@  discard block
 block discarded – undo
29 32
 	wp_enqueue_script('imagesLoaded', get_template_directory_uri().'/js/vendor/imagesloaded.pkgd.min.js', array('jquery','masonry'));	
30 33
 	if(defined('WP_DEBUG') && true === WP_DEBUG){
31 34
 		wp_enqueue_script('lsx_script', get_template_directory_uri() . '/js/lsx-script.js', array('masonry'), null, false);
32
-	}else{
35
+	} else{
33 36
 		wp_enqueue_script('lsx_script', get_template_directory_uri() . '/js/lsx-script.min.js', array('masonry'), null, false);
34 37
 	}
35 38
 	
@@ -107,9 +110,15 @@  discard block
 block discarded – undo
107 110
  */
108 111
 function lsx_scripts_defer_parsing( $url ) {
109 112
 	if ( ! ( is_admin() ) ) {
110
-		if ( FALSE === strpos( $url, '.js' ) ) return $url;
111
-		if ( strpos( $url, 'jquery.js' ) ) return $url;
112
-		if ( strpos( $url, ' defer ' ) ) return $url;
113
+		if ( FALSE === strpos( $url, '.js' ) ) {
114
+			return $url;
115
+		}
116
+		if ( strpos( $url, 'jquery.js' ) ) {
117
+			return $url;
118
+		}
119
+		if ( strpos( $url, ' defer ' ) ) {
120
+			return $url;
121
+		}
113 122
 		return "$url' defer onload='";
114 123
 	}
115 124
 
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined('ABSPATH')) return; // Exit if accessed directly
3 3
 
4 4
 /**
5 5
  * Enqueue scripts and styles.
@@ -14,8 +14,8 @@  discard block
 block discarded – undo
14 14
 	
15 15
 	wp_enqueue_style('lsx_main', get_template_directory_uri() . '/css/app.css', array(), LSX_VERSION);
16 16
 	
17
-	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
18
-		wp_enqueue_script( 'comment-reply' );
17
+	if (is_singular() && comments_open() && get_option('thread_comments')) {
18
+		wp_enqueue_script('comment-reply');
19 19
 	}
20 20
 
21 21
 	wp_enqueue_script('bootstrap', get_template_directory_uri() . '/js/vendor/bootstrap.min.js', array('jquery'), LSX_VERSION, false);
@@ -26,38 +26,38 @@  discard block
 block discarded – undo
26 26
 	wp_enqueue_script('picturefill', get_template_directory_uri() . '/js/vendor/picturefill.min.js', array(), LSX_VERSION, false);
27 27
 
28 28
 	wp_enqueue_script('masonry');
29
-	wp_enqueue_script('imagesLoaded', get_template_directory_uri().'/js/vendor/imagesloaded.pkgd.min.js', array('jquery','masonry'), LSX_VERSION);	
30
-	if(defined('WP_DEBUG') && true === WP_DEBUG){
29
+	wp_enqueue_script('imagesLoaded', get_template_directory_uri() . '/js/vendor/imagesloaded.pkgd.min.js', array('jquery', 'masonry'), LSX_VERSION);	
30
+	if (defined('WP_DEBUG') && true === WP_DEBUG) {
31 31
 		wp_enqueue_script('lsx_script', get_template_directory_uri() . '/js/lsx-script.js', array('masonry'), LSX_VERSION, false);
32
-	}else{
32
+	} else {
33 33
 		wp_enqueue_script('lsx_script', get_template_directory_uri() . '/js/lsx-script.min.js', array('masonry'), LSX_VERSION, false);
34 34
 	}
35 35
 	
36 36
 	//Set some parameters that we can use in the JS
37 37
 	$is_portfolio = false;
38
-	if(is_post_type_archive('jetpack-portfolio') || is_tax('jetpack-portfolio-type') || is_tax('jetpack-portfolio-tag') || is_page_template('page-templates/template-portfolio.php')){
38
+	if (is_post_type_archive('jetpack-portfolio') || is_tax('jetpack-portfolio-type') || is_tax('jetpack-portfolio-tag') || is_page_template('page-templates/template-portfolio.php')) {
39 39
 		$is_portfolio = true;
40 40
 	}
41 41
 	$param_array = array(
42 42
 			'is_portfolio' => $is_portfolio
43 43
 	);
44 44
 	//Set the columns for the archives
45
-	$param_array['columns'] = apply_filters('lsx_archive_column_number',3);
46
-	wp_localize_script( 'lsx_script', 'lsx_params', $param_array );
45
+	$param_array['columns'] = apply_filters('lsx_archive_column_number', 3);
46
+	wp_localize_script('lsx_script', 'lsx_params', $param_array);
47 47
 
48 48
 
49
-	wp_enqueue_style( 'fontawesome', get_template_directory_uri() . '/css/font-awesome.min.css', array(), LSX_VERSION );
49
+	wp_enqueue_style('fontawesome', get_template_directory_uri() . '/css/font-awesome.min.css', array(), LSX_VERSION);
50 50
 	
51 51
 	
52
-	if(is_child_theme() && file_exists(get_stylesheet_directory() . '/custom.css')) {
53
-		wp_enqueue_style( 'child-css', get_stylesheet_directory_uri() . '/custom.css', array(), LSX_VERSION );
52
+	if (is_child_theme() && file_exists(get_stylesheet_directory() . '/custom.css')) {
53
+		wp_enqueue_style('child-css', get_stylesheet_directory_uri() . '/custom.css', array(), LSX_VERSION);
54 54
 	}
55 55
 
56 56
 	wp_enqueue_style('medium-break', get_template_directory_uri() . '/css/medium-nav-break.css', array(), LSX_VERSION);
57 57
 	
58 58
 	
59
-	$font = get_theme_mod('lsx_font','raleway_open_sans');
60
-	switch($font){
59
+	$font = get_theme_mod('lsx_font', 'raleway_open_sans');
60
+	switch ($font) {
61 61
 		case 'raleway_open_sans':
62 62
 			$header_font_location = 'Raleway';
63 63
 			$body_font_location = 'Open+Sans';
@@ -86,18 +86,18 @@  discard block
 block discarded – undo
86 86
 	}
87 87
 	
88 88
 	$http_var = 'http';
89
-	if(is_ssl()){ $http_var .= 's'; }
89
+	if (is_ssl()) { $http_var .= 's'; }
90 90
 	
91 91
 	//Call the Google Fonts and then Enque them.
92
-	wp_register_style('lsx-header-font', $http_var.'://fonts.googleapis.com/css?family='.$header_font_location);
93
-	wp_register_style('lsx-body-font', $http_var.'://fonts.googleapis.com/css?family='.$body_font_location);
94
-	wp_enqueue_style( 'lsx-header-font' );
95
-	wp_enqueue_style( 'lsx-body-font' );
92
+	wp_register_style('lsx-header-font', $http_var . '://fonts.googleapis.com/css?family=' . $header_font_location);
93
+	wp_register_style('lsx-body-font', $http_var . '://fonts.googleapis.com/css?family=' . $body_font_location);
94
+	wp_enqueue_style('lsx-header-font');
95
+	wp_enqueue_style('lsx-body-font');
96 96
 	
97
-	wp_enqueue_style('lsx_font_scheme', esc_url( get_template_directory_uri() . '/css/'.$font.'.css' ), array(), LSX_VERSION);
97
+	wp_enqueue_style('lsx_font_scheme', esc_url(get_template_directory_uri() . '/css/' . $font . '.css'), array(), LSX_VERSION);
98 98
 	
99 99
 }
100
-add_action( 'wp_enqueue_scripts', 'lsx_scripts' );
100
+add_action('wp_enqueue_scripts', 'lsx_scripts');
101 101
 
102 102
 /**
103 103
  * Defer JavaScript
@@ -105,14 +105,14 @@  discard block
 block discarded – undo
105 105
  * @package 	lsx
106 106
  * @subpackage	scripts
107 107
  */
108
-function lsx_scripts_defer_parsing( $url ) {
109
-	if ( ! ( is_admin() ) ) {
110
-		if ( FALSE === strpos( $url, '.js' ) ) return $url;
111
-		if ( strpos( $url, 'jquery.js' ) ) return $url;
112
-		if ( strpos( $url, ' defer ' ) ) return $url;
108
+function lsx_scripts_defer_parsing($url) {
109
+	if ( ! (is_admin())) {
110
+		if (FALSE === strpos($url, '.js')) return $url;
111
+		if (strpos($url, 'jquery.js')) return $url;
112
+		if (strpos($url, ' defer ')) return $url;
113 113
 		return "$url' defer onload='";
114 114
 	}
115 115
 
116 116
 	return $url;
117 117
 }
118
-add_filter( 'clean_url', 'lsx_scripts_defer_parsing', 11, 1 );
118
+add_filter('clean_url', 'lsx_scripts_defer_parsing', 11, 1);
Please login to merge, or discard this patch.
inc/customizer.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	return;
4
+}
5
+// Exit if accessed directly
3 6
 
4 7
 /**
5 8
  * Customizer Configuration File
@@ -164,7 +167,7 @@  discard block
 block discarded – undo
164 167
 				$control = new $control_class( $wp_customize, $slug, array_merge( $default_args, $args ) );
165 168
 				$wp_customize->add_control( $control );
166 169
 			
167
-			}else{
170
+			} else{
168 171
 				
169 172
 				if( isset( $args['control'] ) ){
170 173
 					unset( $args['control'] );
Please login to merge, or discard this patch.
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined('ABSPATH')) return; // Exit if accessed directly
3 3
 
4 4
 /**
5 5
  * Customizer Configuration File
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @author  [email protected] <lsdev.biz>
10 10
  * 
11 11
  */
12
-if ( ! class_exists( 'LSX_Theme_Customizer' ) ) {
12
+if ( ! class_exists('LSX_Theme_Customizer')) {
13 13
 	
14 14
 	class LSX_Theme_Customizer {
15 15
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 		 *
30 30
 		 * @since     1.0.0
31 31
 		 */
32
-		public function __construct( $controls ) {
32
+		public function __construct($controls) {
33 33
 			require get_template_directory() . '/inc/google-font.php';
34 34
 			require get_template_directory() . '/inc/google-font-collection.php';
35 35
 			require get_template_directory() . '/inc/customizer-core.php';
@@ -40,19 +40,19 @@  discard block
 block discarded – undo
40 40
 
41 41
 			$this->controls = $controls;
42 42
 
43
-			add_action( 'customize_preview_init', array($this,'customize_preview_js' ),20);
44
-			add_action( 'customize_register', array($this,'customizer'), 11 );
43
+			add_action('customize_preview_init', array($this, 'customize_preview_js'), 20);
44
+			add_action('customize_register', array($this, 'customizer'), 11);
45 45
 			
46
-			add_action( 'wp_ajax_customizer_site_title', array($this,'ajax_site_title') );
47
-			add_action( 'wp_ajax_nopriv_customizer_site_title', array($this,'ajax_site_title') );
46
+			add_action('wp_ajax_customizer_site_title', array($this, 'ajax_site_title'));
47
+			add_action('wp_ajax_nopriv_customizer_site_title', array($this, 'ajax_site_title'));
48 48
 		}
49 49
 		
50 50
 		/**
51 51
 		 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
52 52
 		 */
53 53
 		function customize_preview_js() {
54
-			wp_enqueue_script( 'lsx_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), LSX_VERSION, true );
55
-			wp_localize_script( 'lsx_customizer', 'lsx_customizer_params', array( 'template_directory' => get_template_directory_uri() ) );
54
+			wp_enqueue_script('lsx_customizer', get_template_directory_uri() . '/js/customizer.js', array('customize-preview'), LSX_VERSION, true);
55
+			wp_localize_script('lsx_customizer', 'lsx_customizer_params', array('template_directory' => get_template_directory_uri()));
56 56
 		}
57 57
 		
58 58
 		/**
@@ -60,38 +60,38 @@  discard block
 block discarded – undo
60 60
 		 *
61 61
 		 * @since     1.0.0
62 62
 		 */		
63
-		public function customizer( $wp_customize ) {
63
+		public function customizer($wp_customize) {
64 64
 			// start panels
65
-			if( !empty( $this->controls['panels'] ) ){
66
-				foreach( $this->controls['panels'] as $panel_slug => $args ){
67
-					$this->add_panel( $panel_slug, $args, $wp_customize );
65
+			if ( ! empty($this->controls['panels'])) {
66
+				foreach ($this->controls['panels'] as $panel_slug => $args) {
67
+					$this->add_panel($panel_slug, $args, $wp_customize);
68 68
 				}
69 69
 			}
70 70
 
71 71
 			// start sections
72
-			if( !empty( $this->controls['sections'] ) ){
73
-				foreach( $this->controls['sections'] as $section_slug => $args ){
74
-					$this->add_section( $section_slug, $args, $wp_customize );
72
+			if ( ! empty($this->controls['sections'])) {
73
+				foreach ($this->controls['sections'] as $section_slug => $args) {
74
+					$this->add_section($section_slug, $args, $wp_customize);
75 75
 				}
76 76
 			}
77 77
 
78 78
 			// start settings
79
-			if( !empty( $this->controls['settings'] ) ){
80
-				foreach( $this->controls['settings'] as $settings_slug => $args ){
81
-					$this->add_setting( $settings_slug, $args, $wp_customize );
79
+			if ( ! empty($this->controls['settings'])) {
80
+				foreach ($this->controls['settings'] as $settings_slug => $args) {
81
+					$this->add_setting($settings_slug, $args, $wp_customize);
82 82
 				}
83 83
 			}
84 84
 
85 85
 			// start fields
86
-			if( !empty( $this->controls['fields'] ) ){
87
-				foreach( $this->controls['fields'] as $field_slug => $args ){
88
-					$this->add_control( $field_slug, $args, $wp_customize );
86
+			if ( ! empty($this->controls['fields'])) {
87
+				foreach ($this->controls['fields'] as $field_slug => $args) {
88
+					$this->add_control($field_slug, $args, $wp_customize);
89 89
 				}
90 90
 			}
91 91
 			
92
-			$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
93
-			$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
94
-			$wp_customize->get_setting( 'background_color' )->transport = 'postMessage';
92
+			$wp_customize->get_setting('blogname')->transport = 'postMessage';
93
+			$wp_customize->get_setting('blogdescription')->transport = 'postMessage';
94
+			$wp_customize->get_setting('background_color')->transport = 'postMessage';
95 95
 		}
96 96
 
97 97
 		/**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		 *
100 100
 		 * @since     1.0.0
101 101
 		 */		
102
-		private function add_panel( $slug, $args, $wp_customize ) {
102
+		private function add_panel($slug, $args, $wp_customize) {
103 103
 			$default_args = array(
104 104
 				'title' 		=> null,
105 105
 				'description' 	=> null,
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
 			$wp_customize->add_panel(
109 109
 				$slug,
110
-				array_merge( $default_args, $args )
110
+				array_merge($default_args, $args)
111 111
 			);
112 112
 		}
113 113
 
@@ -116,14 +116,14 @@  discard block
 block discarded – undo
116 116
 		 *
117 117
 		 * @since     1.0.0
118 118
 		 */		
119
-		private function add_section( $slug, $args, $wp_customize ) {
119
+		private function add_section($slug, $args, $wp_customize) {
120 120
 			$default_args = array(
121 121
 				'capability' => 'edit_theme_options', //Capability needed to tweak
122 122
 				'description' => null, //Descriptive tooltip
123 123
 			);
124 124
 
125
-			$wp_customize->add_section( $slug, 
126
-				array_merge( $default_args, $args )
125
+			$wp_customize->add_section($slug, 
126
+				array_merge($default_args, $args)
127 127
 			);
128 128
 		}
129 129
 
@@ -132,15 +132,15 @@  discard block
 block discarded – undo
132 132
 		 *
133 133
 		 * @since     1.0.0
134 134
 		 */		
135
-		private function add_setting( $slug, $args, $wp_customize ) {
136
-			$wp_customize->add_setting( $slug, //No need to use a SERIALIZED name, as `theme_mod` settings already live under one db record
137
-				array_merge( array(
135
+		private function add_setting($slug, $args, $wp_customize) {
136
+			$wp_customize->add_setting($slug, //No need to use a SERIALIZED name, as `theme_mod` settings already live under one db record
137
+				array_merge(array(
138 138
 					'default' 			=> null, //Default setting/value to save
139 139
 					'type' 				=> 'theme_mod', //Is this an 'option' or a 'theme_mod'?
140 140
 					'capability'		=> 'edit_theme_options', //Optional. Special permissions for accessing this setting.
141 141
 					'transport' 		=> 'postMessage', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
142 142
 					'sanitize_callback'	=> 'lsx_sanitize_choices'
143
-				), $args )
143
+				), $args)
144 144
 			);
145 145
 		}
146 146
 
@@ -149,28 +149,28 @@  discard block
 block discarded – undo
149 149
 		 *
150 150
 		 * @since     1.0.0
151 151
 		 */		
152
-		private function add_control( $slug, $args, $wp_customize ) {
152
+		private function add_control($slug, $args, $wp_customize) {
153 153
 			$default_args = array(
154 154
 
155 155
 			);
156 156
 
157
-			if( isset( $args['control'] ) && class_exists( $args['control'] )){
157
+			if (isset($args['control']) && class_exists($args['control'])) {
158 158
 				
159 159
 				$control_class = $args['control'];
160
-				unset( $args['control'] );
160
+				unset($args['control']);
161 161
 
162
-				$control = new $control_class( $wp_customize, $slug, array_merge( $default_args, $args ) );
163
-				$wp_customize->add_control( $control );
162
+				$control = new $control_class($wp_customize, $slug, array_merge($default_args, $args));
163
+				$wp_customize->add_control($control);
164 164
 			
165
-			}else{
165
+			} else {
166 166
 				
167
-				if( isset( $args['control'] ) ){
168
-					unset( $args['control'] );
167
+				if (isset($args['control'])) {
168
+					unset($args['control']);
169 169
 				}
170 170
 
171 171
 				$wp_customize->add_control(
172 172
 					$slug,
173
-					array_merge( $default_args, $args )
173
+					array_merge($default_args, $args)
174 174
 				);
175 175
 			}
176 176
 		}
Please login to merge, or discard this patch.
inc/the-events-calendar.php 3 patches
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,29 +40,29 @@
 block discarded – undo
40 40
 		 		$output = str_replace('Page','<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.__('Events','lsx').'</a>',$output);
41 41
 		 		if(isset($wp_query->query_vars['eventDisplay']) && 'all' === $wp_query->query_vars['eventDisplay']){
42 42
 		 			$output = str_replace($closing_div,get_the_title($wp_query->query_vars['post_parent']).$closing_div,$output);
43
-		 		}else{
43
+		 		} else{
44 44
 		 			$single_event = get_queried_object();
45 45
 		 			$output = str_replace($closing_div,apply_filters('the_title',$single_event->post_title).$closing_div,$output);		 			
46 46
 		 		}
47
-		 	}elseif( is_tax()) {
47
+		 	} elseif( is_tax()) {
48 48
 		 		$tax_event = get_queried_object();
49 49
 		 		$output = str_replace('Page','<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.__('Events','lsx').'</a>',$output);
50 50
 		 		$output = str_replace($closing_div,'&nbsp;/&nbsp;'.apply_filters('the_title',$tax_event->name).$closing_div,$output);
51
-		 	}else{
51
+		 	} else{
52 52
 		 		$output = str_replace('Page',__('Events','lsx'),$output);
53 53
 		 	}		 	
54
-		 }elseif(function_exists('yoast_breadcrumb')){
54
+		 } elseif(function_exists('yoast_breadcrumb')){
55 55
 		 	$closing_div = '</div>';
56 56
 		 	$last_breadcrumb = '<span class="breadcrumb_last">'.__('Events','lsx').'</span>';
57 57
 		 	
58 58
 		 	if( is_single()) {
59 59
 		 		$single_event = get_queried_object();
60 60
 		 		$output = str_replace($closing_div,'<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.__('Events','lsx').'</a>&nbsp;/&nbsp;'.apply_filters('the_title',$single_event->post_title),$output);
61
-		 	}elseif( is_tax()) {
61
+		 	} elseif( is_tax()) {
62 62
 		 		$tax_event = get_queried_object();
63 63
 		 		$output = str_replace($last_breadcrumb,'<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.__('Events','lsx').'</a>&nbsp;/&nbsp;'.apply_filters('the_title',$tax_event->name),$output);
64 64
 		 		
65
-		 	}else{
65
+		 	} else{
66 66
 		 		$output = str_replace('Page',__('Events','lsx'),$output);
67 67
 		 	}		 	
68 68
 		 }		
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
  */
19 19
 
20 20
 function lsx_events_styles() {
21
-    wp_enqueue_style( 'events', get_template_directory_uri() . '/css/the-events-calendar.css', array(), LSX_VERSION );
21
+	wp_enqueue_style( 'events', get_template_directory_uri() . '/css/the-events-calendar.css', array(), LSX_VERSION );
22 22
 }
23 23
 add_action( 'wp_enqueue_scripts', 'lsx_events_styles' );
24 24
 
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
  */
19 19
 
20 20
 function lsx_events_styles() {
21
-    wp_enqueue_style( 'events', get_template_directory_uri() . '/css/the-events-calendar.css', array(), LSX_VERSION );
21
+    wp_enqueue_style('events', get_template_directory_uri() . '/css/the-events-calendar.css', array(), LSX_VERSION);
22 22
 }
23
-add_action( 'wp_enqueue_scripts', 'lsx_events_styles' );
23
+add_action('wp_enqueue_scripts', 'lsx_events_styles');
24 24
 
25 25
 
26 26
 /**
@@ -32,41 +32,41 @@  discard block
 block discarded – undo
32 32
 
33 33
 function lsx_tribe_breadcrumbs($output) {
34 34
 	global $wp_query;
35
-	if( (isset($wp_query->tribe_is_event) && true === $wp_query->tribe_is_event) || (isset($wp_query->query_vars['post_type']) && !is_array($wp_query->query_vars['post_type']) && 'tribe_venue' === $wp_query->query_vars['post_type'])){
36
-		if(function_exists('woocommerce_breadcrumb')){
35
+	if ((isset($wp_query->tribe_is_event) && true === $wp_query->tribe_is_event) || (isset($wp_query->query_vars['post_type']) && ! is_array($wp_query->query_vars['post_type']) && 'tribe_venue' === $wp_query->query_vars['post_type'])) {
36
+		if (function_exists('woocommerce_breadcrumb')) {
37 37
 		 	$closing_div = '</nav>';
38 38
 
39
-		 	if( is_single()) {
40
-		 		$output = str_replace('Page','<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.esc_html__('Events','lsx').'</a>',$output);
41
-		 		if(isset($wp_query->query_vars['eventDisplay']) && 'all' === $wp_query->query_vars['eventDisplay']){
42
-		 			$output = str_replace($closing_div,get_the_title($wp_query->query_vars['post_parent']).$closing_div,$output);
43
-		 		}else{
39
+		 	if (is_single()) {
40
+		 		$output = str_replace('Page', '<a href="' . get_post_type_archive_link('tribe_events') . '">' . esc_html__('Events', 'lsx') . '</a>', $output);
41
+		 		if (isset($wp_query->query_vars['eventDisplay']) && 'all' === $wp_query->query_vars['eventDisplay']) {
42
+		 			$output = str_replace($closing_div, get_the_title($wp_query->query_vars['post_parent']) . $closing_div, $output);
43
+		 		} else {
44 44
 		 			$single_event = get_queried_object();
45
-		 			$output = str_replace($closing_div,apply_filters('the_title',$single_event->post_title).$closing_div,$output);		 			
45
+		 			$output = str_replace($closing_div, apply_filters('the_title', $single_event->post_title) . $closing_div, $output);		 			
46 46
 		 		}
47
-		 	}elseif( is_tax()) {
47
+		 	}elseif (is_tax()) {
48 48
 		 		$tax_event = get_queried_object();
49
-		 		$output = str_replace('Page','<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.esc_html__('Events','lsx').'</a>',$output);
50
-		 		$output = str_replace($closing_div,'&nbsp;/&nbsp;'.apply_filters('the_title',$tax_event->name).$closing_div,$output);
51
-		 	}else{
52
-		 		$output = str_replace('Page',esc_html__('Events','lsx'),$output);
49
+		 		$output = str_replace('Page', '<a href="' . get_post_type_archive_link('tribe_events') . '">' . esc_html__('Events', 'lsx') . '</a>', $output);
50
+		 		$output = str_replace($closing_div, '&nbsp;/&nbsp;' . apply_filters('the_title', $tax_event->name) . $closing_div, $output);
51
+		 	} else {
52
+		 		$output = str_replace('Page', esc_html__('Events', 'lsx'), $output);
53 53
 		 	}		 	
54
-		 }elseif(function_exists('yoast_breadcrumb')){
54
+		 }elseif (function_exists('yoast_breadcrumb')) {
55 55
 		 	$closing_div = '</div>';
56
-		 	$last_breadcrumb = '<span class="breadcrumb_last">'.esc_html__('Events','lsx').'</span>';
56
+		 	$last_breadcrumb = '<span class="breadcrumb_last">' . esc_html__('Events', 'lsx') . '</span>';
57 57
 		 	
58
-		 	if( is_single()) {
58
+		 	if (is_single()) {
59 59
 		 		$single_event = get_queried_object();
60
-		 		$output = str_replace($closing_div,'<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.esc_html__('Events','lsx').'</a>&nbsp;/&nbsp;'.apply_filters('the_title',$single_event->post_title),$output);
61
-		 	}elseif( is_tax()) {
60
+		 		$output = str_replace($closing_div, '<a href="' . get_post_type_archive_link('tribe_events') . '">' . esc_html__('Events', 'lsx') . '</a>&nbsp;/&nbsp;' . apply_filters('the_title', $single_event->post_title), $output);
61
+		 	}elseif (is_tax()) {
62 62
 		 		$tax_event = get_queried_object();
63
-		 		$output = str_replace($last_breadcrumb,'<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.esc_html__('Events','lsx').'</a>&nbsp;/&nbsp;'.apply_filters('the_title',$tax_event->name),$output);
63
+		 		$output = str_replace($last_breadcrumb, '<a href="' . get_post_type_archive_link('tribe_events') . '">' . esc_html__('Events', 'lsx') . '</a>&nbsp;/&nbsp;' . apply_filters('the_title', $tax_event->name), $output);
64 64
 		 		
65
-		 	}else{
66
-		 		$output = str_replace('Page',esc_html__('Events','lsx'),$output);
65
+		 	} else {
66
+		 		$output = str_replace('Page', esc_html__('Events', 'lsx'), $output);
67 67
 		 	}		 	
68 68
 		 }		
69 69
 	}
70 70
 	return $output;
71 71
 }
72
-add_filter( 'lsx_breadcrumbs', 'lsx_tribe_breadcrumbs',1,10 );
73 72
\ No newline at end of file
73
+add_filter('lsx_breadcrumbs', 'lsx_tribe_breadcrumbs', 1, 10);
74 74
\ No newline at end of file
Please login to merge, or discard this patch.
inc/customizer-layout.php 2 patches
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	return;
4
+}
5
+// Exit if accessed directly
3 6
 
4 7
 /**
5 8
  * Customize Swatch Control Class
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined('ABSPATH')) return; // Exit if accessed directly
3 3
 
4 4
 /**
5 5
  * Customize Swatch Control Class
6 6
  *
7 7
  * @since 1.0.0
8 8
  */
9
-if( !class_exists( 'WP_Customize_Control' ) ){
9
+if ( ! class_exists('WP_Customize_Control')) {
10 10
 	return;
11 11
 }
12 12
 class LSX_Customize_Layout_Control extends WP_Customize_Control {
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
 	 * @param string $id
39 39
 	 * @param array $args
40 40
 	 */
41
-	public function __construct( $manager, $id, $args = array() ) {
42
-		parent::__construct( $manager, $id, $args );
43
-		if( !empty( $args['choices'] ) ){
41
+	public function __construct($manager, $id, $args = array()) {
42
+		parent::__construct($manager, $id, $args);
43
+		if ( ! empty($args['choices'])) {
44 44
 			$this->layouts = $args['choices'];
45 45
 		}
46 46
 	}
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	public function enqueue() {
54 54
 		// 
55
-		wp_enqueue_script( 'lsx-layout-control', get_template_directory_uri() .'/js/customizer-layout.js', array('jquery'), LSX_VERSION, true );
55
+		wp_enqueue_script('lsx-layout-control', get_template_directory_uri() . '/js/customizer-layout.js', array('jquery'), LSX_VERSION, true);
56 56
 	}
57 57
 
58 58
 	/**
@@ -62,30 +62,30 @@  discard block
 block discarded – undo
62 62
 	 */
63 63
 	public function render_content() {
64 64
 		
65
-		$post_id    = 'customize-control-' . str_replace( '[', '-', str_replace( ']', '', $this->id ) );
65
+		$post_id = 'customize-control-' . str_replace('[', '-', str_replace(']', '', $this->id));
66 66
 		$class = 'customize-control customize-control-' . $this->type;
67 67
 		$value = $this->value();
68 68
 
69 69
 		?>
70 70
 		<label>
71
-			<?php if ( ! empty( $this->label ) ) { ?>
72
-				<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
71
+			<?php if ( ! empty($this->label)) { ?>
72
+				<span class="customize-control-title"><?php echo esc_html($this->label); ?></span>
73 73
 			<?php }
74
-			if ( ! empty( $this->description ) ) { ?>
75
-				<span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span>
74
+			if ( ! empty($this->description)) { ?>
75
+				<span class="description customize-control-description"><?php echo esc_html($this->description); ?></span>
76 76
 			<?php } ?>
77 77
 			<div class="layouts-selector">
78 78
 			<?php
79
-			foreach( $this->layouts as $layout ){
79
+			foreach ($this->layouts as $layout) {
80 80
 				$sel = 'border: 1px solid transparent;';
81
-				if( $value == $layout ){
81
+				if ($value == $layout) {
82 82
 					$sel = 'border: 1px solid rgb(43, 166, 203);';
83 83
 				}
84
-				echo '<img class="layout-button" style="padding:2px;'. esc_attr( $sel ) .'" src="' . esc_attr( get_template_directory_uri() ) .'/img/' . esc_attr( $layout ) . '.png" data-option="' . esc_attr( $layout ) . '">';
84
+				echo '<img class="layout-button" style="padding:2px;' . esc_attr($sel) . '" src="' . esc_attr(get_template_directory_uri()) . '/img/' . esc_attr($layout) . '.png" data-option="' . esc_attr($layout) . '">';
85 85
 			}
86 86
 
87 87
 			?>
88
-			<input <?php $this->link(); ?> class="selected-layout <?php echo esc_attr( $class ); ?>" id="<?php echo esc_attr( $post_id ); ?>" type="hidden" value="<?php echo esc_attr( $value ); ?>" <?php $this->input_attrs(); ?>>
88
+			<input <?php $this->link(); ?> class="selected-layout <?php echo esc_attr($class); ?>" id="<?php echo esc_attr($post_id); ?>" type="hidden" value="<?php echo esc_attr($value); ?>" <?php $this->input_attrs(); ?>>
89 89
 			</div>
90 90
 		</label>
91 91
 	<?php
Please login to merge, or discard this patch.
functions.php 2 patches
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	return;
4
+}
5
+// Exit if accessed directly
3 6
 
4 7
 /**
5 8
  * Customize Swatch Control Class
Please login to merge, or discard this patch.
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
  *
5 5
  * @package lsx
6 6
  */
7
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
7
+if ( ! defined('ABSPATH')) return; // Exit if accessed directly
8 8
 
9 9
 define('LSX_VERSION', '1.8.0');
10 10
 
@@ -19,22 +19,22 @@  discard block
 block discarded – undo
19 19
 require get_template_directory() . '/inc/comment-walker.php';
20 20
 require get_template_directory() . '/inc/jetpack.php';
21 21
 require get_template_directory() . '/inc/lazyload.php';
22
-if(class_exists('BuddyPress')){
22
+if (class_exists('BuddyPress')) {
23 23
 	require get_template_directory() . '/inc/buddypress.php';
24 24
 }
25
-if(class_exists('WooCommerce')){
25
+if (class_exists('WooCommerce')) {
26 26
 	require get_template_directory() . '/inc/woocommerce.php';
27 27
 }
28
-if(class_exists('WP_Job_Manager')){
28
+if (class_exists('WP_Job_Manager')) {
29 29
 	require get_template_directory() . '/inc/wp-job-manager.php';
30 30
 }
31
-if(class_exists('Tribe__Events__Main')){
31
+if (class_exists('Tribe__Events__Main')) {
32 32
 	require get_template_directory() . '/inc/the-events-calendar.php';
33 33
 }
34 34
 require get_template_directory() . '/inc/template-tags.php';
35 35
 require get_template_directory() . '/inc/extras.php';
36 36
 require get_template_directory() . '/inc/wp-bootstrap-navwalker.php';
37
-if(class_exists('Sensei_WC')){
37
+if (class_exists('Sensei_WC')) {
38 38
 	require get_template_directory() . '/inc/sensei.php';
39 39
 }
40 40
 
@@ -46,10 +46,10 @@  discard block
 block discarded – undo
46 46
  * @category	customizer
47 47
  * @return		$lsx_controls array()
48 48
  */
49
-function lsx_customizer_core_controls( $lsx_controls ) {
49
+function lsx_customizer_core_controls($lsx_controls) {
50 50
 	$lsx_controls['sections']['lsx-core'] = array(
51
-		'title'       =>  esc_html__( 'Core Settings', 'lsx' ),
52
-		'description' => esc_html__( 'Change the core settings.', 'lsx' ),
51
+		'title'       =>  esc_html__('Core Settings', 'lsx'),
52
+		'description' => esc_html__('Change the core settings.', 'lsx'),
53 53
 		'priority'    => 21
54 54
 	);
55 55
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	);
61 61
 
62 62
 	$lsx_controls['fields']['lsx_lazyload_status'] = array(
63
-		'label'         =>  esc_html__( 'Lazy Loading Images', 'lsx' ),
63
+		'label'         =>  esc_html__('Lazy Loading Images', 'lsx'),
64 64
 		'section'       =>  'lsx-core',
65 65
 		'type'          =>  'checkbox',
66 66
 	);
@@ -72,14 +72,14 @@  discard block
 block discarded – undo
72 72
 	);
73 73
 
74 74
 	$lsx_controls['fields']['lsx_preloader_content_status'] = array(
75
-		'label'         =>  esc_html__( 'Preloader Content', 'lsx' ),
75
+		'label'         =>  esc_html__('Preloader Content', 'lsx'),
76 76
 		'section'       =>  'lsx-core',
77 77
 		'type'          =>  'checkbox',
78 78
 	);
79 79
 
80 80
 	return $lsx_controls;
81 81
 }
82
-add_filter( 'lsx_customizer_controls', 'lsx_customizer_core_controls' );
82
+add_filter('lsx_customizer_controls', 'lsx_customizer_core_controls');
83 83
 
84 84
 /**
85 85
  * Returns an array of the layout panel.
@@ -90,56 +90,56 @@  discard block
 block discarded – undo
90 90
  * @return		$lsx_controls array()
91 91
  */
92 92
 function lsx_customizer_layout_controls($lsx_controls) {
93
-	$lsx_controls['settings']['lsx_header_layout']  = array(
93
+	$lsx_controls['settings']['lsx_header_layout'] = array(
94 94
 			'default'       =>  'inline', //Default setting/value to save
95 95
 			'type'        =>  'theme_mod', //Is this an 'option' or a 'theme_mod'?
96 96
 			'transport'     =>  'postMessage', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
97 97
 	);
98 98
 	$lsx_controls['fields']['lsx_header_layout'] = array(
99
-			'label'         =>  esc_html__('Header','lsx'),
99
+			'label'         =>  esc_html__('Header', 'lsx'),
100 100
 			'section'       =>  'lsx-layout',
101 101
 			'control'   =>  'LSX_Customize_Header_Layout_Control',
102
-			'choices'		=>	array('central','expanded','inline')
102
+			'choices'		=>	array('central', 'expanded', 'inline')
103 103
 	);	
104 104
 	$lsx_controls['sections']['lsx-layout'] = array(
105
-			'title'       =>  esc_html__( 'Layout', 'lsx' ),
106
-			'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' ),
105
+			'title'       =>  esc_html__('Layout', 'lsx'),
106
+			'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'),
107 107
 			'priority' => 22
108 108
 	);
109
-	$lsx_controls['settings']['lsx_layout']  = array(
109
+	$lsx_controls['settings']['lsx_layout'] = array(
110 110
 			'default'       =>  '2cr', //Default setting/value to save
111 111
 			'type'        =>  'theme_mod', //Is this an 'option' or a 'theme_mod'?
112 112
 			'transport'     =>  'refresh', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
113 113
 	);
114
-	$lsx_controls['settings']['lsx_header_fixed']  = array(
114
+	$lsx_controls['settings']['lsx_header_fixed'] = array(
115 115
 			'default'       =>  false, //Default setting/value to save
116 116
 			'sanitize_callback' => 'lsx_sanitize_checkbox',
117 117
 			'transport'     =>  'postMessage', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
118 118
 	);
119 119
 	$lsx_controls['fields']['lsx_header_fixed'] = array(
120
-			'label'         =>  esc_html__('Fixed Header','lsx'),
120
+			'label'         =>  esc_html__('Fixed Header', 'lsx'),
121 121
 			'section'       =>  'lsx-layout',
122 122
 			'type'       =>  'checkbox',
123 123
 	);
124
-	$lsx_controls['settings']['lsx_header_search']  = array(
124
+	$lsx_controls['settings']['lsx_header_search'] = array(
125 125
 			'default'       =>  false, //Default setting/value to save
126 126
 			'sanitize_callback' => 'lsx_sanitize_checkbox',
127 127
 			'transport'     =>  'postMessage', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
128 128
 	);
129 129
 	$lsx_controls['fields']['lsx_header_search'] = array(
130
-			'label'         =>  esc_html__('Search Box in Header','lsx'),
130
+			'label'         =>  esc_html__('Search Box in Header', 'lsx'),
131 131
 			'section'       =>  'lsx-layout',
132 132
 			'type'       =>  'checkbox',
133 133
 	);	
134 134
 	$lsx_controls['fields']['lsx_layout'] = array(
135
-			'label'         =>  esc_html__('Body','lsx'),
135
+			'label'         =>  esc_html__('Body', 'lsx'),
136 136
 			'section'       =>  'lsx-layout',
137 137
 			'control'   =>  'LSX_Customize_Layout_Control',
138
-			'choices'		=>	array('1c','2cr','2cl')
138
+			'choices'		=>	array('1c', '2cr', '2cl')
139 139
 	);	
140 140
 	return $lsx_controls;
141 141
 }
142
-add_filter('lsx_customizer_controls','lsx_customizer_layout_controls');
142
+add_filter('lsx_customizer_controls', 'lsx_customizer_layout_controls');
143 143
 
144 144
 /**
145 145
  * Returns an array of the font controls.
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
  */
152 152
 function lsx_customizer_font_controls($lsx_controls) {
153 153
 	$lsx_controls['sections']['lsx-font'] = array(
154
-			'title'       =>  esc_html__( 'Font', 'lsx' ),
154
+			'title'       =>  esc_html__('Font', 'lsx'),
155 155
 			'description' => 'Change the fonts sitewide.',
156 156
 			'priority' => 41
157 157
 	);
158
-	$lsx_controls['settings']['lsx_font']  = array(
158
+	$lsx_controls['settings']['lsx_font'] = array(
159 159
 			'default'       =>  'raleway_open_sans', //Default setting/value to save
160 160
 			'type'        =>  'theme_mod', //Is this an 'option' or a 'theme_mod'?
161 161
 			'transport'     =>  'refresh', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
@@ -169,13 +169,13 @@  discard block
 block discarded – undo
169 169
 			'choices'   =>  array(
170 170
 					'raleway_open_sans' => array(
171 171
 							'header'  => array(
172
-									"title" => esc_html__( 'Raleway', 'lsx' ),
172
+									"title" => esc_html__('Raleway', 'lsx'),
173 173
 									"location" => "Raleway",
174 174
 									"cssDeclaration" => "'Raleway', sans-serif",
175 175
 									"cssClass" => "raleway",
176 176
 							),
177 177
 							'body'  => array(
178
-									"title" => esc_html__( 'Open Sans', 'lsx' ),
178
+									"title" => esc_html__('Open Sans', 'lsx'),
179 179
 									"location" => "Open+Sans",
180 180
 									"cssDeclaration" => "'Open Sans', sans-serif",
181 181
 									"cssClass" => "openSans"
@@ -183,13 +183,13 @@  discard block
 block discarded – undo
183 183
 					),
184 184
 					'noto_serif_noto_sans' => array(
185 185
 							'header'  => array(
186
-									"title" => esc_html__( 'Noto Serif', 'lsx' ),
186
+									"title" => esc_html__('Noto Serif', 'lsx'),
187 187
 									"location" => "Noto+Serif",
188 188
 									"cssDeclaration" => "'Noto Serif', serif",
189 189
 									"cssClass" => "notoSerif",
190 190
 							),
191 191
 							'body'  => array(
192
-									"title" => esc_html__( 'Noto Sans', 'lsx' ),
192
+									"title" => esc_html__('Noto Sans', 'lsx'),
193 193
 									"location" => "Noto+Sans",
194 194
 									"cssDeclaration" => "'Noto Sans', sans-serif",
195 195
 									"cssClass" => "notoSans",
@@ -197,13 +197,13 @@  discard block
 block discarded – undo
197 197
 					),
198 198
 					'noto_sans_noto_sans' => array(
199 199
 					'header'  => array(
200
-					"title" => esc_html__( 'Noto Sans', 'lsx' ),
200
+					"title" => esc_html__('Noto Sans', 'lsx'),
201 201
 					"location" => "Noto+Sans",
202 202
 					"cssDeclaration" => "'Noto Sans', sans-serif",
203 203
 					"cssClass" => "notoSans",
204 204
 					),
205 205
 					'body'  => array(
206
-					"title" => esc_html__( 'Noto Sans', 'lsx' ),
206
+					"title" => esc_html__('Noto Sans', 'lsx'),
207 207
 					"location" => "Noto+Sans",
208 208
 					"cssDeclaration" => "'Noto Sans', sans-serif",
209 209
 					"cssClass" => "notoSans",
@@ -211,13 +211,13 @@  discard block
 block discarded – undo
211 211
 					),
212 212
 					'alegreya_open_sans' => array(
213 213
 					'header'  => array(
214
-					"title" => esc_html__( 'Alegreya', 'lsx' ),
214
+					"title" => esc_html__('Alegreya', 'lsx'),
215 215
 					"location" => "Alegreya",
216 216
 					"cssDeclaration" => "'Alegreya', serif",
217 217
 					"cssClass" => "alegreya",
218 218
 					),
219 219
 					'body'  => array(
220
-					"title" => esc_html__( 'Open Sans', 'lsx' ),
220
+					"title" => esc_html__('Open Sans', 'lsx'),
221 221
 					"location" => "Open+Sans",
222 222
 					"cssDeclaration" => "'Open Sans', sans-serif",
223 223
 					"cssClass" => "openSans"
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 	);	
229 229
 	return $lsx_controls;
230 230
 }
231
-add_filter('lsx_customizer_controls','lsx_customizer_font_controls');
231
+add_filter('lsx_customizer_controls', 'lsx_customizer_font_controls');
232 232
 
233 233
 /**
234 234
  * Returns an array of $controls for the customizer class to generate.
@@ -238,12 +238,12 @@  discard block
 block discarded – undo
238 238
  * @category	customizer
239 239
  * @return		$lsx_controls array()
240 240
  */
241
-function lsx_get_customizer_controls(){
241
+function lsx_get_customizer_controls() {
242 242
 	$lsx_controls = array();
243 243
 	$lsx_controls = apply_filters('lsx_customizer_controls', $lsx_controls);
244 244
 	return $lsx_controls;
245 245
 }
246
-$lsx_customizer = new LSX_Theme_Customizer( lsx_get_customizer_controls() );
246
+$lsx_customizer = new LSX_Theme_Customizer(lsx_get_customizer_controls());
247 247
 
248
-add_image_size( 'lsx-thumbnail-wide', 350, 230, true );
249
-add_image_size( 'lsx-thumbnail-single', 750, 350, true );
250 248
\ No newline at end of file
249
+add_image_size('lsx-thumbnail-wide', 350, 230, true);
250
+add_image_size('lsx-thumbnail-single', 750, 350, true);
251 251
\ No newline at end of file
Please login to merge, or discard this patch.
page-templates/template-full-width.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@  discard block
 block discarded – undo
13 13
 
14 14
 			<?php lsx_content_top(); ?>		
15 15
 			
16
-				<?php while ( have_posts() ) : the_post(); ?>
16
+				<?php while (have_posts()) : the_post(); ?>
17 17
 		
18
-					<?php get_template_part( 'content', 'page' ); ?>
18
+					<?php get_template_part('content', 'page'); ?>
19 19
 		
20 20
 				<?php endwhile; // end of the loop. ?>		
21 21
 				
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 			
24 24
 			<?php
25 25
 				// If comments are open or we have at least one comment, load up the comment template
26
-				if ( comments_open() || '0' != get_comments_number() ) :
26
+				if (comments_open() || '0' != get_comments_number()) :
27 27
 					comments_template();
28 28
 				endif;
29 29
 			?>			
Please login to merge, or discard this patch.
archive.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,9 +44,12 @@
 block discarded – undo
44 44
 			
45 45
 			<?php lsx_paging_nav(); ?>
46 46
 
47
-		<?php else : ?>
47
+		<?php else {
48
+	: ?>
48 49
 
49
-			<?php get_template_part( 'content', 'none' ); ?>
50
+			<?php get_template_part( 'content', 'none' );
51
+}
52
+?>
50 53
 
51 54
 		<?php endif; ?>
52 55
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 	<?php lsx_content_wrap_before(); ?>
13 13
 
14
-	<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
14
+	<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
15 15
 
16 16
 		<?php lsx_content_before(); ?>
17 17
 
@@ -19,12 +19,12 @@  discard block
 block discarded – undo
19 19
 
20 20
 		<?php lsx_content_top(); ?>
21 21
 
22
-		<?php if ( have_posts() ) : ?>
22
+		<?php if (have_posts()) : ?>
23 23
 			
24 24
 			<?php 
25
-			$layout = get_theme_mod('lsx_layout','2cr');
26
-			$layout = apply_filters( 'lsx_layout', $layout );
27
-			if('1c' === $layout && !is_post_type_archive('tribe_events')){
25
+			$layout = get_theme_mod('lsx_layout', '2cr');
26
+			$layout = apply_filters('lsx_layout', $layout);
27
+			if ('1c' === $layout && ! is_post_type_archive('tribe_events')) {
28 28
 				lsx_breadcrumbs();
29 29
 			}
30 30
 			?>
@@ -33,14 +33,14 @@  discard block
 block discarded – undo
33 33
 			?>			
34 34
 
35 35
 			<?php /* Start the Loop */ ?>
36
-			<?php while ( have_posts() ) : the_post(); ?>
36
+			<?php while (have_posts()) : the_post(); ?>
37 37
 
38 38
 				<?php
39 39
 					/* Include the Post-Format-specific template for the content.
40 40
 					 * If you want to override this in a child theme, then include a file
41 41
 					 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
42 42
 					 */
43
-					get_template_part( 'content', get_post_format() );
43
+					get_template_part('content', get_post_format());
44 44
 				?>
45 45
 
46 46
 			<?php endwhile; ?>
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
 		<?php else : ?>
51 51
 
52
-			<?php get_template_part( 'content', 'none' ); ?>
52
+			<?php get_template_part('content', 'none'); ?>
53 53
 
54 54
 		<?php endif; ?>
55 55
 
Please login to merge, or discard this patch.
index.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,9 +44,12 @@
 block discarded – undo
44 44
 			
45 45
 			<?php lsx_paging_nav(); ?>
46 46
 
47
-		<?php else : ?>
47
+		<?php else {
48
+	: ?>
48 49
 
49
-			<?php get_template_part( 'content', 'none' ); ?>
50
+			<?php get_template_part( 'content', 'none' );
51
+}
52
+?>
50 53
 
51 54
 		<?php endif; ?>
52 55
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
 	<?php lsx_content_wrap_before(); ?>
17 17
 
18
-	<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
18
+	<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
19 19
 
20 20
 		<?php lsx_content_before(); ?>
21 21
 
@@ -23,17 +23,17 @@  discard block
 block discarded – undo
23 23
 		
24 24
 		<?php lsx_content_top(); ?>
25 25
 
26
-		<?php if ( have_posts() ) : ?>
26
+		<?php if (have_posts()) : ?>
27 27
 
28 28
 			<?php /* Start the Loop */ ?>
29
-			<?php while ( have_posts() ) : the_post(); ?>
29
+			<?php while (have_posts()) : the_post(); ?>
30 30
 
31 31
 				<?php
32 32
 					/* Include the Post-Format-specific template for the content.
33 33
 					 * If you want to override this in a child theme, then include a file
34 34
 					 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
35 35
 					 */
36
-					get_template_part( 'content', get_post_format() );
36
+					get_template_part('content', get_post_format());
37 37
 				?>
38 38
 
39 39
 			<?php endwhile; ?>
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 			
43 43
 		<?php else : ?>
44 44
 
45
-			<?php get_template_part( 'content', 'none' ); ?>
45
+			<?php get_template_part('content', 'none'); ?>
46 46
 
47 47
 		<?php endif; ?>
48 48
 
@@ -56,5 +56,5 @@  discard block
 block discarded – undo
56 56
 
57 57
 	<?php lsx_content_wrap_after(); ?>
58 58
 
59
-<?php get_sidebar( 'sidebar' ); ?>
59
+<?php get_sidebar('sidebar'); ?>
60 60
 <?php get_footer();
61 61
\ No newline at end of file
Please login to merge, or discard this patch.