PluginProbe
xSpeed Cache: AI-Powered Performance Hub with MCP, Caching & CDN / 1.3.2
xSpeed Cache: AI-Powered Performance Hub with MCP, Caching & CDN v1.3.2
1.3.2 1.3.1 1.3.0 1.2.4 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.2.0 All 28 releases
← All changes | includes/modules/Preloader/PreloaderModule.php +35 -15 1.2.01.3.2 View file →
@@ -28,12 +28,12 @@
28 28 public const VERSION = '1.0.0';
29 29
30 30 public function ui_metadata(): array {
31 31 return array(
32 - 'label' => 'Preloader',
33 - 'tab_label' => 'Crawl Now', // its own tab on the Preloader page
32 + 'label' => __( 'Preloader', 'xspeed' ),
33 + 'tab_label' => __( 'Crawl Now', 'xspeed' ), // its own tab on the Preloader page
34 34 'icon' => 'Wand2',
35 - 'description' => 'Crawl the sitemap to warm cache so visitors never hit a cold MISS.',
35 + 'description' => __( 'Crawl the sitemap to warm cache so visitors never hit a cold MISS.', 'xspeed' ),
36 36 // Custom panel wraps the schema-driven settings with a
37 37 // Start/Stop control surface + a live status readout
38 38 // (queue depth, last URL, recent errors).
39 39 'custom_panel' => 'PreloaderHost',
@@ -44,10 +44,10 @@
44 44 return array(
45 45 'enabled' => array(
46 46 'type' => 'bool',
47 47 'default' => false,
48 - 'label' => 'Enable Preloader',
49 - 'description' => 'When on, xSpeed crawls the sitemap on the schedule below and warms the page cache.',
48 + 'label' => __( 'Enable Preloader', 'xspeed' ),
49 + 'description' => __( 'When on, xSpeed crawls the sitemap on the schedule below and warms the page cache.', 'xspeed' ),
50 50 ),
51 51 'schedule' => array(
52 52 'type' => 'enum',
53 53 'default' => 'manual',
@@ -57,10 +57,10 @@
57 57 'hourly' => 'Hourly',
58 58 'daily' => 'Daily',
59 59 'weekly' => 'Weekly',
60 60 ),
61 - 'label' => 'Schedule',
62 - 'description' => 'How often to start a fresh crawl. Manual means you trigger it from the dashboard.',
61 + 'label' => __( 'Schedule', 'xspeed' ),
62 + 'description' => __( 'How often to start a fresh crawl. Manual means you trigger it from the dashboard.', 'xspeed' ),
63 63 'dependsOn' => array( 'field' => 'enabled' ),
64 64 ),
65 65 'batch_size' => array(
66 66 'type' => 'int',
@@ -66,31 +66,31 @@
66 66 'type' => 'int',
67 67 'default' => 5,
68 68 'min' => 1,
69 69 'max' => 50,
70 - 'label' => 'Batch Size',
71 - 'description' => 'URLs warmed per cron tick. Higher = faster crawl, more load on the origin.',
70 + 'label' => __( 'Batch Size', 'xspeed' ),
71 + 'description' => __( 'URLs warmed per cron tick. Higher = faster crawl, more load on the origin.', 'xspeed' ),
72 72 'dependsOn' => array( 'field' => 'enabled' ),
73 73 ),
74 74 'sitemap_url' => array(
75 75 'type' => 'string',
76 76 'default' => '',
77 - 'label' => 'Sitemap URL (optional)',
78 - 'description' => 'Override the auto-detected WordPress core sitemap (/wp-sitemap.xml). Leave blank for default.',
77 + 'label' => __( 'Sitemap URL (optional)', 'xspeed' ),
78 + 'description' => __( 'Override the auto-detected WordPress core sitemap (/wp-sitemap.xml). Leave blank for default.', 'xspeed' ),
79 79 'dependsOn' => array( 'field' => 'enabled' ),
80 80 ),
81 81 'warm_on_publish' => array(
82 82 'type' => 'bool',
83 83 'default' => true,
84 - 'label' => 'Warm new content immediately',
85 - 'description' => 'When a post or page is published, fetch it once so the first visitor sees a cache HIT, not a cold MISS.',
84 + 'label' => __( 'Warm new content immediately', 'xspeed' ),
85 + 'description' => __( 'When a post or page is published, fetch it once so the first visitor sees a cache HIT, not a cold MISS.', 'xspeed' ),
86 86 'dependsOn' => array( 'field' => 'enabled' ),
87 87 ),
88 88 'warm_on_comment' => array(
89 89 'type' => 'bool',
90 90 'default' => false,
91 - 'label' => 'Re-warm after comments',
92 - 'description' => 'Re-warm a page after a comment is posted (Cache purges the page on comment; this fetches it back into cache).',
91 + 'label' => __( 'Re-warm after comments', 'xspeed' ),
92 + 'description' => __( 'Re-warm a page after a comment is posted (Cache purges the page on comment; this fetches it back into cache).', 'xspeed' ),
93 93 'dependsOn' => array( 'field' => 'enabled' ),
94 94 ),
95 95 );
96 96 }
@@ -126,8 +126,9 @@
126 126 array(
127 127 'name' => 'xspeed preloader',
128 128 'callback' => array( $this, 'cli_handler' ),
129 129 'shortdesc' => 'Drive the cache preloader (start | stop | status).',
130 + 'ai_hint' => 'Cache warming: crawl the site so visitors hit a warm cache instead of paying for the first render. Use after a full purge, or when the first visitor to each page reports a slow load.',
130 131 'synopsis' => array(
131 132 array(
132 133 'type' => 'positional',
133 134 'name' => 'action',
@@ -139,8 +140,27 @@
139 140 );
140 141 }
141 142
142 143 public function boot(): void {
144 + /*
145 + * Deferred to `init`. This module reads its own settings to decide
146 + * what to hook, and reading settings builds settings_schema(), whose
147 + * labels are declared through __(). boot() runs on `plugins_loaded`,
148 + * before `after_setup_theme` — the point WordPress 6.7+ treats as the
149 + * earliest safe moment to translate — so doing that here fires
150 + * _load_textdomain_just_in_time on every request AND resolves the
151 + * labels against a domain that is not loaded yet.
152 + *
153 + * Everything below hooks actions that fire after `init`, so running
154 + * one hook later is equivalent.
155 + */
156 + add_action( 'init', array( $this, 'boot_on_init' ) );
157 + }
158 +
159 + /**
160 + * The real boot body — see boot() for why it runs on `init`.
161 + */
162 + public function boot_on_init(): void {
143 163 add_action( Preloader::CRON_HOOK, array( Preloader::class, 'tick' ) );
144 164 add_action( 'xspeed_preloader_recurring', array( Preloader::class, 'recurring_kickoff' ) );
145 165
146 166 // Apply schedule changes immediately whenever this module's