Skip to content

Commit d5f2110

Browse files
committed
PCP Check
Signed-off-by: Kev Provance <kevin.provance@gmail.com>
1 parent b09e610 commit d5f2110

File tree

74 files changed

+143
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+143
-7
lines changed

class-redux-framework-plugin.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ public static function instance(): ?Redux_Framework_Plugin {
8484
$res = version_compare( $data['Version'], '4', '<' );
8585
}
8686

87-
// if ( is_plugin_active( 'redux-framework/redux-framework.php' ) && true === $res ) {
8887
if ( true === $res && ! in_array( 'redux-framework/redux-framework.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ), true ) ) {
8988
echo '<div class="error"><p>' . esc_html__( 'Redux Framework version 4 is activated but not loaded. Redux Framework version 3 is still installed and activated. Please deactivate Redux Framework version 3.', 'redux-framework' ) . '</p></div>'; // phpcs:ignore WordPress.Security.EscapeOutput
9089
return null;
@@ -322,7 +321,7 @@ private static function get_blog_ids() {
322321
if ( false === $result ) {
323322

324323
// WordPress says get_col is discouraged? I found no alternative. So...ignore! - kp.
325-
324+
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
326325
$result = $wpdb->get_col( $wpdb->prepare( "SELECT blog_id FROM $wpdb->blogs WHERE archived = %s AND spam = %s AND deleted = %s", $var, $var, $var ) );
327326

328327
wp_cache_set( 'redux-blog-ids', $result );

redux-core/inc/classes/class-redux-page-render.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,7 @@ public function section_menu( $k, array $section, string $suffix = '', array $se
10261026

10271027
$string = '';
10281028
if ( ( ( isset( $core->args['icon_type'] ) && 'image' === $core->args['icon_type'] ) || ( isset( $section['icon_type'] ) && 'image' === $section['icon_type'] ) ) || ( isset( $section['icon'] ) && false !== strpos( $section['icon'], '/' ) ) ) {
1029+
// phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- No image/icon to enqueue.
10291030
$icon = ( ! isset( $section['icon'] ) ) ? '' : '<img class="image_icon_type" src="' . esc_url( $section['icon'] ) . '" /> ';
10301031
} else {
10311032
if ( ! empty( $section['icon_class'] ) ) {
@@ -1096,6 +1097,7 @@ public function section_menu( $k, array $section, string $suffix = '', array $se
10961097
}
10971098

10981099
if ( ( isset( $core->args['icon_type'] ) && 'image' === $core->args['icon_type'] ) || ( isset( $sections[ $next_k ]['icon_type'] ) && 'image' === $sections[ $next_k ]['icon_type'] ) ) {
1100+
// phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- No image/icon to enqueue.
10991101
$icon = ( ! isset( $sections[ $next_k ]['icon'] ) ) ? '' : '<img class="image_icon_type" src="' . esc_url( $sections[ $next_k ]['icon'] ) . '" /> ';
11001102
} else {
11011103
if ( ! empty( $sections[ $next_k ]['icon_class'] ) ) {

redux-core/inc/classes/class-redux-php.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static function php_version_nope() {
4141
wp_kses(
4242
sprintf(
4343
/* translators: 1: Redux Framework, 2: Required PHP version number, 3: Current PHP version number, 4: URL of PHP update help page */
44-
__( 'The %1$s plugin requires PHP version %2$s or higher. This site is running PHP version %3$s. The theme/plugin that relies on Redux will not run properly without a PHP update. <a href="%4$s">Learn about updating PHP</a>.', 'query-monitor' ),
44+
__( 'The %1$s plugin requires PHP version %2$s or higher. This site is running PHP version %3$s. The theme/plugin that relies on Redux will not run properly without a PHP update. <a href="%4$s">Learn about updating PHP</a>.', 'redux-framework' ),
4545
'Redux Framework',
4646
'<strong>7.4.0</strong>',
4747
'<strong>' . PHP_VERSION . '</strong>',

redux-core/inc/extensions/color_scheme/color_scheme/class-redux-color-scheme.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ public function render() {
105105

106106
// Waiting message.
107107
echo '<div id="redux-' . esc_attr( $field_id ) . '-scheme-wait-message" style="display:none;">';
108+
// phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- Icon hard coded for project.
108109
echo ' <h1><img alt="Please wait..." src="' . esc_url( $this->url ) . 'img/busy.gif" /> Please wait...</h1>';
109110
echo '</div>';
110111

redux-core/inc/extensions/icon_select/icon_select/class-redux-icon-select.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public function __construct( $field = array(), $value = '', $redux = object ) {
6363
'class' => $this->field['prefix'],
6464
'title' => basename( $this->field['stylesheet'] ),
6565
'icons' => $this->field['options'],
66+
// phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Not a WPQuery.
6667
'exclude' => $this->field['exclude_icons'],
6768
);
6869

@@ -79,10 +80,11 @@ public function __construct( $field = array(), $value = '', $redux = object ) {
7980
}
8081

8182
foreach ( $arr as $idx => $val ) {
82-
$val['url'] = ! empty( $val['url'] ) ? $val['url'] : '';
83-
$val['title'] = ! empty( $val['title'] ) ? $val['title'] : basename( $val['url'] );
84-
$val['class'] = ! empty( $val['prefix'] ) ? $val['prefix'] : '';
85-
$val['icons'] = ! empty( $val['icons'] ) ? $val['icons'] : array();
83+
$val['url'] = ! empty( $val['url'] ) ? $val['url'] : '';
84+
$val['title'] = ! empty( $val['title'] ) ? $val['title'] : basename( $val['url'] );
85+
$val['class'] = ! empty( $val['prefix'] ) ? $val['prefix'] : '';
86+
$val['icons'] = ! empty( $val['icons'] ) ? $val['icons'] : array();
87+
// phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Not a WPQuery.
8688
$val['exclude'] = ! empty( $val['exclude'] ) ? $val['exclude'] : '';
8789
$val['regex'] = ! empty( $val['regex'] ) ? $val['regex'] : '';
8890

@@ -145,9 +147,12 @@ public function __construct( $field = array(), $value = '', $redux = object ) {
145147
$regex_arr = array( '/.([\w-]+):{2}before{content/mi', '/.([\w-]+):{2}before { content/mi', '/.([\w-]+):{1}before{content:/mi', '/.([\w-]+):{1}before { content:/mi' );
146148

147149
if ( ! is_array( $sub_arr['exclude'] ) ) {
150+
// phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Not a WPQuery.
148151
if ( empty( $sub_arr['exclude'] ) ) {
152+
// phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Not a WPQuery.
149153
$sub_arr['exclude'] = array();
150154
} else {
155+
// phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Not a WPQuery.
151156
$sub_arr['exclude'] = array( $sub_arr['exclude'] );
152157
}
153158
}

redux-core/inc/fields/image_select/class-redux-image-select.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ public function render() {
165165
if ( ! empty( $this->field['tiles'] ) && true === $this->field['tiles'] ) {
166166
echo '<span class="tiles ' . esc_attr( $v['class'] ) . '" style="background-image: url(' . esc_url( $v['img'] ) . ');" rel="' . esc_url( $v['img'] ) . '"">&nbsp;</span>';
167167
} else {
168+
// phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- No image/icon to enqueue.
168169
echo '<img src="' . esc_url( $v['img'] ) . '" title="' . esc_attr( $v['alt'] ) . '" alt="' . esc_attr( $v['alt'] ) . '" class="' . esc_attr( $v['class'] ) . '" style="' . esc_attr( $style ) . '"' . esc_attr( $presets ) . esc_attr( $merge ) . ' />';
169170
}
170171

redux-core/inc/fields/select_image/class-redux-select-image.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,10 @@ class="redux-select-item redux-select-images ' . esc_attr( $this->field['class']
132132
// subtract one from the saved array number. We then pull the url
133133
// out of the options array, and there we go.
134134
if ( '' === $this->value ) {
135+
// phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- No image/icon to enqueue.
135136
echo '<img src="#" class="redux-preview-image" style="visibility:hidden;" id="image_' . esc_attr( $this->field['id'] ) . '">';
136137
} else {
138+
// phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- No image/icon to enqueue.
137139
echo '<img src=' . esc_url( $this->value ) . ' class="redux-preview-image" id="image_' . esc_attr( $this->field['id'] ) . '">';
138140
}
139141

sample/barebones-config.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @package Redux Framework
77
*/
88

9+
// phpcs:disabled
910
if ( ! class_exists( 'Redux' ) ) {
1011
return null;
1112
}
@@ -332,3 +333,4 @@
332333
/*
333334
* <--- END SECTIONS
334335
*/
336+
// phpcs:enable

sample/metaboxes.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* @noinspection PhpUndefinedVariableInspection
99
*/
1010

11+
// phpcs:disable
1112
defined( 'ABSPATH' ) || exit;
1213

1314
if ( ! class_exists( 'Redux_Metaboxes' ) ) {
@@ -225,3 +226,4 @@
225226
),
226227
)
227228
);
229+
// phpcs:enable

sample/sample-config.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @package Redux Framework
77
*/
88

9+
// phpcs:disable
910
defined( 'ABSPATH' ) || exit;
1011

1112
if ( ! class_exists( 'Redux' ) ) {
@@ -758,3 +759,4 @@ function redux_custom_sanitize( string $value ): string {
758759
return $return;
759760
}
760761
}
762+
// phpcs:enable

sample/sections/additional-types/date-time-picker.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* @package Redux
88
*/
99

10+
// phpcs:disable
1011
defined( 'ABSPATH' ) || exit;
1112

1213
Redux::set_section(
@@ -90,3 +91,4 @@
9091
),
9192
)
9293
);
94+
// phpcs:enable

sample/sections/additional-types/date.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @package Redux Framework
77
*/
88

9+
// phpcs:disable
910
defined( 'ABSPATH' ) || exit;
1011

1112
Redux::set_section(
@@ -26,3 +27,4 @@
2627
),
2728
)
2829
);
30+
// phpcs:enable

sample/sections/additional-types/raw.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @package Redux Framework
77
*/
88

9+
// phpcs:disable
910
defined( 'ABSPATH' ) || exit;
1011

1112
$sample_html = '';
@@ -43,3 +44,4 @@
4344
),
4445
)
4546
);
47+
// phpcs:enable

sample/sections/additional-types/sorter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @package Redux Framework
77
*/
88

9+
// phpcs:disable
910
defined( 'ABSPATH' ) || exit;
1011

1112
Redux::set_section(
@@ -57,3 +58,4 @@
5758
),
5859
)
5960
);
61+
// phpcs:enable

sample/sections/advanced-features/callback.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @package Redux Framework
77
*/
88

9+
// phpcs:disable
910
defined( 'ABSPATH' ) || exit;
1011

1112
Redux::set_section(
@@ -41,3 +42,4 @@ function redux_my_custom_field( array $field, $value ) {
4142
print_r( $value ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions
4243
}
4344
}
45+
// phpcs:enable

sample/sections/advanced-features/field-required-linking.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @package Redux Framework
77
*/
88

9+
// phpcs:disable
910
defined( 'ABSPATH' ) || exit;
1011

1112
Redux::set_section(
@@ -116,3 +117,4 @@
116117
),
117118
)
118119
);
120+
// phpcs:enable

sample/sections/advanced-features/field-sanitizing.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @package Redux Framework
77
*/
88

9+
// phpcs:disable
910
defined( 'ABSPATH' ) || exit;
1011

1112
Redux::set_section(
@@ -47,3 +48,4 @@
4748
),
4849
)
4950
);
51+
// phpcs:enable

sample/sections/advanced-features/field-validation.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @package Redux Framework
77
*/
88

9+
// phpcs:disable
910
defined( 'ABSPATH' ) || exit;
1011

1112
Redux::set_section(
@@ -162,3 +163,4 @@
162163
),
163164
)
164165
);
166+
// phpcs:enable

sample/sections/advanced-features/wpml-integration.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @package Redux Framework
77
*/
88

9+
// phpcs:disable
910
defined( 'ABSPATH' ) || exit;
1011

1112
Redux::set_section(
@@ -35,3 +36,4 @@
3536
),
3637
)
3738
);
39+
// phpcs:enable

sample/sections/basic-fields/checkbox.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @package Redux Framework
77
*/
88

9+
// phpcs:disable
910
defined( 'ABSPATH' ) || exit;
1011

1112
Redux::set_section(
@@ -63,3 +64,4 @@
6364
),
6465
)
6566
);
67+
// phpcs:enable

sample/sections/basic-fields/multi-text.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @package Redux Framework
77
*/
88

9+
// phpcs:disable
910
defined( 'ABSPATH' ) || exit;
1011

1112
Redux::set_section(
@@ -26,3 +27,4 @@
2627
),
2728
)
2829
);
30+
// phpcs:enable

sample/sections/basic-fields/password.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @package Redux Framework
77
*/
88

9+
// phpcs:disable
910
defined( 'ABSPATH' ) || exit;
1011

1112
Redux::set_section(
@@ -25,3 +26,4 @@
2526
),
2627
)
2728
);
29+
// phpcs:enable

sample/sections/basic-fields/radio.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @package Redux Framework
77
*/
88

9+
// phpcs:disable
910
defined( 'ABSPATH' ) || exit;
1011

1112
Redux::set_section(
@@ -43,3 +44,4 @@
4344
),
4445
)
4546
);
47+
// phpcs:enable

sample/sections/basic-fields/sortable.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @package Redux Framework
77
*/
88

9+
// phpcs:disable
910
defined( 'ABSPATH' ) || exit;
1011

1112
Redux::set_section(
@@ -50,3 +51,4 @@
5051
),
5152
)
5253
);
54+
// phpcs:enable

sample/sections/basic-fields/text.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @package Redux Framework
77
*/
88

9+
// phpcs:disable
910
defined( 'ABSPATH' ) || exit;
1011

1112
Redux::set_section(
@@ -55,3 +56,4 @@
5556
),
5657
)
5758
);
59+
// phpcs:enable

sample/sections/basic-fields/textarea.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @package Redux Framework
77
*/
88

9+
// phpcs:disable
910
defined( 'ABSPATH' ) || exit;
1011

1112
Redux::set_section(
@@ -27,3 +28,4 @@
2728
),
2829
)
2930
);
31+
// phpcs:enable

sample/sections/color-selection/color-gradient.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @package Redux Framework
77
*/
88

9+
// phpcs:disable
910
defined( 'ABSPATH' ) || exit;
1011

1112
Redux::set_section(
@@ -39,3 +40,4 @@
3940
),
4041
)
4142
);
43+
// phpcs:enable

sample/sections/color-selection/color-palette.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* @package Redux
88
*/
99

10+
// phpcs:disable
1011
defined( 'ABSPATH' ) || exit;
1112

1213
Redux::set_section(
@@ -97,3 +98,4 @@
9798
),
9899
)
99100
);
101+
// phpcs:enable

sample/sections/color-selection/color-rgba.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @package Redux Framework
77
*/
88

9+
// phpcs:disable
910
defined( 'ABSPATH' ) || exit;
1011

1112
Redux::set_section(
@@ -33,3 +34,4 @@
3334
),
3435
)
3536
);
37+
// phpcs:enable

0 commit comments

Comments
 (0)