Passed
Push — master ( ae1954...aab291 )
by Paul
08:17 queued 04:15
created
views/pages/settings/licenses.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <table class="form-table">
4 4
     <tbody>
Please login to merge, or discard this patch.
views/pages/settings/general.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <table class="form-table">
4 4
     <tbody>
Please login to merge, or discard this patch.
views/pages/settings/reviews.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <table class="form-table">
4 4
     <tbody>
Please login to merge, or discard this patch.
activate.php 3 patches
Indentation   +122 added lines, -122 removed lines patch added patch discarded remove patch
@@ -8,137 +8,137 @@
 block discarded – undo
8 8
  */
9 9
 class GL_Plugin_Check_v3
10 10
 {
11
-    const MIN_PHP_VERSION = '5.6.0';
12
-    const MIN_WORDPRESS_VERSION = '4.7.0';
11
+	const MIN_PHP_VERSION = '5.6.0';
12
+	const MIN_WORDPRESS_VERSION = '4.7.0';
13 13
 
14
-    /**
15
-     * @var string
16
-     */
17
-    protected $file;
14
+	/**
15
+	 * @var string
16
+	 */
17
+	protected $file;
18 18
 
19
-    /**
20
-     * @var array
21
-     */
22
-    protected $versions;
19
+	/**
20
+	 * @var array
21
+	 */
22
+	protected $versions;
23 23
 
24
-    /**
25
-     * @param string $file
26
-     */
27
-    public function __construct($file, array $versions = array())
28
-    {
29
-        $this->file = realpath($file);
30
-        $this->versions = wp_parse_args($versions, array(
31
-            'php' => static::MIN_PHP_VERSION,
32
-            'wordpress' => static::MIN_WORDPRESS_VERSION,
33
-        ));
34
-    }
24
+	/**
25
+	 * @param string $file
26
+	 */
27
+	public function __construct($file, array $versions = array())
28
+	{
29
+		$this->file = realpath($file);
30
+		$this->versions = wp_parse_args($versions, array(
31
+			'php' => static::MIN_PHP_VERSION,
32
+			'wordpress' => static::MIN_WORDPRESS_VERSION,
33
+		));
34
+	}
35 35
 
36
-    /**
37
-     * @return bool
38
-     */
39
-    public function canProceed()
40
-    {
41
-        if ($this->isValid()) {
42
-            return true;
43
-        }
44
-        add_action('activated_plugin', array($this, 'deactivate'));
45
-        add_action('admin_notices', array($this, 'deactivate'));
46
-        return false;
47
-    }
36
+	/**
37
+	 * @return bool
38
+	 */
39
+	public function canProceed()
40
+	{
41
+		if ($this->isValid()) {
42
+			return true;
43
+		}
44
+		add_action('activated_plugin', array($this, 'deactivate'));
45
+		add_action('admin_notices', array($this, 'deactivate'));
46
+		return false;
47
+	}
48 48
 
49
-    /**
50
-     * @return bool
51
-     */
52
-    public function isPhpValid()
53
-    {
54
-        return !version_compare(PHP_VERSION, $this->versions['php'], '<');
55
-    }
49
+	/**
50
+	 * @return bool
51
+	 */
52
+	public function isPhpValid()
53
+	{
54
+		return !version_compare(PHP_VERSION, $this->versions['php'], '<');
55
+	}
56 56
 
57
-    /**
58
-     * @return bool
59
-     */
60
-    public function isValid()
61
-    {
62
-        return $this->isPhpValid() && $this->isWpValid();
63
-    }
57
+	/**
58
+	 * @return bool
59
+	 */
60
+	public function isValid()
61
+	{
62
+		return $this->isPhpValid() && $this->isWpValid();
63
+	}
64 64
 
65
-    /**
66
-     * @return bool
67
-     */
68
-    public function isWpValid()
69
-    {
70
-        global $wp_version;
71
-        return !version_compare($wp_version, $this->versions['wordpress'], '<');
72
-    }
65
+	/**
66
+	 * @return bool
67
+	 */
68
+	public function isWpValid()
69
+	{
70
+		global $wp_version;
71
+		return !version_compare($wp_version, $this->versions['wordpress'], '<');
72
+	}
73 73
 
74
-    /**
75
-     * @param string $plugin
76
-     * @return void
77
-     */
78
-    public function deactivate($plugin)
79
-    {
80
-        if ($this->isValid()) {
81
-            return;
82
-        }
83
-        $pluginSlug = plugin_basename($this->file);
84
-        if ($plugin == $pluginSlug) {
85
-            $this->redirect(); //exit
86
-        }
87
-        $pluginData = get_file_data($this->file, array('name' => 'Plugin Name'), 'plugin');
88
-        deactivate_plugins($pluginSlug);
89
-        $this->printNotice($pluginData['name']);
90
-    }
74
+	/**
75
+	 * @param string $plugin
76
+	 * @return void
77
+	 */
78
+	public function deactivate($plugin)
79
+	{
80
+		if ($this->isValid()) {
81
+			return;
82
+		}
83
+		$pluginSlug = plugin_basename($this->file);
84
+		if ($plugin == $pluginSlug) {
85
+			$this->redirect(); //exit
86
+		}
87
+		$pluginData = get_file_data($this->file, array('name' => 'Plugin Name'), 'plugin');
88
+		deactivate_plugins($pluginSlug);
89
+		$this->printNotice($pluginData['name']);
90
+	}
91 91
 
92
-    /**
93
-     * @return array
94
-     */
95
-    protected function getMessages()
96
-    {
97
-        return array(
98
-            __('The %s plugin was deactivated.', 'site-reviews'),
99
-            __('This plugin requires %s or greater in order to work properly.', 'site-reviews'),
100
-            __('Please contact your hosting provider or server administrator to upgrade the version of PHP on your server (your server is running PHP version %s), or try to find an alternative plugin.', 'site-reviews'),
101
-            __('PHP version', 'site-reviews'),
102
-            __('WordPress version', 'site-reviews'),
103
-            __('Update WordPress', 'site-reviews'),
104
-            __('You can use the %s plugin to restore %s to the previous version.', 'site-reviews'),
105
-        );
106
-    }
92
+	/**
93
+	 * @return array
94
+	 */
95
+	protected function getMessages()
96
+	{
97
+		return array(
98
+			__('The %s plugin was deactivated.', 'site-reviews'),
99
+			__('This plugin requires %s or greater in order to work properly.', 'site-reviews'),
100
+			__('Please contact your hosting provider or server administrator to upgrade the version of PHP on your server (your server is running PHP version %s), or try to find an alternative plugin.', 'site-reviews'),
101
+			__('PHP version', 'site-reviews'),
102
+			__('WordPress version', 'site-reviews'),
103
+			__('Update WordPress', 'site-reviews'),
104
+			__('You can use the %s plugin to restore %s to the previous version.', 'site-reviews'),
105
+		);
106
+	}
107 107
 
108
-    /**
109
-     * @param string $pluginName
110
-     * @return void
111
-     */
112
-    protected function printNotice($pluginName)
113
-    {
114
-        $noticeTemplate = '<div id="message" class="notice notice-error error is-dismissible"><p><strong>%s</strong></p><p>%s</p><p>%s</p></div>';
115
-        $messages = $this->getMessages();
116
-        $rollbackMessage = sprintf('<strong>'.$messages[6].'</strong>', '<a href="https://wordpress.org/plugins/wp-rollback/">WP Rollback</a>', $pluginName);
117
-        if (!$this->isPhpValid()) {
118
-            printf($noticeTemplate,
119
-                sprintf($messages[0], $pluginName),
120
-                sprintf($messages[1], $messages[3].' '.$this->versions['php']),
121
-                sprintf($messages[2], PHP_VERSION).'</p><p>'.$rollbackMessage
122
-            );
123
-        } elseif (!$this->isWpValid()) {
124
-            printf($noticeTemplate,
125
-                sprintf($messages[0], $pluginName),
126
-                sprintf($messages[1], $messages[4].' '.$this->versions['wordpress']),
127
-                $rollbackMessage.'</p><p>'.sprintf('<a href="%s">%s</a>', admin_url('update-core.php'), $messages[5])
128
-            );
129
-        }
130
-    }
108
+	/**
109
+	 * @param string $pluginName
110
+	 * @return void
111
+	 */
112
+	protected function printNotice($pluginName)
113
+	{
114
+		$noticeTemplate = '<div id="message" class="notice notice-error error is-dismissible"><p><strong>%s</strong></p><p>%s</p><p>%s</p></div>';
115
+		$messages = $this->getMessages();
116
+		$rollbackMessage = sprintf('<strong>'.$messages[6].'</strong>', '<a href="https://wordpress.org/plugins/wp-rollback/">WP Rollback</a>', $pluginName);
117
+		if (!$this->isPhpValid()) {
118
+			printf($noticeTemplate,
119
+				sprintf($messages[0], $pluginName),
120
+				sprintf($messages[1], $messages[3].' '.$this->versions['php']),
121
+				sprintf($messages[2], PHP_VERSION).'</p><p>'.$rollbackMessage
122
+			);
123
+		} elseif (!$this->isWpValid()) {
124
+			printf($noticeTemplate,
125
+				sprintf($messages[0], $pluginName),
126
+				sprintf($messages[1], $messages[4].' '.$this->versions['wordpress']),
127
+				$rollbackMessage.'</p><p>'.sprintf('<a href="%s">%s</a>', admin_url('update-core.php'), $messages[5])
128
+			);
129
+		}
130
+	}
131 131
 
132
-    /**
133
-     * @return void
134
-     */
135
-    protected function redirect()
136
-    {
137
-        wp_safe_redirect(self_admin_url(sprintf('plugins.php?plugin_status=%s&paged=%s&s=%s',
138
-            filter_input(INPUT_GET, 'plugin_status'),
139
-            filter_input(INPUT_GET, 'paged'),
140
-            filter_input(INPUT_GET, 's')
141
-        )));
142
-        exit;
143
-    }
132
+	/**
133
+	 * @return void
134
+	 */
135
+	protected function redirect()
136
+	{
137
+		wp_safe_redirect(self_admin_url(sprintf('plugins.php?plugin_status=%s&paged=%s&s=%s',
138
+			filter_input(INPUT_GET, 'plugin_status'),
139
+			filter_input(INPUT_GET, 'paged'),
140
+			filter_input(INPUT_GET, 's')
141
+		)));
142
+		exit;
143
+	}
144 144
 }
Please login to merge, or discard this patch.
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-defined('WPINC') || die;
3
+defined( 'WPINC' ) || die;
4 4
 
5 5
 /**
6 6
  * Check for minimum system requirments on plugin activation.
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
     /**
25 25
      * @param string $file
26 26
      */
27
-    public function __construct($file, array $versions = array())
27
+    public function __construct( $file, array $versions = array() )
28 28
     {
29
-        $this->file = realpath($file);
30
-        $this->versions = wp_parse_args($versions, array(
29
+        $this->file = realpath( $file );
30
+        $this->versions = wp_parse_args( $versions, array(
31 31
             'php' => static::MIN_PHP_VERSION,
32 32
             'wordpress' => static::MIN_WORDPRESS_VERSION,
33
-        ));
33
+        ) );
34 34
     }
35 35
 
36 36
     /**
@@ -38,11 +38,11 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function canProceed()
40 40
     {
41
-        if ($this->isValid()) {
41
+        if( $this->isValid() ) {
42 42
             return true;
43 43
         }
44
-        add_action('activated_plugin', array($this, 'deactivate'));
45
-        add_action('admin_notices', array($this, 'deactivate'));
44
+        add_action( 'activated_plugin', array( $this, 'deactivate' ) );
45
+        add_action( 'admin_notices', array( $this, 'deactivate' ) );
46 46
         return false;
47 47
     }
48 48
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function isPhpValid()
53 53
     {
54
-        return !version_compare(PHP_VERSION, $this->versions['php'], '<');
54
+        return !version_compare( PHP_VERSION, $this->versions['php'], '<' );
55 55
     }
56 56
 
57 57
     /**
@@ -68,25 +68,25 @@  discard block
 block discarded – undo
68 68
     public function isWpValid()
69 69
     {
70 70
         global $wp_version;
71
-        return !version_compare($wp_version, $this->versions['wordpress'], '<');
71
+        return !version_compare( $wp_version, $this->versions['wordpress'], '<' );
72 72
     }
73 73
 
74 74
     /**
75 75
      * @param string $plugin
76 76
      * @return void
77 77
      */
78
-    public function deactivate($plugin)
78
+    public function deactivate( $plugin )
79 79
     {
80
-        if ($this->isValid()) {
80
+        if( $this->isValid() ) {
81 81
             return;
82 82
         }
83
-        $pluginSlug = plugin_basename($this->file);
84
-        if ($plugin == $pluginSlug) {
83
+        $pluginSlug = plugin_basename( $this->file );
84
+        if( $plugin == $pluginSlug ) {
85 85
             $this->redirect(); //exit
86 86
         }
87
-        $pluginData = get_file_data($this->file, array('name' => 'Plugin Name'), 'plugin');
88
-        deactivate_plugins($pluginSlug);
89
-        $this->printNotice($pluginData['name']);
87
+        $pluginData = get_file_data( $this->file, array( 'name' => 'Plugin Name' ), 'plugin' );
88
+        deactivate_plugins( $pluginSlug );
89
+        $this->printNotice( $pluginData['name'] );
90 90
     }
91 91
 
92 92
     /**
@@ -95,13 +95,13 @@  discard block
 block discarded – undo
95 95
     protected function getMessages()
96 96
     {
97 97
         return array(
98
-            __('The %s plugin was deactivated.', 'site-reviews'),
99
-            __('This plugin requires %s or greater in order to work properly.', 'site-reviews'),
100
-            __('Please contact your hosting provider or server administrator to upgrade the version of PHP on your server (your server is running PHP version %s), or try to find an alternative plugin.', 'site-reviews'),
101
-            __('PHP version', 'site-reviews'),
102
-            __('WordPress version', 'site-reviews'),
103
-            __('Update WordPress', 'site-reviews'),
104
-            __('You can use the %s plugin to restore %s to the previous version.', 'site-reviews'),
98
+            __( 'The %s plugin was deactivated.', 'site-reviews' ),
99
+            __( 'This plugin requires %s or greater in order to work properly.', 'site-reviews' ),
100
+            __( 'Please contact your hosting provider or server administrator to upgrade the version of PHP on your server (your server is running PHP version %s), or try to find an alternative plugin.', 'site-reviews' ),
101
+            __( 'PHP version', 'site-reviews' ),
102
+            __( 'WordPress version', 'site-reviews' ),
103
+            __( 'Update WordPress', 'site-reviews' ),
104
+            __( 'You can use the %s plugin to restore %s to the previous version.', 'site-reviews' ),
105 105
         );
106 106
     }
107 107
 
@@ -109,22 +109,22 @@  discard block
 block discarded – undo
109 109
      * @param string $pluginName
110 110
      * @return void
111 111
      */
112
-    protected function printNotice($pluginName)
112
+    protected function printNotice( $pluginName )
113 113
     {
114 114
         $noticeTemplate = '<div id="message" class="notice notice-error error is-dismissible"><p><strong>%s</strong></p><p>%s</p><p>%s</p></div>';
115 115
         $messages = $this->getMessages();
116
-        $rollbackMessage = sprintf('<strong>'.$messages[6].'</strong>', '<a href="https://wordpress.org/plugins/wp-rollback/">WP Rollback</a>', $pluginName);
117
-        if (!$this->isPhpValid()) {
118
-            printf($noticeTemplate,
119
-                sprintf($messages[0], $pluginName),
120
-                sprintf($messages[1], $messages[3].' '.$this->versions['php']),
121
-                sprintf($messages[2], PHP_VERSION).'</p><p>'.$rollbackMessage
116
+        $rollbackMessage = sprintf( '<strong>'.$messages[6].'</strong>', '<a href="https://wordpress.org/plugins/wp-rollback/">WP Rollback</a>', $pluginName );
117
+        if( !$this->isPhpValid() ) {
118
+            printf( $noticeTemplate,
119
+                sprintf( $messages[0], $pluginName ),
120
+                sprintf( $messages[1], $messages[3].' '.$this->versions['php'] ),
121
+                sprintf( $messages[2], PHP_VERSION ).'</p><p>'.$rollbackMessage
122 122
             );
123
-        } elseif (!$this->isWpValid()) {
124
-            printf($noticeTemplate,
125
-                sprintf($messages[0], $pluginName),
126
-                sprintf($messages[1], $messages[4].' '.$this->versions['wordpress']),
127
-                $rollbackMessage.'</p><p>'.sprintf('<a href="%s">%s</a>', admin_url('update-core.php'), $messages[5])
123
+        } elseif( !$this->isWpValid() ) {
124
+            printf( $noticeTemplate,
125
+                sprintf( $messages[0], $pluginName ),
126
+                sprintf( $messages[1], $messages[4].' '.$this->versions['wordpress'] ),
127
+                $rollbackMessage.'</p><p>'.sprintf( '<a href="%s">%s</a>', admin_url( 'update-core.php' ), $messages[5] )
128 128
             );
129 129
         }
130 130
     }
@@ -134,11 +134,11 @@  discard block
 block discarded – undo
134 134
      */
135 135
     protected function redirect()
136 136
     {
137
-        wp_safe_redirect(self_admin_url(sprintf('plugins.php?plugin_status=%s&paged=%s&s=%s',
138
-            filter_input(INPUT_GET, 'plugin_status'),
139
-            filter_input(INPUT_GET, 'paged'),
140
-            filter_input(INPUT_GET, 's')
141
-        )));
137
+        wp_safe_redirect( self_admin_url( sprintf( 'plugins.php?plugin_status=%s&paged=%s&s=%s',
138
+            filter_input( INPUT_GET, 'plugin_status' ),
139
+            filter_input( INPUT_GET, 'paged' ),
140
+            filter_input( INPUT_GET, 's' )
141
+        ) ) );
142 142
         exit;
143 143
     }
144 144
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,8 @@
 block discarded – undo
120 120
                 sprintf($messages[1], $messages[3].' '.$this->versions['php']),
121 121
                 sprintf($messages[2], PHP_VERSION).'</p><p>'.$rollbackMessage
122 122
             );
123
-        } elseif (!$this->isWpValid()) {
123
+        }
124
+        elseif (!$this->isWpValid()) {
124 125
             printf($noticeTemplate,
125 126
                 sprintf($messages[0], $pluginName),
126 127
                 sprintf($messages[1], $messages[4].' '.$this->versions['wordpress']),
Please login to merge, or discard this patch.
templates/reviews-form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <div class="glsr-form-wrap">
4 4
     <form class="{{ class }}" id="{{ id }}" method="post" enctype="multipart/form-data">
Please login to merge, or discard this patch.
templates/form/response.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <div class="glsr-form-message {{ class }}">
4 4
     {{ message }}
Please login to merge, or discard this patch.
plugin/Handlers/EnqueuePublicAssets.php 2 patches
Indentation   +136 added lines, -136 removed lines patch added patch discarded remove patch
@@ -9,148 +9,148 @@
 block discarded – undo
9 9
 
10 10
 class EnqueuePublicAssets
11 11
 {
12
-    /**
13
-     * @return void
14
-     */
15
-    public function handle()
16
-    {
17
-        $this->enqueueAssets();
18
-        $this->enqueuePolyfillService();
19
-        $this->enqueueRecaptchaScript();
20
-        $this->inlineScript();
21
-        $this->inlineStyles();
22
-    }
12
+	/**
13
+	 * @return void
14
+	 */
15
+	public function handle()
16
+	{
17
+		$this->enqueueAssets();
18
+		$this->enqueuePolyfillService();
19
+		$this->enqueueRecaptchaScript();
20
+		$this->inlineScript();
21
+		$this->inlineStyles();
22
+	}
23 23
 
24
-    /**
25
-     * @return void
26
-     */
27
-    public function enqueueAssets()
28
-    {
29
-        if (apply_filters('site-reviews/assets/css', true)) {
30
-            wp_enqueue_style(
31
-                Application::ID,
32
-                $this->getStylesheet(),
33
-                [],
34
-                glsr()->version
35
-            );
36
-        }
37
-        if (apply_filters('site-reviews/assets/js', true)) {
38
-            $dependencies = apply_filters('site-reviews/assets/polyfill', true)
39
-                ? [Application::ID.'/polyfill']
40
-                : [];
41
-            $dependencies = apply_filters('site-reviews/enqueue/public/dependencies', $dependencies);
42
-            wp_enqueue_script(
43
-                Application::ID,
44
-                glsr()->url('assets/scripts/'.Application::ID.'.js'),
45
-                $dependencies,
46
-                glsr()->version,
47
-                true
48
-            );
49
-        }
50
-    }
24
+	/**
25
+	 * @return void
26
+	 */
27
+	public function enqueueAssets()
28
+	{
29
+		if (apply_filters('site-reviews/assets/css', true)) {
30
+			wp_enqueue_style(
31
+				Application::ID,
32
+				$this->getStylesheet(),
33
+				[],
34
+				glsr()->version
35
+			);
36
+		}
37
+		if (apply_filters('site-reviews/assets/js', true)) {
38
+			$dependencies = apply_filters('site-reviews/assets/polyfill', true)
39
+				? [Application::ID.'/polyfill']
40
+				: [];
41
+			$dependencies = apply_filters('site-reviews/enqueue/public/dependencies', $dependencies);
42
+			wp_enqueue_script(
43
+				Application::ID,
44
+				glsr()->url('assets/scripts/'.Application::ID.'.js'),
45
+				$dependencies,
46
+				glsr()->version,
47
+				true
48
+			);
49
+		}
50
+	}
51 51
 
52
-    /**
53
-     * @return void
54
-     */
55
-    public function enqueuePolyfillService()
56
-    {
57
-        if (!apply_filters('site-reviews/assets/polyfill', true)) {
58
-            return;
59
-        }
60
-        wp_enqueue_script(Application::ID.'/polyfill', add_query_arg([
61
-            'features' => 'CustomEvent,Element.prototype.closest,Element.prototype.dataset,Event,XMLHttpRequest,MutationObserver',
62
-            'flags' => 'gated',
63
-        ], 'https://polyfill.io/v3/polyfill.min.js'));
64
-    }
52
+	/**
53
+	 * @return void
54
+	 */
55
+	public function enqueuePolyfillService()
56
+	{
57
+		if (!apply_filters('site-reviews/assets/polyfill', true)) {
58
+			return;
59
+		}
60
+		wp_enqueue_script(Application::ID.'/polyfill', add_query_arg([
61
+			'features' => 'CustomEvent,Element.prototype.closest,Element.prototype.dataset,Event,XMLHttpRequest,MutationObserver',
62
+			'flags' => 'gated',
63
+		], 'https://polyfill.io/v3/polyfill.min.js'));
64
+	}
65 65
 
66
-    /**
67
-     * @return void
68
-     */
69
-    public function enqueueRecaptchaScript()
70
-    {
71
-        // wpforms-recaptcha
72
-        // google-recaptcha
73
-        // nf-google-recaptcha
74
-        if (!glsr(OptionManager::class)->isRecaptchaEnabled()) {
75
-            return;
76
-        }
77
-        $language = apply_filters('site-reviews/recaptcha/language', get_locale());
78
-        wp_enqueue_script(Application::ID.'/google-recaptcha', add_query_arg([
79
-            'hl' => $language,
80
-            'render' => 'explicit',
81
-        ], 'https://www.google.com/recaptcha/api.js'));
82
-    }
66
+	/**
67
+	 * @return void
68
+	 */
69
+	public function enqueueRecaptchaScript()
70
+	{
71
+		// wpforms-recaptcha
72
+		// google-recaptcha
73
+		// nf-google-recaptcha
74
+		if (!glsr(OptionManager::class)->isRecaptchaEnabled()) {
75
+			return;
76
+		}
77
+		$language = apply_filters('site-reviews/recaptcha/language', get_locale());
78
+		wp_enqueue_script(Application::ID.'/google-recaptcha', add_query_arg([
79
+			'hl' => $language,
80
+			'render' => 'explicit',
81
+		], 'https://www.google.com/recaptcha/api.js'));
82
+	}
83 83
 
84
-    /**
85
-     * @return void
86
-     */
87
-    public function inlineScript()
88
-    {
89
-        $variables = [
90
-            'action' => Application::PREFIX.'action',
91
-            'ajaxpagination' => $this->getFixedSelectorsForPagination(),
92
-            'ajaxurl' => admin_url('admin-ajax.php'),
93
-            'nameprefix' => Application::ID,
94
-            'validationconfig' => glsr(Style::class)->validation,
95
-            'validationstrings' => glsr(ValidationStringsDefaults::class)->defaults(),
96
-        ];
97
-        $variables = apply_filters('site-reviews/enqueue/public/localize', $variables);
98
-        wp_add_inline_script(Application::ID, $this->buildInlineScript($variables), 'before');
99
-    }
84
+	/**
85
+	 * @return void
86
+	 */
87
+	public function inlineScript()
88
+	{
89
+		$variables = [
90
+			'action' => Application::PREFIX.'action',
91
+			'ajaxpagination' => $this->getFixedSelectorsForPagination(),
92
+			'ajaxurl' => admin_url('admin-ajax.php'),
93
+			'nameprefix' => Application::ID,
94
+			'validationconfig' => glsr(Style::class)->validation,
95
+			'validationstrings' => glsr(ValidationStringsDefaults::class)->defaults(),
96
+		];
97
+		$variables = apply_filters('site-reviews/enqueue/public/localize', $variables);
98
+		wp_add_inline_script(Application::ID, $this->buildInlineScript($variables), 'before');
99
+	}
100 100
 
101
-    /**
102
-     * @return void
103
-     */
104
-    public function inlineStyles()
105
-    {
106
-        $inlineStylesheetPath = glsr()->path('assets/styles/inline-styles.css');
107
-        if (!apply_filters('site-reviews/assets/css', true)) {
108
-            return;
109
-        }
110
-        if (!file_exists($inlineStylesheetPath)) {
111
-            glsr_log()->error('Inline stylesheet is missing: '.$inlineStylesheetPath);
112
-            return;
113
-        }
114
-        $inlineStylesheetValues = glsr()->config('inline-styles');
115
-        $stylesheet = str_replace(
116
-            array_keys($inlineStylesheetValues),
117
-            array_values($inlineStylesheetValues),
118
-            file_get_contents($inlineStylesheetPath)
119
-        );
120
-        wp_add_inline_style(Application::ID, $stylesheet);
121
-    }
101
+	/**
102
+	 * @return void
103
+	 */
104
+	public function inlineStyles()
105
+	{
106
+		$inlineStylesheetPath = glsr()->path('assets/styles/inline-styles.css');
107
+		if (!apply_filters('site-reviews/assets/css', true)) {
108
+			return;
109
+		}
110
+		if (!file_exists($inlineStylesheetPath)) {
111
+			glsr_log()->error('Inline stylesheet is missing: '.$inlineStylesheetPath);
112
+			return;
113
+		}
114
+		$inlineStylesheetValues = glsr()->config('inline-styles');
115
+		$stylesheet = str_replace(
116
+			array_keys($inlineStylesheetValues),
117
+			array_values($inlineStylesheetValues),
118
+			file_get_contents($inlineStylesheetPath)
119
+		);
120
+		wp_add_inline_style(Application::ID, $stylesheet);
121
+	}
122 122
 
123
-    /**
124
-     * @return string
125
-     */
126
-    protected function buildInlineScript(array $variables)
127
-    {
128
-        $script = 'window.hasOwnProperty("GLSR")||(window.GLSR={});';
129
-        foreach ($variables as $key => $value) {
130
-            $script.= sprintf('GLSR.%s=%s;', $key, json_encode($value, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
131
-        }
132
-        $pattern = '/\"([^ \-\"]+)\"(:[{\[\"])/'; // removes unnecessary quotes surrounding object keys
133
-        $optimizedScript = preg_replace($pattern, '$1$2', $script);
134
-        return apply_filters('site-reviews/enqueue/public/inline-script', $optimizedScript, $script, $variables);
135
-    }
123
+	/**
124
+	 * @return string
125
+	 */
126
+	protected function buildInlineScript(array $variables)
127
+	{
128
+		$script = 'window.hasOwnProperty("GLSR")||(window.GLSR={});';
129
+		foreach ($variables as $key => $value) {
130
+			$script.= sprintf('GLSR.%s=%s;', $key, json_encode($value, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
131
+		}
132
+		$pattern = '/\"([^ \-\"]+)\"(:[{\[\"])/'; // removes unnecessary quotes surrounding object keys
133
+		$optimizedScript = preg_replace($pattern, '$1$2', $script);
134
+		return apply_filters('site-reviews/enqueue/public/inline-script', $optimizedScript, $script, $variables);
135
+	}
136 136
 
137
-    /**
138
-     * @return array
139
-     */
140
-    protected function getFixedSelectorsForPagination()
141
-    {
142
-        $selectors = ['#wpadminbar', '.site-navigation-fixed'];
143
-        return apply_filters('site-reviews/enqueue/public/localize/ajax-pagination', $selectors);
144
-    }
137
+	/**
138
+	 * @return array
139
+	 */
140
+	protected function getFixedSelectorsForPagination()
141
+	{
142
+		$selectors = ['#wpadminbar', '.site-navigation-fixed'];
143
+		return apply_filters('site-reviews/enqueue/public/localize/ajax-pagination', $selectors);
144
+	}
145 145
 
146
-    /**
147
-     * @return string
148
-     */
149
-    protected function getStylesheet()
150
-    {
151
-        $currentStyle = glsr(Style::class)->style;
152
-        return file_exists(glsr()->path('assets/styles/custom/'.$currentStyle.'.css'))
153
-            ? glsr()->url('assets/styles/custom/'.$currentStyle.'.css')
154
-            : glsr()->url('assets/styles/'.Application::ID.'.css');
155
-    }
146
+	/**
147
+	 * @return string
148
+	 */
149
+	protected function getStylesheet()
150
+	{
151
+		$currentStyle = glsr(Style::class)->style;
152
+		return file_exists(glsr()->path('assets/styles/custom/'.$currentStyle.'.css'))
153
+			? glsr()->url('assets/styles/custom/'.$currentStyle.'.css')
154
+			: glsr()->url('assets/styles/'.Application::ID.'.css');
155
+	}
156 156
 }
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public function enqueueAssets()
28 28
     {
29
-        if (apply_filters('site-reviews/assets/css', true)) {
29
+        if( apply_filters( 'site-reviews/assets/css', true ) ) {
30 30
             wp_enqueue_style(
31 31
                 Application::ID,
32 32
                 $this->getStylesheet(),
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
                 glsr()->version
35 35
             );
36 36
         }
37
-        if (apply_filters('site-reviews/assets/js', true)) {
38
-            $dependencies = apply_filters('site-reviews/assets/polyfill', true)
37
+        if( apply_filters( 'site-reviews/assets/js', true ) ) {
38
+            $dependencies = apply_filters( 'site-reviews/assets/polyfill', true )
39 39
                 ? [Application::ID.'/polyfill']
40 40
                 : [];
41
-            $dependencies = apply_filters('site-reviews/enqueue/public/dependencies', $dependencies);
41
+            $dependencies = apply_filters( 'site-reviews/enqueue/public/dependencies', $dependencies );
42 42
             wp_enqueue_script(
43 43
                 Application::ID,
44
-                glsr()->url('assets/scripts/'.Application::ID.'.js'),
44
+                glsr()->url( 'assets/scripts/'.Application::ID.'.js' ),
45 45
                 $dependencies,
46 46
                 glsr()->version,
47 47
                 true
@@ -54,13 +54,13 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function enqueuePolyfillService()
56 56
     {
57
-        if (!apply_filters('site-reviews/assets/polyfill', true)) {
57
+        if( !apply_filters( 'site-reviews/assets/polyfill', true ) ) {
58 58
             return;
59 59
         }
60
-        wp_enqueue_script(Application::ID.'/polyfill', add_query_arg([
60
+        wp_enqueue_script( Application::ID.'/polyfill', add_query_arg( [
61 61
             'features' => 'CustomEvent,Element.prototype.closest,Element.prototype.dataset,Event,XMLHttpRequest,MutationObserver',
62 62
             'flags' => 'gated',
63
-        ], 'https://polyfill.io/v3/polyfill.min.js'));
63
+        ], 'https://polyfill.io/v3/polyfill.min.js' ) );
64 64
     }
65 65
 
66 66
     /**
@@ -71,14 +71,14 @@  discard block
 block discarded – undo
71 71
         // wpforms-recaptcha
72 72
         // google-recaptcha
73 73
         // nf-google-recaptcha
74
-        if (!glsr(OptionManager::class)->isRecaptchaEnabled()) {
74
+        if( !glsr( OptionManager::class )->isRecaptchaEnabled() ) {
75 75
             return;
76 76
         }
77
-        $language = apply_filters('site-reviews/recaptcha/language', get_locale());
78
-        wp_enqueue_script(Application::ID.'/google-recaptcha', add_query_arg([
77
+        $language = apply_filters( 'site-reviews/recaptcha/language', get_locale() );
78
+        wp_enqueue_script( Application::ID.'/google-recaptcha', add_query_arg( [
79 79
             'hl' => $language,
80 80
             'render' => 'explicit',
81
-        ], 'https://www.google.com/recaptcha/api.js'));
81
+        ], 'https://www.google.com/recaptcha/api.js' ) );
82 82
     }
83 83
 
84 84
     /**
@@ -89,13 +89,13 @@  discard block
 block discarded – undo
89 89
         $variables = [
90 90
             'action' => Application::PREFIX.'action',
91 91
             'ajaxpagination' => $this->getFixedSelectorsForPagination(),
92
-            'ajaxurl' => admin_url('admin-ajax.php'),
92
+            'ajaxurl' => admin_url( 'admin-ajax.php' ),
93 93
             'nameprefix' => Application::ID,
94
-            'validationconfig' => glsr(Style::class)->validation,
95
-            'validationstrings' => glsr(ValidationStringsDefaults::class)->defaults(),
94
+            'validationconfig' => glsr( Style::class )->validation,
95
+            'validationstrings' => glsr( ValidationStringsDefaults::class )->defaults(),
96 96
         ];
97
-        $variables = apply_filters('site-reviews/enqueue/public/localize', $variables);
98
-        wp_add_inline_script(Application::ID, $this->buildInlineScript($variables), 'before');
97
+        $variables = apply_filters( 'site-reviews/enqueue/public/localize', $variables );
98
+        wp_add_inline_script( Application::ID, $this->buildInlineScript( $variables ), 'before' );
99 99
     }
100 100
 
101 101
     /**
@@ -103,35 +103,35 @@  discard block
 block discarded – undo
103 103
      */
104 104
     public function inlineStyles()
105 105
     {
106
-        $inlineStylesheetPath = glsr()->path('assets/styles/inline-styles.css');
107
-        if (!apply_filters('site-reviews/assets/css', true)) {
106
+        $inlineStylesheetPath = glsr()->path( 'assets/styles/inline-styles.css' );
107
+        if( !apply_filters( 'site-reviews/assets/css', true ) ) {
108 108
             return;
109 109
         }
110
-        if (!file_exists($inlineStylesheetPath)) {
111
-            glsr_log()->error('Inline stylesheet is missing: '.$inlineStylesheetPath);
110
+        if( !file_exists( $inlineStylesheetPath ) ) {
111
+            glsr_log()->error( 'Inline stylesheet is missing: '.$inlineStylesheetPath );
112 112
             return;
113 113
         }
114
-        $inlineStylesheetValues = glsr()->config('inline-styles');
114
+        $inlineStylesheetValues = glsr()->config( 'inline-styles' );
115 115
         $stylesheet = str_replace(
116
-            array_keys($inlineStylesheetValues),
117
-            array_values($inlineStylesheetValues),
118
-            file_get_contents($inlineStylesheetPath)
116
+            array_keys( $inlineStylesheetValues ),
117
+            array_values( $inlineStylesheetValues ),
118
+            file_get_contents( $inlineStylesheetPath )
119 119
         );
120
-        wp_add_inline_style(Application::ID, $stylesheet);
120
+        wp_add_inline_style( Application::ID, $stylesheet );
121 121
     }
122 122
 
123 123
     /**
124 124
      * @return string
125 125
      */
126
-    protected function buildInlineScript(array $variables)
126
+    protected function buildInlineScript( array $variables )
127 127
     {
128 128
         $script = 'window.hasOwnProperty("GLSR")||(window.GLSR={});';
129
-        foreach ($variables as $key => $value) {
130
-            $script.= sprintf('GLSR.%s=%s;', $key, json_encode($value, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
129
+        foreach( $variables as $key => $value ) {
130
+            $script .= sprintf( 'GLSR.%s=%s;', $key, json_encode( $value, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ) );
131 131
         }
132 132
         $pattern = '/\"([^ \-\"]+)\"(:[{\[\"])/'; // removes unnecessary quotes surrounding object keys
133
-        $optimizedScript = preg_replace($pattern, '$1$2', $script);
134
-        return apply_filters('site-reviews/enqueue/public/inline-script', $optimizedScript, $script, $variables);
133
+        $optimizedScript = preg_replace( $pattern, '$1$2', $script );
134
+        return apply_filters( 'site-reviews/enqueue/public/inline-script', $optimizedScript, $script, $variables );
135 135
     }
136 136
 
137 137
     /**
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     protected function getFixedSelectorsForPagination()
141 141
     {
142 142
         $selectors = ['#wpadminbar', '.site-navigation-fixed'];
143
-        return apply_filters('site-reviews/enqueue/public/localize/ajax-pagination', $selectors);
143
+        return apply_filters( 'site-reviews/enqueue/public/localize/ajax-pagination', $selectors );
144 144
     }
145 145
 
146 146
     /**
@@ -148,9 +148,9 @@  discard block
 block discarded – undo
148 148
      */
149 149
     protected function getStylesheet()
150 150
     {
151
-        $currentStyle = glsr(Style::class)->style;
152
-        return file_exists(glsr()->path('assets/styles/custom/'.$currentStyle.'.css'))
153
-            ? glsr()->url('assets/styles/custom/'.$currentStyle.'.css')
154
-            : glsr()->url('assets/styles/'.Application::ID.'.css');
151
+        $currentStyle = glsr( Style::class )->style;
152
+        return file_exists( glsr()->path( 'assets/styles/custom/'.$currentStyle.'.css' ) )
153
+            ? glsr()->url( 'assets/styles/custom/'.$currentStyle.'.css' )
154
+            : glsr()->url( 'assets/styles/'.Application::ID.'.css' );
155 155
     }
156 156
 }
Please login to merge, or discard this patch.
autoload.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -5,23 +5,23 @@
 block discarded – undo
5 5
 require_once ABSPATH.WPINC.'/class-phpass.php';
6 6
 
7 7
 spl_autoload_register(function ($className) {
8
-    $namespaces = [
9
-        'GeminiLabs\\SiteReviews\\' => __DIR__.'/plugin/',
10
-        'GeminiLabs\\SiteReviews\\Tests\\' => __DIR__.'/tests/',
11
-        'GeminiLabs\\Sepia\\PoParser\\' => __DIR__.'/vendors/sepia/po-parser/',
12
-        'GeminiLabs\\Sinergi\\BrowserDetector\\' => __DIR__.'/vendors/sinergi/browser-detector/',
13
-        'GeminiLabs\\Vectorface\\Whip\\' => __DIR__.'/vendors/vectorface/whip/',
14
-    ];
15
-    foreach ($namespaces as $prefix => $baseDir) {
16
-        $len = strlen($prefix);
17
-        if (0 !== strncmp($prefix, $className, $len)) {
18
-            continue;
19
-        }
20
-        $file = $baseDir.str_replace('\\', '/', substr($className, $len)).'.php';
21
-        if (!file_exists($file)) {
22
-            continue;
23
-        }
24
-        require $file;
25
-        break;
26
-    }
8
+	$namespaces = [
9
+		'GeminiLabs\\SiteReviews\\' => __DIR__.'/plugin/',
10
+		'GeminiLabs\\SiteReviews\\Tests\\' => __DIR__.'/tests/',
11
+		'GeminiLabs\\Sepia\\PoParser\\' => __DIR__.'/vendors/sepia/po-parser/',
12
+		'GeminiLabs\\Sinergi\\BrowserDetector\\' => __DIR__.'/vendors/sinergi/browser-detector/',
13
+		'GeminiLabs\\Vectorface\\Whip\\' => __DIR__.'/vendors/vectorface/whip/',
14
+	];
15
+	foreach ($namespaces as $prefix => $baseDir) {
16
+		$len = strlen($prefix);
17
+		if (0 !== strncmp($prefix, $className, $len)) {
18
+			continue;
19
+		}
20
+		$file = $baseDir.str_replace('\\', '/', substr($className, $len)).'.php';
21
+		if (!file_exists($file)) {
22
+			continue;
23
+		}
24
+		require $file;
25
+		break;
26
+	}
27 27
 });
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-defined('WPINC') || die;
3
+defined( 'WPINC' ) || die;
4 4
 
5 5
 require_once ABSPATH.WPINC.'/class-phpass.php';
6 6
 
7
-spl_autoload_register(function ($className) {
7
+spl_autoload_register( function( $className ) {
8 8
     $namespaces = [
9 9
         'GeminiLabs\\SiteReviews\\' => __DIR__.'/plugin/',
10 10
         'GeminiLabs\\SiteReviews\\Tests\\' => __DIR__.'/tests/',
@@ -12,13 +12,13 @@  discard block
 block discarded – undo
12 12
         'GeminiLabs\\Sinergi\\BrowserDetector\\' => __DIR__.'/vendors/sinergi/browser-detector/',
13 13
         'GeminiLabs\\Vectorface\\Whip\\' => __DIR__.'/vendors/vectorface/whip/',
14 14
     ];
15
-    foreach ($namespaces as $prefix => $baseDir) {
16
-        $len = strlen($prefix);
17
-        if (0 !== strncmp($prefix, $className, $len)) {
15
+    foreach( $namespaces as $prefix => $baseDir ) {
16
+        $len = strlen( $prefix );
17
+        if( 0 !== strncmp( $prefix, $className, $len ) ) {
18 18
             continue;
19 19
         }
20
-        $file = $baseDir.str_replace('\\', '/', substr($className, $len)).'.php';
21
-        if (!file_exists($file)) {
20
+        $file = $baseDir.str_replace( '\\', '/', substr( $className, $len ) ).'.php';
21
+        if( !file_exists( $file ) ) {
22 22
             continue;
23 23
         }
24 24
         require $file;
Please login to merge, or discard this patch.
compatibility.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
  * @see https://www.elegantthemes.com/gallery/divi/
9 9
  */
10 10
 add_action('site-reviews/customize/divi', function ($instance) {
11
-    if ('label' != $instance->tag || 'checkbox' != $instance->args['type']) {
12
-        return;
13
-    }
14
-    $instance->args['text'] = '<i></i>'.$instance->args['text'];
11
+	if ('label' != $instance->tag || 'checkbox' != $instance->args['type']) {
12
+		return;
13
+	}
14
+	$instance->args['text'] = '<i></i>'.$instance->args['text'];
15 15
 });
16 16
 
17 17
 /*
@@ -22,14 +22,14 @@  discard block
 block discarded – undo
22 22
  * @see https://wordpress.org/plugins/wp-super-cache/
23 23
  */
24 24
 add_action('site-reviews/review/created', function ($review, $request) {
25
-    if (!function_exists('wp_cache_post_change')) {
26
-        return;
27
-    }
28
-    wp_cache_post_change($request->post_id);
29
-    if (empty($review->assigned_to) || $review->assigned_to == $request->post_id) {
30
-        return;
31
-    }
32
-    wp_cache_post_change($review->assigned_to);
25
+	if (!function_exists('wp_cache_post_change')) {
26
+		return;
27
+	}
28
+	wp_cache_post_change($request->post_id);
29
+	if (empty($review->assigned_to) || $review->assigned_to == $request->post_id) {
30
+		return;
31
+	}
32
+	wp_cache_post_change($review->assigned_to);
33 33
 }, 10, 2);
34 34
 
35 35
 /*
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
  * @see https://wordpress.org/plugins/speed-booster-pack/
39 39
  */
40 40
 add_filter('sbp_exclude_defer_scripts', function ($scriptHandles) {
41
-    $scriptHandles[] = 'site-reviews/google-recaptcha';
42
-    return array_keys(array_flip($scriptHandles));
41
+	$scriptHandles[] = 'site-reviews/google-recaptcha';
42
+	return array_keys(array_flip($scriptHandles));
43 43
 });
44 44
 
45 45
 /*
@@ -49,13 +49,13 @@  discard block
 block discarded – undo
49 49
  * @see https://searchandfilter.com/
50 50
  */
51 51
 add_filter('sf_edit_query_args', function ($query) {
52
-    if (!empty($query['meta_key']) && '_glsr_ranking' == $query['meta_key']) {
53
-        unset($query['meta_key']);
54
-        $query['meta_query'] = [
55
-            'relation' => 'OR',
56
-            ['key' => '_glsr_ranking', 'compare' => 'NOT EXISTS'], // this comes first!
57
-            ['key' => '_glsr_ranking', 'compare' => 'EXISTS'],
58
-        ];
59
-    }
60
-    return $query;
52
+	if (!empty($query['meta_key']) && '_glsr_ranking' == $query['meta_key']) {
53
+		unset($query['meta_key']);
54
+		$query['meta_query'] = [
55
+			'relation' => 'OR',
56
+			['key' => '_glsr_ranking', 'compare' => 'NOT EXISTS'], // this comes first!
57
+			['key' => '_glsr_ranking', 'compare' => 'EXISTS'],
58
+		];
59
+	}
60
+	return $query;
61 61
 }, 20);
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-defined('WPINC') || die;
3
+defined( 'WPINC' ) || die;
4 4
 
5 5
 /*
6 6
  * @param \GeminiLabs\SiteReviews\Modules\Html\Builder $instance
7 7
  * @return void
8 8
  * @see https://www.elegantthemes.com/gallery/divi/
9 9
  */
10
-add_action('site-reviews/customize/divi', function ($instance) {
11
-    if ('label' != $instance->tag || 'checkbox' != $instance->args['type']) {
10
+add_action( 'site-reviews/customize/divi', function( $instance ) {
11
+    if( 'label' != $instance->tag || 'checkbox' != $instance->args['type'] ) {
12 12
         return;
13 13
     }
14 14
     $instance->args['text'] = '<i></i>'.$instance->args['text'];
@@ -21,25 +21,25 @@  discard block
 block discarded – undo
21 21
  * @return void
22 22
  * @see https://wordpress.org/plugins/wp-super-cache/
23 23
  */
24
-add_action('site-reviews/review/created', function ($review, $request) {
25
-    if (!function_exists('wp_cache_post_change')) {
24
+add_action( 'site-reviews/review/created', function( $review, $request ) {
25
+    if( !function_exists( 'wp_cache_post_change' ) ) {
26 26
         return;
27 27
     }
28
-    wp_cache_post_change($request->post_id);
29
-    if (empty($review->assigned_to) || $review->assigned_to == $request->post_id) {
28
+    wp_cache_post_change( $request->post_id );
29
+    if( empty($review->assigned_to) || $review->assigned_to == $request->post_id ) {
30 30
         return;
31 31
     }
32
-    wp_cache_post_change($review->assigned_to);
33
-}, 10, 2);
32
+    wp_cache_post_change( $review->assigned_to );
33
+}, 10, 2 );
34 34
 
35 35
 /*
36 36
  * @param array $scriptHandles
37 37
  * @return array
38 38
  * @see https://wordpress.org/plugins/speed-booster-pack/
39 39
  */
40
-add_filter('sbp_exclude_defer_scripts', function ($scriptHandles) {
40
+add_filter( 'sbp_exclude_defer_scripts', function( $scriptHandles ) {
41 41
     $scriptHandles[] = 'site-reviews/google-recaptcha';
42
-    return array_keys(array_flip($scriptHandles));
42
+    return array_keys( array_flip( $scriptHandles ) );
43 43
 });
44 44
 
45 45
 /*
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
  * @return array
49 49
  * @see https://searchandfilter.com/
50 50
  */
51
-add_filter('sf_edit_query_args', function ($query) {
52
-    if (!empty($query['meta_key']) && '_glsr_ranking' == $query['meta_key']) {
51
+add_filter( 'sf_edit_query_args', function( $query ) {
52
+    if( !empty($query['meta_key']) && '_glsr_ranking' == $query['meta_key'] ) {
53 53
         unset($query['meta_key']);
54 54
         $query['meta_query'] = [
55 55
             'relation' => 'OR',
@@ -58,4 +58,4 @@  discard block
 block discarded – undo
58 58
         ];
59 59
     }
60 60
     return $query;
61
-}, 20);
61
+}, 20 );
Please login to merge, or discard this patch.