$args['breadcrumbs'] ?? [], 'suffix' => $args['suffix'] ?? '', 'claim_url' => ! \SureCart::account()->claimed ? \SureCart::routeUrl( 'account.claim' ) : '', 'claim_expired' => \SureCart::account()->claim_expired ?? false, 'report_url' => $args['report_url'] ?? '', 'enhanced_view_promo' => $args['enhanced_view_promo'] ?? null, 'hidden' => $args['hidden'] ?? false, // A client-side swap can land any unified page here, so menuSync.js needs the slots. 'swappable' => in_array( $page, AdminPageRegistry::UNIFIED_SPA_PAGES, true ), ] ); } ); } /** * Add notices. * * @param array $items The notices. * * @return void */ public function withNotices( $items ) { add_action( 'admin_notices', function () use ( $items ) { foreach ( $items as $key => $item ) { if ( (bool) ( $_REQUEST[ $key ] ?? false ) ) { ?>