Skip to content

Commit

Permalink
code review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidsector9 committed Oct 4, 2023
1 parent 1073914 commit a34488b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion simple-page-ordering.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,12 @@ public static function load_edit_screen() {
* @param WP_Query $query The WP_Query instance (passed by reference).
*/
public static function filter_query( $query ) {
$is_simple_page_ordering = isset( $_GET['id'] ) ? 'simple-page-ordering' === sanitize_text_field( wp_unslash( $_GET['id'] ) ) : false;
if ( ! $query->is_main_query() ) {
return;
}

// phpcs:ignore WordPress.Security.NonceVerification.Recommended
$is_simple_page_ordering = isset( $_GET['id'] ) ? 'simple-page-ordering' === $_GET['id'] : false;

if ( ! $is_simple_page_ordering ) {
return;
Expand Down

0 comments on commit a34488b

Please sign in to comment.