Skip to content

Commit 94f44dd

Browse files
committed
We don't need to sanitize this prior to WP 4.2
1 parent 049df20 commit 94f44dd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

class.jetpack-modules-list-table.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ function __construct() {
1010

1111
Jetpack::init();
1212

13-
// WP_List_Table is now sanitizing which values are __set(), so we must add all_items to compatible fields.
14-
array_push( $this->compat_fields, 'all_items' );
13+
// In WP 4.2 WP_List_Table will be sanitizing which values are __set()
14+
global $wp_version;
15+
if ( version_compare( $wp_version, '4.2-z', '>=' ) ) {
16+
array_push( $this->compat_fields, 'all_items' );
17+
}
1518

1619
$this->items = $this->all_items = Jetpack_Admin::init()->get_modules();
1720
$this->items = $this->filter_displayed_table_items( $this->items );

0 commit comments

Comments
 (0)