__( 'Migration', 'xspeed' ), 'icon' => 'Import', 'description' => __( 'Import settings from WP Rocket, W3 Total Cache, or WP Super Cache.', 'xspeed' ), 'custom_panel' => 'MigrationPanel', ); } public function settings_schema(): array { return array(); } /** * Per-user meta key recording which detected source the user dismissed * the migration notice for. Keyed by source so dismissing the LiteSpeed * prompt doesn't hide a later WP Rocket prompt. */ private const DISMISS_META = 'xspeed_migration_notice_dismissed'; /** Query arg used by the one-click dismiss link. */ private const DISMISS_ARG = 'xspeed_dismiss_migration'; /** * Per-user list of source ids the user has already SEEN (by opening the * Migration panel). Seen sources don't count toward the sidebar badge — * the badge means "new importable plugins you haven't looked at yet", so * it clears once the user visits the page. A plugin installed LATER is * still un-seen, so it re-badges. */ private const SEEN_META = 'xspeed_migration_seen_sources'; public function boot(): void { // Dashboard nudge: when another caching plugin is detected, offer a // one-click import — the same "we noticed you use X" prompt other // plugins show. Renders on standard WP admin screens (NOT xSpeed's // own pages, where the Migration panel already covers it). /* * Priority 1 put this ABOVE everything, including the page title. * * On plugins.php (and most core screens) `admin_notices` fires before * the `.wrap` div and the
' . esc_html( sprintf( /* translators: %s: brand name, e.g. xSpeed Cache. */ __( '%s imports your settings in one click, then handles caching and optimization with AI-powered control.', 'xspeed' ), $brand ) ) . '
'; if ( null !== $single ) { $mapped = (int) ( $single['mapped_count'] ?? 0 ); echo ''; } else { echo ''; } echo '