'', 'screen' => get_current_screen(), ] ); extract( $args, EXTR_SKIP ); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract include ADPRESSO_PATH . 'views/admin/ui/header.php'; } /** * Check if the current screen is relevant for this screen. * * @param WP_Screen $current_screen * * @return bool */ public function is_relevant_for( WP_Screen $current_screen ): bool { // Checks if the screen is registered for a specific post type and the current screen matches. if ( $this->associated_post_type && isset( $current_screen->post_type ) && $current_screen->post_type === $this->associated_post_type ) { return true; } // Checks if the screen is registered for a specific hook, e.g. settings page. if ( ! $this->associated_post_type && $this->hook && isset( $current_screen->id ) && $current_screen->id === $this->hook ) { return true; } return false; } }