Plugin Directory

Changeset 3343611


Ignore:
Timestamp:
08/12/2025 01:59:00 PM (7 months ago)
Author:
xfive
Message:

fix admin page detection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • xfive-sentry-integration/trunk/inc/Helper/PluginHelpers.php

    r3343524 r3343611  
    104104    public static function is_admin_area() {
    105105        if ( is_admin() ) {
    106             global $current_screen;
     106            $page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : ''; // phpcs:ignore -- verified by wp.
    107107
    108             $id = isset( $current_screen->id ) ? $current_screen->id : '';
    109 
    110             return $id !== 'settings_page_' . XFIVE_SENTRY_SLUG;
     108            return $page !== XFIVE_SENTRY_SLUG;
    111109        }
    112110
Note: See TracChangeset for help on using the changeset viewer.