Passed
Pull Request — master (#389)
by Jacques
03:10
created
lib/theme-support.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 	);
14 14
 
15 15
 }
16
-add_action( 'admin_init', 'editor_styles' );
16
+add_action('admin_init', 'editor_styles');
17 17
 
18 18
 /**
19 19
  * Add theme support functions.
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  * @package lsx
22 22
  */
23 23
 
24
-if ( ! function_exists( 'theme_support' ) ) :
24
+if ( ! function_exists('theme_support')) :
25 25
 	/**
26 26
 	 * Add theme support functions.
27 27
 	 *
@@ -29,44 +29,44 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	function theme_support() {
31 31
 		// Add support for editor styles.
32
-		add_theme_support( 'editor-styles' );
32
+		add_theme_support('editor-styles');
33 33
 		// Add support for full and wide align images.
34
-		add_theme_support( 'align-wide' );
34
+		add_theme_support('align-wide');
35 35
 		// Add support for styling blocks.
36
-		add_theme_support( 'wp-block-styles' );
36
+		add_theme_support('wp-block-styles');
37 37
 		// Add support for responsive embedded content.
38
-		add_theme_support( 'responsive-embeds' );
38
+		add_theme_support('responsive-embeds');
39 39
 		// Add custom editor font sizes.
40 40
 		add_theme_support(
41 41
 			'editor-font-sizes',
42 42
 			array(
43 43
 				array(
44
-					'name'      => esc_html_x( 'Small', 'font size option label', 'lsx' ),
45
-					'shortName' => esc_html_x( 'S', 'abbreviation of the font size option label', 'lsx' ),
44
+					'name'      => esc_html_x('Small', 'font size option label', 'lsx'),
45
+					'shortName' => esc_html_x('S', 'abbreviation of the font size option label', 'lsx'),
46 46
 					'size'      => 13,
47 47
 					'slug'      => 'small',
48 48
 				),
49 49
 				array(
50
-					'name'      => esc_html_x( 'Normal', 'font size option label', 'lsx' ),
51
-					'shortName' => esc_html_x( 'N', 'abbreviation of the font size option label', 'lsx' ),
50
+					'name'      => esc_html_x('Normal', 'font size option label', 'lsx'),
51
+					'shortName' => esc_html_x('N', 'abbreviation of the font size option label', 'lsx'),
52 52
 					'size'      => 15,
53 53
 					'slug'      => 'normal',
54 54
 				),
55 55
 				array(
56
-					'name'      => esc_html_x( 'Medium', 'font size option label', 'lsx' ),
57
-					'shortName' => esc_html_x( 'M', 'abbreviation of the font size option label', 'lsx' ),
56
+					'name'      => esc_html_x('Medium', 'font size option label', 'lsx'),
57
+					'shortName' => esc_html_x('M', 'abbreviation of the font size option label', 'lsx'),
58 58
 					'size'      => 22,
59 59
 					'slug'      => 'medium',
60 60
 				),
61 61
 				array(
62
-					'name'      => esc_html_x( 'Large', 'font size option label', 'lsx' ),
63
-					'shortName' => esc_html_x( 'L', 'abbreviation of the font size option label', 'lsx' ),
62
+					'name'      => esc_html_x('Large', 'font size option label', 'lsx'),
63
+					'shortName' => esc_html_x('L', 'abbreviation of the font size option label', 'lsx'),
64 64
 					'size'      => 30,
65 65
 					'slug'      => 'large',
66 66
 				),
67 67
 				array(
68
-					'name'      => esc_html_x( 'Huge', 'font size option label', 'lsx' ),
69
-					'shortName' => esc_html_x( 'XL', 'abbreviation of the font size option label', 'lsx' ),
68
+					'name'      => esc_html_x('Huge', 'font size option label', 'lsx'),
69
+					'shortName' => esc_html_x('XL', 'abbreviation of the font size option label', 'lsx'),
70 70
 					'size'      => 40,
71 71
 					'slug'      => 'huge',
72 72
 				),
@@ -74,48 +74,48 @@  discard block
 block discarded – undo
74 74
 		);
75 75
 
76 76
 		// Add support for custom color scheme.
77
-		add_theme_support( 'editor-color-palette', array(
77
+		add_theme_support('editor-color-palette', array(
78 78
 			array(
79
-				'name'  => __( 'Strong Blue', 'lsx' ),
79
+				'name'  => __('Strong Blue', 'lsx'),
80 80
 				'slug'  => 'strong-blue',
81 81
 				'color' => '#27639e',
82 82
 			),
83 83
 			array(
84
-				'name'  => __( 'Lighter Blue', 'lsx' ),
84
+				'name'  => __('Lighter Blue', 'lsx'),
85 85
 				'slug'  => 'lighter-blue',
86 86
 				'color' => '#428bca',
87 87
 			),
88 88
 			array(
89
-				'name'  => __( 'Yellow', 'lsx' ),
89
+				'name'  => __('Yellow', 'lsx'),
90 90
 				'slug'  => 'light-yellow',
91 91
 				'color' => '#f7ae00',
92 92
 			),
93 93
 			array(
94
-				'name'  => __( 'Dark Yellow', 'lsx' ),
94
+				'name'  => __('Dark Yellow', 'lsx'),
95 95
 				'slug'  => 'dark-yellow',
96 96
 				'color' => '#ab7800',
97 97
 			),
98 98
 			array(
99
-				'name'  => __( 'Green', 'lsx' ),
99
+				'name'  => __('Green', 'lsx'),
100 100
 				'slug'  => 'light-green',
101 101
 				'color' => '#6BA913',
102 102
 			),
103 103
 			array(
104
-				'name'  => __( 'Dark Green', 'lsx' ),
104
+				'name'  => __('Dark Green', 'lsx'),
105 105
 				'slug'  => 'dark-green',
106 106
 				'color' => '#3F640B',
107 107
 			),
108 108
 			array(
109
-				'name'  => __( 'White', 'lsx' ),
109
+				'name'  => __('White', 'lsx'),
110 110
 				'slug'  => 'white',
111 111
 				'color' => '#ffffff',
112 112
 			),
113 113
 			array(
114
-				'name'  => __( 'Black', 'lsx' ),
114
+				'name'  => __('Black', 'lsx'),
115 115
 				'slug'  => 'black',
116 116
 				'color' => '#000000',
117 117
 			),
118
-		) );
118
+		));
119 119
 
120 120
 		$primary_color    = 'rgba(39,99,158,1)';
121 121
 		$secondary_color  = 'rgba(247,174,0,1)';
@@ -126,30 +126,30 @@  discard block
 block discarded – undo
126 126
 			'editor-gradient-presets',
127 127
 			array(
128 128
 				array(
129
-					'name'     => __( 'Primary to Secondary', 'lsx' ),
130
-					'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $secondary_color ) . ' 100%)',
129
+					'name'     => __('Primary to Secondary', 'lsx'),
130
+					'gradient' => 'linear-gradient(135deg, ' . esc_attr($primary_color) . ' 0%, ' . esc_attr($secondary_color) . ' 100%)',
131 131
 					'slug'     => 'primary-to-secondary',
132 132
 				),
133 133
 				array(
134
-					'name'     => __( 'Primary to Tertiary', 'lsx' ),
135
-					'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $tertiary_color ) . ' 100%)',
134
+					'name'     => __('Primary to Tertiary', 'lsx'),
135
+					'gradient' => 'linear-gradient(135deg, ' . esc_attr($primary_color) . ' 0%, ' . esc_attr($tertiary_color) . ' 100%)',
136 136
 					'slug'     => 'primary-to-tertiary',
137 137
 				),
138 138
 				array(
139
-					'name'     => __( 'Primary to Background', 'lsx' ),
140
-					'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $background_color ) . ' 100%)',
139
+					'name'     => __('Primary to Background', 'lsx'),
140
+					'gradient' => 'linear-gradient(135deg, ' . esc_attr($primary_color) . ' 0%, ' . esc_attr($background_color) . ' 100%)',
141 141
 					'slug'     => 'primary-to-background',
142 142
 				),
143 143
 				array(
144
-					'name'     => __( 'Secondary to Tertiary', 'lsx' ),
145
-					'gradient' => 'linear-gradient(135deg, ' . esc_attr( $secondary_color ) . ' 0%, ' . esc_attr( $tertiary_color ) . ' 100%)',
144
+					'name'     => __('Secondary to Tertiary', 'lsx'),
145
+					'gradient' => 'linear-gradient(135deg, ' . esc_attr($secondary_color) . ' 0%, ' . esc_attr($tertiary_color) . ' 100%)',
146 146
 					'slug'     => 'secondary-to-tertiary',
147 147
 				),
148 148
 			)
149 149
 		);
150 150
 	}
151 151
 endif;
152
-add_action( 'after_setup_theme', 'theme_support' );
152
+add_action('after_setup_theme', 'theme_support');
153 153
 
154 154
 /**
155 155
  * WPForms submit button, match Gutenberg button block
@@ -157,8 +157,8 @@  discard block
 block discarded – undo
157 157
  * @param [type] $form_data
158 158
  * @return void
159 159
  */
160
-function lsx_wpforms_match_button_block( $form_data ) {
160
+function lsx_wpforms_match_button_block($form_data) {
161 161
 	$form_data['settings']['submit_class'] .= ' btn';
162 162
 	return $form_data;
163 163
 }
164
-add_filter( 'wpforms_frontend_form_data', 'lsx_wpforms_match_button_block' );
164
+add_filter('wpforms_frontend_form_data', 'lsx_wpforms_match_button_block');
Please login to merge, or discard this patch.
includes/yoast/class-lsx-yoast.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage yoast
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! class_exists( 'LSX_Yoast' ) ) :
13
+if ( ! class_exists('LSX_Yoast')) :
14 14
 
15 15
 	/**
16 16
 	 * The LSX Yoast integration class
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 		 */
33 33
 		public function __construct() {
34 34
 
35
-			add_action( 'wp_enqueue_scripts', array( $this, 'lsx_yoast_scripts_add_styles' ) );
35
+			add_action('wp_enqueue_scripts', array($this, 'lsx_yoast_scripts_add_styles'));
36 36
 		}
37 37
 
38 38
 		/**
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 		 */
44 44
 		public static function get_instance() {
45 45
 			// If the single instance hasn't been set, set it now.
46
-			if ( null === self::$instance ) {
46
+			if (null === self::$instance) {
47 47
 				self::$instance = new self();
48 48
 			}
49 49
 			return self::$instance;
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
 		 * @subpackage yoast
57 57
 		 */
58 58
 		public function lsx_yoast_scripts_add_styles() {
59
-			wp_enqueue_script( 'lsx_yoast_js', get_template_directory_uri() . '/assets/js/yoast/yoast.js', array( 'jquery' ), LSX_VERSION, true );
60
-			wp_enqueue_style( 'lsx_yoast_css', get_template_directory_uri() . '/assets/css/yoast/yoast.css', array( 'lsx_main' ), LSX_VERSION );
59
+			wp_enqueue_script('lsx_yoast_js', get_template_directory_uri() . '/assets/js/yoast/yoast.js', array('jquery'), LSX_VERSION, true);
60
+			wp_enqueue_style('lsx_yoast_css', get_template_directory_uri() . '/assets/css/yoast/yoast.css', array('lsx_main'), LSX_VERSION);
61 61
 		}
62 62
 	}
63 63
 
Please login to merge, or discard this patch.
functions.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,33 +7,33 @@
 block discarded – undo
7 7
  * @package lsx
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) {
10
+if ( ! defined('ABSPATH')) {
11 11
 	exit;
12 12
 }
13 13
 
14
-define( 'LSX_VERSION', '2.8' );
14
+define('LSX_VERSION', '2.8');
15 15
 
16
-if ( in_array( 'wordpress-seo/wp-seo.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
16
+if (in_array('wordpress-seo/wp-seo.php', apply_filters('active_plugins', get_option('active_plugins')))) {
17 17
 	require get_template_directory() . '/includes/yoast/class-lsx-yoast.php';
18 18
 }
19 19
 
20
-if ( class_exists( 'WooCommerce' ) ) {
20
+if (class_exists('WooCommerce')) {
21 21
 	require get_template_directory() . '/includes/woocommerce/woocommerce.php';
22 22
 }
23 23
 
24
-if ( class_exists( 'Tribe__Events__Main' ) ) {
24
+if (class_exists('Tribe__Events__Main')) {
25 25
 	require get_template_directory() . '/includes/the-events-calendar/the-events-calendar.php';
26 26
 }
27 27
 
28
-if ( class_exists( 'Sensei_Main' ) || class_exists( 'Sensei_WC' ) ) {
28
+if (class_exists('Sensei_Main') || class_exists('Sensei_WC')) {
29 29
 	require get_template_directory() . '/includes/sensei/class-lsx-sensei.php';
30 30
 }
31 31
 
32
-if ( class_exists( 'Popup_Maker' ) ) {
32
+if (class_exists('Popup_Maker')) {
33 33
 	require get_template_directory() . '/includes/popup-maker/class-lsx-popup-maker.php';
34 34
 }
35 35
 
36
-if ( class_exists( 'bbPress' ) ) {
36
+if (class_exists('bbPress')) {
37 37
 	require get_template_directory() . '/includes/bbpress/bbpress.php';
38 38
 }
39 39
 
Please login to merge, or discard this patch.