Passed
Push — purged ( 44fe4e...9ee480 )
by Jacques
08:29 queued 03:51
created
includes/welcome.php 1 patch
Indentation   +110 added lines, -110 removed lines patch added patch discarded remove patch
@@ -7,21 +7,21 @@  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_activation_admin_notice_dismiss' ) ) :
14 14
 
15
-	/**
16
-	 * Dismiss the admin notice (successful activation).
17
-	 *
18
-	 * @package    lsx
19
-	 * @subpackage welcome-page
20
-	 */
21
-	function lsx_activation_admin_notice_dismiss() {
22
-		update_option( 'lsx-notice-dismissed', '1' );
23
-		wp_die();
24
-	}
15
+     /**
16
+      * Dismiss the admin notice (successful activation).
17
+      *
18
+      * @package    lsx
19
+      * @subpackage welcome-page
20
+      */
21
+     function lsx_activation_admin_notice_dismiss() {
22
+          update_option( 'lsx-notice-dismissed', '1' );
23
+          wp_die();
24
+     }
25 25
 
26 26
 endif;
27 27
 
@@ -29,17 +29,17 @@  discard block
 block discarded – undo
29 29
 
30 30
 if ( ! function_exists( 'lsx_activation_admin_notice' ) ) :
31 31
 
32
-	/**
33
-	 * Adds an admin notice upon successful activation.
34
-	 *
35
-	 * @package    lsx
36
-	 * @subpackage welcome-page
37
-	 */
38
-	function lsx_activation_admin_notice() {
39
-		if ( empty( get_option( 'lsx-notice-dismissed' ) ) ) {
40
-			add_action( 'admin_notices', 'lsx_welcome_admin_notice', 99 );
41
-		}
42
-	}
32
+     /**
33
+      * Adds an admin notice upon successful activation.
34
+      *
35
+      * @package    lsx
36
+      * @subpackage welcome-page
37
+      */
38
+     function lsx_activation_admin_notice() {
39
+          if ( empty( get_option( 'lsx-notice-dismissed' ) ) ) {
40
+               add_action( 'admin_notices', 'lsx_welcome_admin_notice', 99 );
41
+          }
42
+     }
43 43
 
44 44
 endif;
45 45
 
@@ -47,49 +47,49 @@  discard block
 block discarded – undo
47 47
 
48 48
 if ( ! function_exists( 'lsx_welcome_admin_notice' ) ) :
49 49
 
50
-	/**
51
-	 * Display an admin notice linking to the welcome screen.
52
-	 *
53
-	 * @package    lsx
54
-	 * @subpackage welcome-page
55
-	 */
56
-	function lsx_welcome_admin_notice() {
57
-		?>
50
+     /**
51
+      * Display an admin notice linking to the welcome screen.
52
+      *
53
+      * @package    lsx
54
+      * @subpackage welcome-page
55
+      */
56
+     function lsx_welcome_admin_notice() {
57
+          ?>
58 58
 			<div class="lsx-theme-notice notice notice-success is-dismissible">
59 59
 				<p>
60 60
 					<?php
61
-						printf(
62
-							/* Translators: 1: HTML open tag link, 2: HTML close tag link */
63
-							esc_html_e( 'Thanks for choosing LSX! You can read hints and tips on how get the most out of your new theme on the %1$swelcome screen%2$s.', 'lsx' ),
64
-							'<a href="' . esc_url( admin_url( 'themes.php?page=lsx-welcome' ) ) . '">',
65
-							'</a>'
66
-						);
67
-					?>
61
+                              printf(
62
+                                   /* Translators: 1: HTML open tag link, 2: HTML close tag link */
63
+                                   esc_html_e( 'Thanks for choosing LSX! You can read hints and tips on how get the most out of your new theme on the %1$swelcome screen%2$s.', 'lsx' ),
64
+                                   '<a href="' . esc_url( admin_url( 'themes.php?page=lsx-welcome' ) ) . '">',
65
+                                   '</a>'
66
+                              );
67
+                         ?>
68 68
 				</p>
69 69
 				<p><a href="<?php echo esc_url( admin_url( 'themes.php?page=lsx-welcome' ) ); ?>" class="button" style="text-decoration: none;"><?php esc_html_e( 'Get started with LSX', 'lsx' ); ?></a></p>
70 70
 			</div>
71 71
 		<?php
72
-	}
72
+     }
73 73
 
74 74
 endif;
75 75
 
76 76
 if ( ! function_exists( 'lsx_welcome_style' ) ) :
77 77
 
78
-	/**
79
-	 * Load welcome screen css.
80
-	 *
81
-	 * @package    lsx
82
-	 * @subpackage welcome-page
83
-	 *
84
-	 * @param string $hook_suffix the current page hook suffix.
85
-	 */
86
-	function lsx_welcome_style( $hook_suffix ) {
87
-		if ( 'appearance_page_lsx-welcome' === $hook_suffix ) {
88
-			wp_enqueue_style( 'lsx-welcome-screen-mailchimp', '//cdn-images.mailchimp.com/embedcode/classic-10_7.css', array(), LSX_VERSION );
89
-			wp_enqueue_style( 'lsx-welcome-screen', get_template_directory_uri() . '/assets/css/admin/welcome.css', array( 'lsx-welcome-screen-mailchimp' ), LSX_VERSION );
90
-			wp_style_add_data( 'lsx-welcome-screen', 'rtl', 'replace' );
91
-		}
92
-	}
78
+     /**
79
+      * Load welcome screen css.
80
+      *
81
+      * @package    lsx
82
+      * @subpackage welcome-page
83
+      *
84
+      * @param string $hook_suffix the current page hook suffix.
85
+      */
86
+     function lsx_welcome_style( $hook_suffix ) {
87
+          if ( 'appearance_page_lsx-welcome' === $hook_suffix ) {
88
+               wp_enqueue_style( 'lsx-welcome-screen-mailchimp', '//cdn-images.mailchimp.com/embedcode/classic-10_7.css', array(), LSX_VERSION );
89
+               wp_enqueue_style( 'lsx-welcome-screen', get_template_directory_uri() . '/assets/css/admin/welcome.css', array( 'lsx-welcome-screen-mailchimp' ), LSX_VERSION );
90
+               wp_style_add_data( 'lsx-welcome-screen', 'rtl', 'replace' );
91
+          }
92
+     }
93 93
 
94 94
 endif;
95 95
 
@@ -97,15 +97,15 @@  discard block
 block discarded – undo
97 97
 
98 98
 if ( ! function_exists( 'lsx_welcome_register_menu' ) ) :
99 99
 
100
-	/**
101
-	 * Creates the dashboard page.
102
-	 *
103
-	 * @package    lsx
104
-	 * @subpackage welcome-page
105
-	 */
106
-	function lsx_welcome_register_menu() {
107
-		add_theme_page( 'LSX', 'LSX', 'activate_plugins', 'lsx-welcome', 'lsx_welcome_screen' );
108
-	}
100
+     /**
101
+      * Creates the dashboard page.
102
+      *
103
+      * @package    lsx
104
+      * @subpackage welcome-page
105
+      */
106
+     function lsx_welcome_register_menu() {
107
+          add_theme_page( 'LSX', 'LSX', 'activate_plugins', 'lsx-welcome', 'lsx_welcome_screen' );
108
+     }
109 109
 
110 110
 endif;
111 111
 
@@ -113,45 +113,45 @@  discard block
 block discarded – undo
113 113
 
114 114
 if ( ! function_exists( 'lsx_welcome_screen' ) ) :
115 115
 
116
-	/**
117
-	 * The welcome screen.
118
-	 *
119
-	 * @package    lsx
120
-	 * @subpackage welcome-page
121
-	 */
122
-	function lsx_welcome_screen() {
123
-		require_once ABSPATH . 'wp-load.php';
124
-		require_once ABSPATH . 'wp-admin/admin.php';
125
-		require_once ABSPATH . 'wp-admin/admin-header.php';
126
-		?>
116
+     /**
117
+      * The welcome screen.
118
+      *
119
+      * @package    lsx
120
+      * @subpackage welcome-page
121
+      */
122
+     function lsx_welcome_screen() {
123
+          require_once ABSPATH . 'wp-load.php';
124
+          require_once ABSPATH . 'wp-admin/admin.php';
125
+          require_once ABSPATH . 'wp-admin/admin-header.php';
126
+          ?>
127 127
 		<div class="wrap about-wrap">
128 128
 			<?php
129
-			/**
130
-			 * Functions hooked into lsx_welcome action
131
-			 *
132
-			 * @hooked lsx_welcome_header  - 10
133
-			 * @hooked lsx_welcome_enhance - 20
134
-			 * @hooked lsx_welcome_footer  - 30
135
-			 */
136
-			do_action( 'lsx_welcome' );
137
-			?>
129
+               /**
130
+                * Functions hooked into lsx_welcome action
131
+                *
132
+                * @hooked lsx_welcome_header  - 10
133
+                * @hooked lsx_welcome_enhance - 20
134
+                * @hooked lsx_welcome_footer  - 30
135
+                */
136
+               do_action( 'lsx_welcome' );
137
+               ?>
138 138
 		</div>
139 139
 		<?php
140
-	}
140
+     }
141 141
 
142 142
 endif;
143 143
 
144 144
 if ( ! function_exists( 'lsx_welcome_header' ) ) :
145 145
 
146
-	/**
147
-	 * Welcome screen intro.
148
-	 *
149
-	 * @package    lsx
150
-	 * @subpackage welcome-page
151
-	 */
152
-	function lsx_welcome_header() {
153
-		require_once get_template_directory() . '/includes/admin/welcome-screen/component-header.php';
154
-	}
146
+     /**
147
+      * Welcome screen intro.
148
+      *
149
+      * @package    lsx
150
+      * @subpackage welcome-page
151
+      */
152
+     function lsx_welcome_header() {
153
+          require_once get_template_directory() . '/includes/admin/welcome-screen/component-header.php';
154
+     }
155 155
 
156 156
 endif;
157 157
 
@@ -159,15 +159,15 @@  discard block
 block discarded – undo
159 159
 
160 160
 if ( ! function_exists( 'lsx_welcome_enhance' ) ) :
161 161
 
162
-	/**
163
-	 * Welcome screen enhance section.
164
-	 *
165
-	 * @package    lsx
166
-	 * @subpackage welcome-page
167
-	 */
168
-	function lsx_welcome_enhance() {
169
-		require_once get_template_directory() . '/includes/admin/welcome-screen/component-enhance.php';
170
-	}
162
+     /**
163
+      * Welcome screen enhance section.
164
+      *
165
+      * @package    lsx
166
+      * @subpackage welcome-page
167
+      */
168
+     function lsx_welcome_enhance() {
169
+          require_once get_template_directory() . '/includes/admin/welcome-screen/component-enhance.php';
170
+     }
171 171
 
172 172
 endif;
173 173
 
@@ -175,15 +175,15 @@  discard block
 block discarded – undo
175 175
 
176 176
 if ( ! function_exists( 'lsx_welcome_footer' ) ) :
177 177
 
178
-	/**
179
-	 * Welcome screen contribute section.
180
-	 *
181
-	 * @package    lsx
182
-	 * @subpackage welcome-page
183
-	 */
184
-	function lsx_welcome_footer() {
185
-		require_once get_template_directory() . '/includes/admin/welcome-screen/component-footer.php';
186
-	}
178
+     /**
179
+      * Welcome screen contribute section.
180
+      *
181
+      * @package    lsx
182
+      * @subpackage welcome-page
183
+      */
184
+     function lsx_welcome_footer() {
185
+          require_once get_template_directory() . '/includes/admin/welcome-screen/component-footer.php';
186
+     }
187 187
 
188 188
 endif;
189 189
 
Please login to merge, or discard this patch.
includes/admin/welcome-screen/component-footer.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -46,13 +46,13 @@
 block discarded – undo
46 46
 
47 47
 			<p>
48 48
 				<?php
49
-					printf(
50
-						/* Translators: 1: HTML open tag link, 2: HTML close tag link */
51
-						esc_html__( 'Why not %1$sleave a review%2$s on WordPress.org? We\'re looking foward to all our users\' feedback!', 'lsx' ),
52
-						'<a href="https://wordpress.org/themes/lsx" target="_blank rel="noopener noreferrer">',
53
-						'</a>'
54
-					);
55
-					?>
49
+                         printf(
50
+                              /* Translators: 1: HTML open tag link, 2: HTML close tag link */
51
+                              esc_html__( 'Why not %1$sleave a review%2$s on WordPress.org? We\'re looking foward to all our users\' feedback!', 'lsx' ),
52
+                              '<a href="https://wordpress.org/themes/lsx" target="_blank rel="noopener noreferrer">',
53
+                              '</a>'
54
+                         );
55
+                         ?>
56 56
 			</p>
57 57
 
58 58
 			<div class="more-button">
Please login to merge, or discard this patch.
includes/deprecated.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
  */
8 8
 
9 9
 if ( ! defined( 'ABSPATH' ) ) {
10
-	exit;
10
+     exit;
11 11
 }
12 12
 
13 13
 
Please login to merge, or discard this patch.
includes/nav-navwalker.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -8,31 +8,31 @@  discard block
 block discarded – undo
8 8
  */
9 9
 
10 10
 if ( ! defined( 'ABSPATH' ) ) {
11
-	exit;
11
+     exit;
12 12
 }
13 13
 
14 14
 add_filter( 'nav_menu_item_id', '__return_null' );
15 15
 
16 16
 if ( ! function_exists( 'lsx_nav_menu_css_class' ) ) :
17 17
 
18
-	/**
19
-	 * Remove the id="" on nav menu items.
20
-	 * Return 'menu-slug' for nav menu classes.
21
-	 *
22
-	 * @package    lsx
23
-	 * @subpackage navigation
24
-	 * @category   bootstrap-walker
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 );
30
-
31
-		$classes[] = 'menu-' . $slug;
32
-		$classes   = array_unique( $classes );
33
-
34
-		return array_filter( $classes, 'lsx_is_element_empty' );
35
-	}
18
+     /**
19
+      * Remove the id="" on nav menu items.
20
+      * Return 'menu-slug' for nav menu classes.
21
+      *
22
+      * @package    lsx
23
+      * @subpackage navigation
24
+      * @category   bootstrap-walker
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 );
30
+
31
+          $classes[] = 'menu-' . $slug;
32
+          $classes   = array_unique( $classes );
33
+
34
+          return array_filter( $classes, 'lsx_is_element_empty' );
35
+     }
36 36
 
37 37
 endif;
38 38
 
@@ -40,33 +40,33 @@  discard block
 block discarded – undo
40 40
 
41 41
 if ( ! function_exists( 'lsx_nav_menu_args' ) ) :
42 42
 
43
-	/**
44
-	 * Clean up wp_nav_menu_args.
45
-	 *
46
-	 * Remove the container.
47
-	 * Use LSX_Nav_Walker() by default.
48
-	 *
49
-	 * @package    lsx
50
-	 * @subpackage navigation
51
-	 * @category   bootstrap-walker
52
-	 */
53
-	function lsx_nav_menu_args( $args = '' ) {
54
-		$roots_nav_menu_args['container'] = false;
55
-
56
-		if ( ! $args['items_wrap'] ) {
57
-			$roots_nav_menu_args['items_wrap'] = '<ul class="%2$s">%3$s</ul>';
58
-		}
59
-
60
-		if ( current_theme_supports( 'bootstrap-top-navbar' ) && ! $args['depth'] ) {
61
-			$roots_nav_menu_args['depth'] = 2;
62
-		}
63
-
64
-		if ( ! $args['walker'] ) {
65
-			$roots_nav_menu_args['walker'] = new LSX_Nav_Walker();
66
-		}
67
-
68
-		return array_merge( $args, $roots_nav_menu_args );
69
-	}
43
+     /**
44
+      * Clean up wp_nav_menu_args.
45
+      *
46
+      * Remove the container.
47
+      * Use LSX_Nav_Walker() by default.
48
+      *
49
+      * @package    lsx
50
+      * @subpackage navigation
51
+      * @category   bootstrap-walker
52
+      */
53
+     function lsx_nav_menu_args( $args = '' ) {
54
+          $roots_nav_menu_args['container'] = false;
55
+
56
+          if ( ! $args['items_wrap'] ) {
57
+               $roots_nav_menu_args['items_wrap'] = '<ul class="%2$s">%3$s</ul>';
58
+          }
59
+
60
+          if ( current_theme_supports( 'bootstrap-top-navbar' ) && ! $args['depth'] ) {
61
+               $roots_nav_menu_args['depth'] = 2;
62
+          }
63
+
64
+          if ( ! $args['walker'] ) {
65
+               $roots_nav_menu_args['walker'] = new LSX_Nav_Walker();
66
+          }
67
+
68
+          return array_merge( $args, $roots_nav_menu_args );
69
+     }
70 70
 
71 71
 endif;
72 72
 
Please login to merge, or discard this patch.
includes/gutenberg.php 1 patch
Indentation   +23 added lines, -23 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
  * Enqueue Admin styles on admin area
15 15
  */
16 16
 function load_gutenberg_admin_style() {
17
-	wp_enqueue_style( 'admin_css', get_template_directory_uri() . '/assets/css/admin/gutenberg-admin.css', false, '1.0.0' );
17
+     wp_enqueue_style( 'admin_css', get_template_directory_uri() . '/assets/css/admin/gutenberg-admin.css', false, '1.0.0' );
18 18
 }
19 19
 add_action( 'admin_enqueue_scripts', 'load_gutenberg_admin_style' );
20 20
 
@@ -25,32 +25,32 @@  discard block
 block discarded – undo
25 25
  * Add custom class for Gutenberg Compatible template
26 26
  */
27 27
 function add_gutenberg_compatible_body_class( $classes ) {
28
-	// if ( ! is_home() && ! is_front_page() ).
29
-	if ( is_page() || is_page_template() || is_single() )
30
-		$classes[] = 'gutenberg-compatible-template';
28
+     // if ( ! is_home() && ! is_front_page() ).
29
+     if ( is_page() || is_page_template() || is_single() )
30
+          $classes[] = 'gutenberg-compatible-template';
31 31
 
32
-	// Add a class if the page is using the Content and Media block.
33
-	$post = get_post();
34
-	if ( function_exists( 'has_blocks' ) && isset( $post->post_content ) && has_blocks( $post->post_content ) && ( ! is_search() ) && ( ! is_archive() ) ) {
35
-		$blocks = parse_blocks( $post->post_content );
32
+     // Add a class if the page is using the Content and Media block.
33
+     $post = get_post();
34
+     if ( function_exists( 'has_blocks' ) && isset( $post->post_content ) && has_blocks( $post->post_content ) && ( ! is_search() ) && ( ! is_archive() ) ) {
35
+          $blocks = parse_blocks( $post->post_content );
36 36
 
37
-		if ( 'core/media-text' === $blocks[0]['blockName'] ) {
38
-			$classes[] = 'has-block-media-text';
39
-		}
40
-		if ( 'core/cover' === $blocks[0]['blockName'] ) {
41
-			$classes[] = 'has-block-cover';
42
-		}
43
-	}
44
-	return $classes;
37
+          if ( 'core/media-text' === $blocks[0]['blockName'] ) {
38
+               $classes[] = 'has-block-media-text';
39
+          }
40
+          if ( 'core/cover' === $blocks[0]['blockName'] ) {
41
+               $classes[] = 'has-block-cover';
42
+          }
43
+     }
44
+     return $classes;
45 45
 }
46 46
 
47 47
 add_filter( 'body_class', __NAMESPACE__ . '\add_gutenberg_compatible_body_class' );
48 48
 
49 49
 // Add custom class for templates that are using the Gutenberg editor.
50 50
 add_action('body_class', function( $classes ) {
51
-	if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) && ( ( is_singular( 'post' ) || is_page() ) ) )
52
-		$classes[] = 'using-gutenberg';
53
-	return $classes;
51
+     if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) && ( ( is_singular( 'post' ) || is_page() ) ) )
52
+          $classes[] = 'using-gutenberg';
53
+     return $classes;
54 54
 });
55 55
 
56 56
 /**
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
  * @return void
60 60
  */
61 61
 function remove_lsx_page_banner_when_using_blocks() {
62
-	if ( function_exists( 'has_blocks' ) && ( ! class_exists( 'LSX_Banners' ) ) ) {
63
-		add_filter( 'lsx_page_banner_disable', '__return_true' );
64
-	}
62
+     if ( function_exists( 'has_blocks' ) && ( ! class_exists( 'LSX_Banners' ) ) ) {
63
+          add_filter( 'lsx_page_banner_disable', '__return_true' );
64
+     }
65 65
 }
66 66
 add_filter( 'init', 'remove_lsx_page_banner_when_using_blocks' );
Please login to merge, or discard this patch.
includes/nav-bootstrap-navwalker.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,23 +8,23 @@
 block discarded – undo
8 8
  */
9 9
 
10 10
 if ( ! defined( 'ABSPATH' ) ) {
11
-	exit;
11
+     exit;
12 12
 }
13 13
 
14 14
 if ( ! function_exists( 'lsx_wpml_nav_language_switcher_fix' ) ) :
15 15
 
16
-	/**
17
-	 * Add in our custom classes to the menus.
18
-	 *
19
-	 * @package    lsx
20
-	 * @subpackage navigation
21
-	 * @category   bootstrap-navigation-walker
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 );
26
-		return $items;
27
-	}
16
+     /**
17
+      * Add in our custom classes to the menus.
18
+      *
19
+      * @package    lsx
20
+      * @subpackage navigation
21
+      * @category   bootstrap-navigation-walker
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 );
26
+          return $items;
27
+     }
28 28
 
29 29
 endif;
30 30
 
Please login to merge, or discard this patch.
includes/404-widget.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -7,39 +7,39 @@
 block discarded – undo
7 7
  */
8 8
 
9 9
 if ( ! function_exists( 'lsx_widget_area_404_init' ) ) :
10
-	/**
11
-	 * Add Widget.
12
-	 *
13
-	 * @package    lsx
14
-	 * @subpackage 404-widget
15
-	 */
16
-	function lsx_widget_area_404_init() {
17
-		register_sidebar(
18
-			array(
19
-				'name'          => esc_html__( '404 page', 'lsx' ),
20
-				'id'            => 'sidebar-404',
21
-				'before_widget' => '<aside id="%1$s" class="widget %2$s">',
22
-				'after_widget'  => '</aside>',
23
-				'before_title'  => '<h3 class="widget-title">',
24
-				'after_title'   => '</h3>',
25
-			)
26
-		);
27
-	}
10
+     /**
11
+      * Add Widget.
12
+      *
13
+      * @package    lsx
14
+      * @subpackage 404-widget
15
+      */
16
+     function lsx_widget_area_404_init() {
17
+          register_sidebar(
18
+               array(
19
+                    'name'          => esc_html__( '404 page', 'lsx' ),
20
+                    'id'            => 'sidebar-404',
21
+                    'before_widget' => '<aside id="%1$s" class="widget %2$s">',
22
+                    'after_widget'  => '</aside>',
23
+                    'before_title'  => '<h3 class="widget-title">',
24
+                    'after_title'   => '</h3>',
25
+               )
26
+          );
27
+     }
28 28
 
29 29
 endif;
30 30
 
31 31
 add_action( 'widgets_init', 'lsx_widget_area_404_init' );
32 32
 
33 33
 if ( ! function_exists( 'my_search_placeholder' ) ) :
34
-	/**
35
-	 * Placeholder.
36
-	 *
37
-	 * @package    lsx
38
-	 * @subpackage 404-widget
39
-	 */
40
-	function my_search_placeholder() {
41
-		return __( 'lsdev.biz', 'lsx' );
42
-	}
34
+     /**
35
+      * Placeholder.
36
+      *
37
+      * @package    lsx
38
+      * @subpackage 404-widget
39
+      */
40
+     function my_search_placeholder() {
41
+          return __( 'lsdev.biz', 'lsx' );
42
+     }
43 43
 
44 44
 endif;
45 45
 
Please login to merge, or discard this patch.
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.