PluginProbe
xSpeed Cache: AI-Powered Performance Hub with MCP, Caching & CDN / 1.4.2
xSpeed Cache: AI-Powered Performance Hub with MCP, Caching & CDN v1.4.2
1.4.2 1.4.1 1.4.0 1.3.7 1.3.6 1.3.5 1.3.4 1.3.3 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 All 36 releases
← All changes | includes/class-admin.php +8 -0 1.4.1 → 1.4.2 View file →
@@ -202,8 +202,16 @@
202 202 // user inside the right module. WordPress's add_submenu_page
203 203 // strips the hash, so we inject directly into $submenu where
204 204 // it survives intact (the same trick Yoast / WooCommerce use
205 205 // for their per-area shortcuts).
206 + //
207 + // Writing to $submenu skips the capability check add_submenu_page()
208 + // does, and core keeps a top-level item the user can't open while its
209 + // submenu has entries. Without this guard an Editor saw an empty
210 + // "xSpeed Cache" flyout that led to a permissions error. (#720)
211 + if ( ! current_user_can( 'manage_options' ) ) {
212 + return;
213 + }
206 214 global $submenu;
207 215 $deep_links = self::deep_link_items();
208 216 foreach ( $deep_links as $hash => $label ) {
209 217 $submenu[ self::PAGE_SLUG ][] = array(