Passed
Push — master ( edd4d5...f30d20 )
by Warwick
03:01
created
page-templates/template-sitemap.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 <?php lsx_content_wrap_before(); ?>
14 14
 
15
-<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
15
+<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
16 16
 
17 17
 	<?php lsx_content_before(); ?>
18 18
 
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
 
21 21
 		<?php lsx_content_top(); ?>
22 22
 
23
-		<?php if ( have_posts() ) : ?>
23
+		<?php if (have_posts()) : ?>
24 24
 
25
-			<?php while ( have_posts() ) : the_post(); ?>
25
+			<?php while (have_posts()) : the_post(); ?>
26 26
 
27 27
 				<?php lsx_entry_before(); ?>
28 28
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 						<?php lsx_sitemap_custom_post_type(); ?>
36 36
 					</div><!-- .entry-content -->
37 37
 
38
-					<?php edit_post_link( __( 'Edit', 'lsx' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?>
38
+					<?php edit_post_link(__('Edit', 'lsx'), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>'); ?>
39 39
 
40 40
 					<?php lsx_entry_bottom(); ?>
41 41
 
@@ -57,6 +57,6 @@  discard block
 block discarded – undo
57 57
 
58 58
 <?php lsx_content_wrap_after(); ?>
59 59
 
60
-<?php get_sidebar( 'sitemap' ); ?>
60
+<?php get_sidebar('sitemap'); ?>
61 61
 
62 62
 <?php get_footer();
Please login to merge, or discard this patch.
header.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,14 +11,14 @@
 block discarded – undo
11 11
 <html <?php language_attributes(); ?>>
12 12
 	<head>
13 13
 		<?php lsx_head_top(); ?>
14
-		<meta charset="<?php bloginfo( 'charset' ); ?>">
14
+		<meta charset="<?php bloginfo('charset'); ?>">
15 15
 		<link rel="profile" href="http://gmpg.org/xfn/11">
16
-		<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
16
+		<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
17 17
 		<?php lsx_head_bottom(); ?>
18 18
 		<?php wp_head(); ?>
19 19
 	</head>
20 20
 
21
-	<body <?php body_class( 'lsx' ); ?>>
21
+	<body <?php body_class('lsx'); ?>>
22 22
 		<?php lsx_body_top(); ?>
23 23
 
24 24
 		<div class="header-wrap">
Please login to merge, or discard this patch.
includes/hooks.php 1 patch
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @subpackage hooks
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
  */
18 18
 
19 19
 function lsx_body_top() {
20
-	do_action( 'lsx_body_top' );
20
+	do_action('lsx_body_top');
21 21
 }
22 22
 
23 23
 function lsx_body_bottom() {
24
-	do_action( 'lsx_body_bottom' );
24
+	do_action('lsx_body_bottom');
25 25
 }
26 26
 
27 27
 /**
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
  */
32 32
 
33 33
 function lsx_head_top() {
34
-	do_action( 'lsx_head_top' );
34
+	do_action('lsx_head_top');
35 35
 }
36 36
 
37 37
 function lsx_head_bottom() {
38
-	do_action( 'lsx_head_bottom' );
38
+	do_action('lsx_head_bottom');
39 39
 }
40 40
 
41 41
 /**
@@ -45,27 +45,27 @@  discard block
 block discarded – undo
45 45
  */
46 46
 
47 47
 function lsx_header_before() {
48
-	do_action( 'lsx_header_before' );
48
+	do_action('lsx_header_before');
49 49
 }
50 50
 
51 51
 function lsx_header_after() {
52
-	do_action( 'lsx_header_after' );
52
+	do_action('lsx_header_after');
53 53
 }
54 54
 
55 55
 function lsx_header_top() {
56
-	do_action( 'lsx_header_top' );
56
+	do_action('lsx_header_top');
57 57
 }
58 58
 
59 59
 function lsx_header_bottom() {
60
-	do_action( 'lsx_header_bottom' );
60
+	do_action('lsx_header_bottom');
61 61
 }
62 62
 
63 63
 function lsx_nav_before() {
64
-	do_action( 'lsx_nav_before' );
64
+	do_action('lsx_nav_before');
65 65
 }
66 66
 
67 67
 function lsx_nav_after() {
68
-	do_action( 'lsx_nav_after' );
68
+	do_action('lsx_nav_after');
69 69
 }
70 70
 
71 71
 /**
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
  */
76 76
 
77 77
 function lsx_banner_content() {
78
-	do_action( 'lsx_banner_content' );
78
+	do_action('lsx_banner_content');
79 79
 }
80 80
 
81 81
 function lsx_banner_inner_bottom() {
82
-	do_action( 'lsx_banner_inner_bottom' );
82
+	do_action('lsx_banner_inner_bottom');
83 83
 }
84 84
 
85 85
 /**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
  */
90 90
 
91 91
 function lsx_global_header_inner_bottom() {
92
-	do_action( 'lsx_global_header_inner_bottom' );
92
+	do_action('lsx_global_header_inner_bottom');
93 93
 }
94 94
 
95 95
 /**
@@ -99,35 +99,35 @@  discard block
 block discarded – undo
99 99
  */
100 100
 
101 101
 function lsx_content_wrap_before() {
102
-	do_action( 'lsx_content_wrap_before' );
102
+	do_action('lsx_content_wrap_before');
103 103
 }
104 104
 
105 105
 function lsx_content_wrap_after() {
106
-	do_action( 'lsx_content_wrap_after' );
106
+	do_action('lsx_content_wrap_after');
107 107
 }
108 108
 
109 109
 function lsx_content_before() {
110
-	do_action( 'lsx_content_before' );
110
+	do_action('lsx_content_before');
111 111
 }
112 112
 
113 113
 function lsx_content_after() {
114
-	do_action( 'lsx_content_after' );
114
+	do_action('lsx_content_after');
115 115
 }
116 116
 
117 117
 function lsx_content_top() {
118
-	do_action( 'lsx_content_top' );
118
+	do_action('lsx_content_top');
119 119
 }
120 120
 
121 121
 function lsx_content_bottom() {
122
-	do_action( 'lsx_content_bottom' );
122
+	do_action('lsx_content_bottom');
123 123
 }
124 124
 
125 125
 function lsx_content_post_tags() {
126
-	do_action( 'lsx_content_post_tags' );
126
+	do_action('lsx_content_post_tags');
127 127
 }
128 128
 
129 129
 function lsx_content_sharing() {
130
-	do_action( 'lsx_content_sharing' );
130
+	do_action('lsx_content_sharing');
131 131
 }
132 132
 
133 133
 /**
@@ -137,19 +137,19 @@  discard block
 block discarded – undo
137 137
  */
138 138
 
139 139
 function lsx_entry_before() {
140
-	do_action( 'lsx_entry_before' );
140
+	do_action('lsx_entry_before');
141 141
 }
142 142
 
143 143
 function lsx_entry_after() {
144
-	do_action( 'lsx_entry_after' );
144
+	do_action('lsx_entry_after');
145 145
 }
146 146
 
147 147
 function lsx_entry_top() {
148
-	do_action( 'lsx_entry_top' );
148
+	do_action('lsx_entry_top');
149 149
 }
150 150
 
151 151
 function lsx_entry_bottom() {
152
-	do_action( 'lsx_entry_bottom' );
152
+	do_action('lsx_entry_bottom');
153 153
 }
154 154
 
155 155
 /**
@@ -159,27 +159,27 @@  discard block
 block discarded – undo
159 159
  */
160 160
 
161 161
 function lsx_widget_entry_before() {
162
-	do_action( 'lsx_widget_entry_before' );
162
+	do_action('lsx_widget_entry_before');
163 163
 }
164 164
 
165 165
 function lsx_widget_entry_after() {
166
-	do_action( 'lsx_widget_entry_after' );
166
+	do_action('lsx_widget_entry_after');
167 167
 }
168 168
 
169 169
 function lsx_widget_entry_top() {
170
-	do_action( 'lsx_widget_entry_top' );
170
+	do_action('lsx_widget_entry_top');
171 171
 }
172 172
 
173 173
 function lsx_widget_entry_bottom() {
174
-	do_action( 'lsx_widget_entry_bottom' );
174
+	do_action('lsx_widget_entry_bottom');
175 175
 }
176 176
 
177 177
 function lsx_widget_entry_content_top() {
178
-	do_action( 'lsx_widget_entry_content_top' );
178
+	do_action('lsx_widget_entry_content_top');
179 179
 }
180 180
 
181 181
 function lsx_widget_entry_content_bottom() {
182
-	do_action( 'lsx_widget_entry_content_bottom' );
182
+	do_action('lsx_widget_entry_content_bottom');
183 183
 }
184 184
 
185 185
 /**
@@ -189,11 +189,11 @@  discard block
 block discarded – undo
189 189
  */
190 190
 
191 191
 function lsx_comments_before() {
192
-	do_action( 'lsx_comments_before' );
192
+	do_action('lsx_comments_before');
193 193
 }
194 194
 
195 195
 function lsx_comments_after() {
196
-	do_action( 'lsx_comments_after' );
196
+	do_action('lsx_comments_after');
197 197
 }
198 198
 
199 199
 /**
@@ -203,19 +203,19 @@  discard block
 block discarded – undo
203 203
  */
204 204
 
205 205
 function lsx_sidebars_before() {
206
-	do_action( 'lsx_sidebars_before' );
206
+	do_action('lsx_sidebars_before');
207 207
 }
208 208
 
209 209
 function lsx_sidebars_after() {
210
-	do_action( 'lsx_sidebars_after' );
210
+	do_action('lsx_sidebars_after');
211 211
 }
212 212
 
213 213
 function lsx_sidebar_top() {
214
-	do_action( 'lsx_sidebar_top' );
214
+	do_action('lsx_sidebar_top');
215 215
 }
216 216
 
217 217
 function lsx_sidebar_bottom() {
218
-	do_action( 'lsx_sidebar_bottom' );
218
+	do_action('lsx_sidebar_bottom');
219 219
 }
220 220
 
221 221
 /**
@@ -225,17 +225,17 @@  discard block
 block discarded – undo
225 225
  */
226 226
 
227 227
 function lsx_footer_before() {
228
-	do_action( 'lsx_footer_before' );
228
+	do_action('lsx_footer_before');
229 229
 }
230 230
 
231 231
 function lsx_footer_after() {
232
-	do_action( 'lsx_footer_after' );
232
+	do_action('lsx_footer_after');
233 233
 }
234 234
 
235 235
 function lsx_footer_top() {
236
-	do_action( 'lsx_footer_top' );
236
+	do_action('lsx_footer_top');
237 237
 }
238 238
 
239 239
 function lsx_footer_bottom() {
240
-	do_action( 'lsx_footer_bottom' );
240
+	do_action('lsx_footer_bottom');
241 241
 }
Please login to merge, or discard this patch.
includes/nav-bootstrap-navwalker.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@  discard block
 block discarded – undo
7 7
  * @category   bootstrap-navigation-walker
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) {
10
+if ( ! defined('ABSPATH')) {
11 11
 	exit;
12 12
 }
13 13
 
14
-if ( ! function_exists( 'lsx_wpml_nav_language_switcher_fix' ) ) :
14
+if ( ! function_exists('lsx_wpml_nav_language_switcher_fix')) :
15 15
 
16 16
 	/**
17 17
 	 * Add in our custom classes to the menus.
@@ -20,12 +20,12 @@  discard block
 block discarded – undo
20 20
 	 * @subpackage navigation
21 21
 	 * @category   bootstrap-navigation-walker
22 22
 	 */
23
-	function lsx_wpml_nav_language_switcher_fix( $items, $args ) {
24
-		$items = str_replace( 'menu-item-language-current','menu-item-language-current dropdown', $items );
25
-		$items = str_replace( 'submenu-languages','submenu-languages dropdown-menu', $items );
23
+	function lsx_wpml_nav_language_switcher_fix($items, $args) {
24
+		$items = str_replace('menu-item-language-current', 'menu-item-language-current dropdown', $items);
25
+		$items = str_replace('submenu-languages', 'submenu-languages dropdown-menu', $items);
26 26
 		return $items;
27 27
 	}
28 28
 
29 29
 endif;
30 30
 
31
-add_filter( 'wp_nav_menu_items', 'lsx_wpml_nav_language_switcher_fix', 10, 2 );
31
+add_filter('wp_nav_menu_items', 'lsx_wpml_nav_language_switcher_fix', 10, 2);
Please login to merge, or discard this patch.
includes/sanitize.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 	 * @param  mixed    $value      The value to sanitize.
22 22
 	 * @param  mixed    $setting    The setting for which the sanitizing is occurring.
23 23
 	 * @return mixed                The sanitized value.
24
-	*/
24
+	 */
25 25
 	function lsx_sanitize_choices( $value, $setting ) {
26 26
 		if ( is_object( $setting ) ) {
27 27
 			$setting = $setting->id;
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage sanitize
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_sanitize_choices' ) ) :
13
+if ( ! function_exists('lsx_sanitize_choices')) :
14 14
 
15 15
 	/**
16 16
 	 * Sanitize a value from a list of allowed values.
@@ -22,18 +22,18 @@  discard block
 block discarded – undo
22 22
 	 * @param  mixed    $setting    The setting for which the sanitizing is occurring.
23 23
 	 * @return mixed                The sanitized value.
24 24
 	*/
25
-	function lsx_sanitize_choices( $value, $setting ) {
26
-		if ( is_object( $setting ) ) {
25
+	function lsx_sanitize_choices($value, $setting) {
26
+		if (is_object($setting)) {
27 27
 			$setting = $setting->id;
28 28
 		}
29 29
 
30
-		$choices = lsx_customizer_sanitize_get_choices( $setting );
30
+		$choices = lsx_customizer_sanitize_get_choices($setting);
31 31
 
32
-		if ( ! is_wp_error( $choices ) && ! empty( $choices ) ) {
33
-			$allowed_choices = array_keys( $choices );
32
+		if ( ! is_wp_error($choices) && ! empty($choices)) {
33
+			$allowed_choices = array_keys($choices);
34 34
 
35
-			if ( ! in_array( $value, $allowed_choices ) ) {
36
-				$value = lsx_customizer_sanitize_get_default( $setting );
35
+			if ( ! in_array($value, $allowed_choices)) {
36
+				$value = lsx_customizer_sanitize_get_default($setting);
37 37
 			}
38 38
 
39 39
 			return $value;
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
 endif;
46 46
 
47
-if ( ! function_exists( 'lsx_customizer_sanitize_get_choices' ) ) :
47
+if ( ! function_exists('lsx_customizer_sanitize_get_choices')) :
48 48
 
49 49
 	/**
50 50
 	 * Helper function to return the choices for a field.
@@ -55,14 +55,14 @@  discard block
 block discarded – undo
55 55
 	 * @param string
56 56
 	 * @return mixed $field
57 57
 	 */
58
-	function lsx_customizer_sanitize_get_choices( $id ) {
58
+	function lsx_customizer_sanitize_get_choices($id) {
59 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;
64
+		if ( ! isset($field['choices'])) {
65
+			return $can_validate ? new WP_Error('notexists', esc_html__('Choice doesn\'t exist', 'lsx')) : false;
66 66
 		}
67 67
 
68 68
 		return $field['choices'];
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
 endif;
72 72
 
73
-if ( ! function_exists( 'lsx_customizer_sanitize_get_default' ) ) :
73
+if ( ! function_exists('lsx_customizer_sanitize_get_default')) :
74 74
 
75 75
 	/**
76 76
 	 * Helper function to return defaults.
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
 	 * @param string
82 82
 	 * @return mixed $default
83 83
 	 */
84
-	function lsx_customizer_sanitize_get_default( $id ) {
84
+	function lsx_customizer_sanitize_get_default($id) {
85 85
 		global $lsx_customizer;
86
-		$setting = $lsx_customizer->get_setting( $id );
86
+		$setting = $lsx_customizer->get_setting($id);
87 87
 
88
-		if ( isset( $setting['default'] ) ) {
88
+		if (isset($setting['default'])) {
89 89
 			return $setting['default'];
90 90
 		}
91 91
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
 endif;
96 96
 
97
-if ( ! function_exists( 'lsx_sanitize_checkbox' ) ) :
97
+if ( ! function_exists('lsx_sanitize_checkbox')) :
98 98
 
99 99
 	/**
100 100
 	 * Sanitizes an single or multiple checkbox input.
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
 	 * @param array $input
106 106
 	 * @return array $output
107 107
 	 */
108
-	function lsx_sanitize_checkbox( $input ) {
109
-		$can_validate = method_exists( 'WP_Customize_Setting', 'validate' );
108
+	function lsx_sanitize_checkbox($input) {
109
+		$can_validate = method_exists('WP_Customize_Setting', 'validate');
110 110
 
111
-		if ( ! is_bool( $input ) ) {
112
-			return $can_validate ? new WP_Error( 'notboolean', esc_html__( 'Not a boolean', 'lsx' ) ) : false;
111
+		if ( ! is_bool($input)) {
112
+			return $can_validate ? new WP_Error('notboolean', esc_html__('Not a boolean', 'lsx')) : false;
113 113
 		}
114 114
 
115 115
 		return $input;
Please login to merge, or discard this patch.
includes/nav-navwalker.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
  * @category   bootstrap-walker
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) {
10
+if ( ! defined('ABSPATH')) {
11 11
 	exit;
12 12
 }
13 13
 
14
-add_filter( 'nav_menu_item_id', '__return_null' );
14
+add_filter('nav_menu_item_id', '__return_null');
15 15
 
16
-if ( ! function_exists( 'lsx_nav_menu_css_class' ) ) :
16
+if ( ! function_exists('lsx_nav_menu_css_class')) :
17 17
 
18 18
 	/**
19 19
 	 * Remove the id="" on nav menu items.
@@ -23,22 +23,22 @@  discard block
 block discarded – undo
23 23
 	 * @subpackage navigation
24 24
 	 * @category   bootstrap-walker
25 25
 	 */
26
-	function lsx_nav_menu_css_class( $classes, $item ) {
27
-		$slug    = sanitize_title( $item->title );
28
-		$classes = preg_replace( '/(current(-menu-|[-_]page[-_])(item|parent|ancestor))/', 'active', $classes );
29
-		$classes = preg_replace( '/^((menu|page)[-_\w+]+)+/', '', $classes );
26
+	function lsx_nav_menu_css_class($classes, $item) {
27
+		$slug    = sanitize_title($item->title);
28
+		$classes = preg_replace('/(current(-menu-|[-_]page[-_])(item|parent|ancestor))/', 'active', $classes);
29
+		$classes = preg_replace('/^((menu|page)[-_\w+]+)+/', '', $classes);
30 30
 
31 31
 		$classes[] = 'menu-' . $slug;
32
-		$classes   = array_unique( $classes );
32
+		$classes   = array_unique($classes);
33 33
 
34
-		return array_filter( $classes, 'lsx_is_element_empty' );
34
+		return array_filter($classes, 'lsx_is_element_empty');
35 35
 	}
36 36
 
37 37
 endif;
38 38
 
39
-add_filter( 'nav_menu_css_class', 'lsx_nav_menu_css_class', 10, 2 );
39
+add_filter('nav_menu_css_class', 'lsx_nav_menu_css_class', 10, 2);
40 40
 
41
-if ( ! function_exists( 'lsx_nav_menu_args' ) ) :
41
+if ( ! function_exists('lsx_nav_menu_args')) :
42 42
 
43 43
 	/**
44 44
 	 * Clean up wp_nav_menu_args.
@@ -50,24 +50,24 @@  discard block
 block discarded – undo
50 50
 	 * @subpackage navigation
51 51
 	 * @category   bootstrap-walker
52 52
 	 */
53
-	function lsx_nav_menu_args( $args = '' ) {
53
+	function lsx_nav_menu_args($args = '') {
54 54
 		$roots_nav_menu_args['container'] = false;
55 55
 
56
-		if ( ! $args['items_wrap'] ) {
56
+		if ( ! $args['items_wrap']) {
57 57
 			$roots_nav_menu_args['items_wrap'] = '<ul class="%2$s">%3$s</ul>';
58 58
 		}
59 59
 
60
-		if ( current_theme_supports( 'bootstrap-top-navbar' ) && ! $args['depth'] ) {
60
+		if (current_theme_supports('bootstrap-top-navbar') && ! $args['depth']) {
61 61
 			$roots_nav_menu_args['depth'] = 2;
62 62
 		}
63 63
 
64
-		if ( ! $args['walker'] ) {
64
+		if ( ! $args['walker']) {
65 65
 			$roots_nav_menu_args['walker'] = new LSX_Nav_Walker();
66 66
 		}
67 67
 
68
-		return array_merge( $args, $roots_nav_menu_args );
68
+		return array_merge($args, $roots_nav_menu_args);
69 69
 	}
70 70
 
71 71
 endif;
72 72
 
73
-add_filter( 'wp_nav_menu_args', 'lsx_nav_menu_args' );
73
+add_filter('wp_nav_menu_args', 'lsx_nav_menu_args');
Please login to merge, or discard this patch.
includes/walker-comment.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage comment-walker
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_get_avatar' ) ) :
13
+if ( ! function_exists('lsx_get_avatar')) :
14 14
 
15 15
 	/**
16 16
 	 * Comment Form Field Filter.
@@ -18,25 +18,25 @@  discard block
 block discarded – undo
18 18
 	 * @package    lsx
19 19
 	 * @subpackage comment-walker
20 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 );
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 24
 		return $avatar;
25 25
 	}
26 26
 
27 27
 endif;
28 28
 
29
-add_filter( 'get_avatar', 'lsx_get_avatar' );
29
+add_filter('get_avatar', 'lsx_get_avatar');
30 30
 
31
-add_action( 'admin_bar_menu', function() {
32
-	remove_filter( 'get_avatar', 'lsx_get_avatar' );
33
-}, 0 );
31
+add_action('admin_bar_menu', function() {
32
+	remove_filter('get_avatar', 'lsx_get_avatar');
33
+}, 0);
34 34
 
35
-add_action( 'wp_after_admin_bar_render', function() {
36
-	add_filter( 'get_avatar','lsx_get_avatar' );
35
+add_action('wp_after_admin_bar_render', function() {
36
+	add_filter('get_avatar', 'lsx_get_avatar');
37 37
 } );
38 38
 
39
-if ( ! function_exists( 'lsx_comment_form_fields_filter' ) ) :
39
+if ( ! function_exists('lsx_comment_form_fields_filter')) :
40 40
 
41 41
 	/**
42 42
 	 * Comment Form Field Filter.
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
 	 * @package    lsx
45 45
 	 * @subpackage comment-walker
46 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 );
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 51
 			} else {
52
-				$field = str_replace( '<input', '<input class="form-control" ', $field );
52
+				$field = str_replace('<input', '<input class="form-control" ', $field);
53 53
 			}
54 54
 		}
55 55
 
@@ -58,4 +58,4 @@  discard block
 block discarded – undo
58 58
 
59 59
 endif;
60 60
 
61
-add_filter( 'comment_form_default_fields', 'lsx_comment_form_fields_filter' );
61
+add_filter('comment_form_default_fields', 'lsx_comment_form_fields_filter');
Please login to merge, or discard this patch.
includes/widgets.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage widgets
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_widget_area_init' ) ) :
13
+if ( ! function_exists('lsx_widget_area_init')) :
14 14
 
15 15
 	/**
16 16
 	 * Register widgetized area and update sidebar with default widgets.
@@ -19,48 +19,48 @@  discard block
 block discarded – undo
19 19
 	 * @subpackage widgets
20 20
 	 */
21 21
 	function lsx_widget_area_init() {
22
-		register_sidebar( array(
23
-			'name'          => esc_html__( 'Home', 'lsx' ),
22
+		register_sidebar(array(
23
+			'name'          => esc_html__('Home', 'lsx'),
24 24
 			'id'            => 'sidebar-home',
25 25
 			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
26 26
 			'after_widget'  => '</aside>',
27 27
 			'before_title'  => '<h3 class="widget-title">',
28 28
 			'after_title'   => '</h3>',
29
-		) );
29
+		));
30 30
 
31
-		register_sidebar( array(
32
-			'name'          => esc_html__( 'Sidebar', 'lsx' ),
31
+		register_sidebar(array(
32
+			'name'          => esc_html__('Sidebar', 'lsx'),
33 33
 			'id'            => 'sidebar-1',
34 34
 			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
35 35
 			'after_widget'  => '</aside>',
36 36
 			'before_title'  => '<h3 class="widget-title">',
37 37
 			'after_title'   => '</h3>',
38
-		) );
38
+		));
39 39
 
40
-		register_sidebar( array(
41
-			'name'          => esc_html__( 'Footer', 'lsx' ),
40
+		register_sidebar(array(
41
+			'name'          => esc_html__('Footer', 'lsx'),
42 42
 			'id'            => 'sidebar-footer',
43 43
 			'before_widget' => '<div class="styler"><aside id="%1$s" class="widget %2$s">',
44 44
 			'after_widget'  => '</aside></div>',
45 45
 			'before_title'  => '<h3 class="widget-title">',
46 46
 			'after_title'   => '</h3>',
47
-		) );
47
+		));
48 48
 
49
-		register_sidebar( array(
50
-			'name'          => esc_html__( 'Footer Call to Action', 'lsx' ),
49
+		register_sidebar(array(
50
+			'name'          => esc_html__('Footer Call to Action', 'lsx'),
51 51
 			'id'            => 'sidebar-footer-cta',
52 52
 			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
53 53
 			'after_widget'  => '</aside>',
54 54
 			'before_title'  => '<h3 class="widget-title">',
55 55
 			'after_title'   => '</h3>',
56
-		) );
56
+		));
57 57
 	}
58 58
 
59 59
 endif;
60 60
 
61
-add_action( 'widgets_init', 'lsx_widget_area_init' );
61
+add_action('widgets_init', 'lsx_widget_area_init');
62 62
 
63
-if ( ! function_exists( 'lsx_sidebar_footer_params' ) ) :
63
+if ( ! function_exists('lsx_sidebar_footer_params')) :
64 64
 
65 65
 	/**
66 66
 	 * Register widgetized area and update sidebar with default widgets.
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
 	 * @package    lsx
69 69
 	 * @subpackage widgets
70 70
 	 */
71
-	function lsx_sidebar_footer_params( $params ) {
71
+	function lsx_sidebar_footer_params($params) {
72 72
 		$sidebar_id = $params[0]['id'];
73 73
 
74
-		if ( 'sidebar-footer' === $sidebar_id ) {
74
+		if ('sidebar-footer' === $sidebar_id) {
75 75
 			$total_widgets              = wp_get_sidebars_widgets();
76
-			$sidebar_widgets            = count( $total_widgets[ $sidebar_id ] );
77
-			$params[0]['before_widget'] = str_replace( 'class="styler', 'class="col-md-' . floor( 12 / $sidebar_widgets ), $params[0]['before_widget'] );
76
+			$sidebar_widgets            = count($total_widgets[$sidebar_id]);
77
+			$params[0]['before_widget'] = str_replace('class="styler', 'class="col-md-' . floor(12 / $sidebar_widgets), $params[0]['before_widget']);
78 78
 		}
79 79
 
80 80
 		return $params;
@@ -82,4 +82,4 @@  discard block
 block discarded – undo
82 82
 
83 83
 endif;
84 84
 
85
-add_filter( 'dynamic_sidebar_params', 'lsx_sidebar_footer_params' );
85
+add_filter('dynamic_sidebar_params', 'lsx_sidebar_footer_params');
Please login to merge, or discard this patch.
includes/classes/class-lsx-walker-comment.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@  discard block
 block discarded – undo
6 6
  * @subpackage comment
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! class_exists( 'Walker_Comment' ) ) {
13
+if ( ! class_exists('Walker_Comment')) {
14 14
 	return;
15 15
 }
16 16
 
17
-if ( ! class_exists( 'LSX_Walker_Comment' ) ) :
17
+if ( ! class_exists('LSX_Walker_Comment')) :
18 18
 
19 19
 	/**
20 20
 	 * Use Bootstrap's media object for listing comments.
@@ -26,35 +26,35 @@  discard block
 block discarded – undo
26 26
 	 */
27 27
 	class LSX_Walker_Comment extends Walker_Comment {
28 28
 
29
-		function start_lvl( &$output, $depth = 0, $args = array() ) {
29
+		function start_lvl(&$output, $depth = 0, $args = array()) {
30 30
 			$GLOBALS['comment_depth'] = $depth + 1; ?>
31
-			<ul <?php comment_class( 'media media-reply unstyled list-unstyled comment-' . get_comment_ID() ); ?>>
31
+			<ul <?php comment_class('media media-reply unstyled list-unstyled comment-' . get_comment_ID()); ?>>
32 32
 			<?php
33 33
 		}
34 34
 
35
-		function end_lvl( &$output, $depth = 0, $args = array() ) {
35
+		function end_lvl(&$output, $depth = 0, $args = array()) {
36 36
 			$GLOBALS['comment_depth'] = $depth + 1;
37 37
 			echo '</ul>';
38 38
 		}
39 39
 
40
-		function start_el( &$output, $comment, $depth = 0, $args = array(), $id = 0 ) {
40
+		function start_el(&$output, $comment, $depth = 0, $args = array(), $id = 0) {
41 41
 			$depth++;
42 42
 			$GLOBALS['comment_depth'] = $depth;
43 43
 			$GLOBALS['comment']       = $comment;
44 44
 
45
-			if ( ! empty( $args['callback'] ) ) {
46
-				call_user_func( $args['callback'], $comment, $args, $depth );
45
+			if ( ! empty($args['callback'])) {
46
+				call_user_func($args['callback'], $comment, $args, $depth);
47 47
 				return;
48 48
 			}?>
49 49
 
50
-			<li id="comment-<?php comment_ID(); ?>" <?php comment_class( 'media comment-' . get_comment_ID() ); ?>>
51
-			<?php get_template_part( 'comment' ); ?>
50
+			<li id="comment-<?php comment_ID(); ?>" <?php comment_class('media comment-' . get_comment_ID()); ?>>
51
+			<?php get_template_part('comment'); ?>
52 52
 			<?php
53 53
 		}
54 54
 
55
-		function end_el( &$output, $comment, $depth = 0, $args = array() ) {
56
-			if ( ! empty( $args['end-callback'] ) ) {
57
-				call_user_func( $args['end-callback'], $comment, $args, $depth );
55
+		function end_el(&$output, $comment, $depth = 0, $args = array()) {
56
+			if ( ! empty($args['end-callback'])) {
57
+				call_user_func($args['end-callback'], $comment, $args, $depth);
58 58
 				return;
59 59
 			}
60 60
 
Please login to merge, or discard this patch.