Passed
Pull Request — master (#114)
by
unknown
04:41 queued 36s
created

lsx-customizer.php (17 issues)

1
<?php
2
/**
3
 * Plugin Name: LSX Customizer
4
 * Plugin URI:  https://www.lsdev.biz/product/lsx-site-customizer/
5
 * Description: The LSX Customizer extension gives you complete control over the appearance of your LSX-powered WordPress site
6
 * Version:     1.5.0
7
 * Author:      LightSpeed
8
 * Author URI:  https://www.lsdev.biz/
9
 * License: GPLv3 or later
10
 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 * Text Domain: lsx-customizer
12
 * Domain Path: /languages
13
 *
14
 * @package lsx-customizer
15
 */
16
17
// If this file is called directly, abort.
18
if ( ! defined( 'WPINC' ) ) {
19
	die;
20
}
21
22
define( 'LSX_CUSTOMIZER_PATH', plugin_dir_path( __FILE__ ) );
23
define( 'LSX_CUSTOMIZER_CORE', __FILE__ );
24
define( 'LSX_CUSTOMIZER_URL', plugin_dir_url( __FILE__ ) );
25
define( 'LSX_CUSTOMIZER_VER', '1.5.0' );
26
27
/* ======================= Below is the Plugin Class init ========================= */
28
29
require_once LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer.php';
30
31
if ( in_array( 'wordpress-seo/wp-seo.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) || in_array( 'wordpress-seo-premium/wp-seo-premium.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
0 ignored issues
show
It seems like apply_filters('active_pl...tion('active_plugins')) can also be of type false; however, parameter $haystack of in_array() does only seem to accept array, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

31
if ( in_array( 'wordpress-seo/wp-seo.php', /** @scrutinizer ignore-type */ apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) || in_array( 'wordpress-seo-premium/wp-seo-premium.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
Loading history...
Expected 0 spaces after opening bracket; 1 found
Loading history...
Not using strict comparison for in_array; supply true for third argument.
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
32
	require LSX_CUSTOMIZER_PATH  . 'includes/yoast/class-lsx-yoast.php';
0 ignored issues
show
Concat operator must be surrounded by a single space
Loading history...
33
}
34
35
if ( class_exists( 'Tribe__Events__Main' ) ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
36
	require LSX_CUSTOMIZER_PATH  . 'includes/the-events-calendar/the-events-calendar.php';
0 ignored issues
show
Concat operator must be surrounded by a single space
Loading history...
37
}
38
39
if ( class_exists( 'Sensei_Main' ) || class_exists( 'Sensei_WC' ) ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
40
	require LSX_CUSTOMIZER_PATH  . 'includes/sensei/class-lsx-sensei.php';
0 ignored issues
show
Concat operator must be surrounded by a single space
Loading history...
41
}
42
43
if ( class_exists( 'Popup_Maker' ) ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
44
	require LSX_CUSTOMIZER_PATH  . 'includes/popup-maker/class-lsx-popup-maker.php';
0 ignored issues
show
Concat operator must be surrounded by a single space
Loading history...
45
}
46
47
if ( class_exists( 'bbPress' ) ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
48
	require LSX_CUSTOMIZER_PATH  . 'includes/bbpress/bbpress.php';
0 ignored issues
show
Concat operator must be surrounded by a single space
Loading history...
49
}
50