| @@ -14,8 +14,15 @@ | ||
| 14 | 14 | const PAGE_SLUG = 'xspeed'; |
| 15 | 15 | |
| 16 | 16 | const THEME_COOKIE = 'xspeed_theme'; |
| 17 | 17 | |
| 18 | + /** | |
| 19 | + * The dashboard's sidebar offer reads a module's `purchase_needed` before | |
| 20 | + * its `status_label`. An add-on checks for this constant before it labels | |
| 21 | + * a setup step, which an older dashboard would read as "still for sale". | |
| 22 | + */ | |
| 23 | + const OFFER_READS_PURCHASE_NEEDED = true; | |
| 24 | + | |
| 18 | 25 | public function __construct() { |
| 19 | 26 | add_action( 'admin_menu', array( $this, 'register_menu' ) ); |
| 20 | 27 | add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) ); |
| 21 | 28 | add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_menu_styles' ) ); |
| @@ -434,8 +441,12 @@ | ||
| 434 | 441 | // Pro), so Pro filters this via `xspeed_pro_state`. Default: |
| 435 | 442 | // not_installed when Pro is absent; 'active' when Pro is present |
| 436 | 443 | // (Pro downgrades to 'unlicensed' when its license isn't valid). |
| 437 | 444 | 'proState' => self::pro_state(), |
| 445 | + // The xCloud purge plugin is here: the site already has | |
| 446 | + // Cloudflare Enterprise from its host, so the dashboard does | |
| 447 | + // not offer the add-on. | |
| 448 | + 'xcloudPurgePlugin' => Managed_Edge_Purge::installed(), | |
| 438 | 449 | // Setup Wizard URL, surfaced in the sidebar profile popover. |
| 439 | 450 | 'wizardUrl' => admin_url( 'admin.php?page=' . Onboarding::PAGE_SLUG ), |
| 440 | 451 | 'bootstrap' => self::bootstrap_payload(), |
| 441 | 452 | ) |