PluginProbe
WDesignKit – AI Templates, Widget Builder & MCP Workflow / 2.7.0
WDesignKit – AI Templates, Widget Builder & MCP Workflow v2.7.0
2.7.0 2.6.6 2.6.5 2.6.4 2.6.3 2.6.2 2.6.1 2.6.0 2.5.5 2.5.4 2.5.3 2.5.2 2.5.1 2.5.0 2.4.0 2.3.3 2.3.2 2.3.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 All 129 releases
← All changes | includes/abilities/widgets/wdesignkit-sync-widget-code.php +12 -0 2.6.3 → 2.7.0 View file →
@@ -63,8 +63,9 @@
63 63 ],
64 64 'execute_callback' => 'wdesignkit_mcp_sync_widget_code',
65 65 'permission_callback' => 'wdesignkit_mcp_permission_callback',
66 66 'meta' => [
67 + 'public' => true,
67 68 'show_in_rest' => true,
68 69 'mcp' => ['public' => true],
69 70 'annotations' => [
70 71 'instructions' => implode("\n", [
@@ -466,8 +467,19 @@
466 467 'diff' => $diff_summary,
467 468 'preview' => [
468 469 'new_php_code' => $new_php_code,
469 470 ],
471 + ];
472 + }
473 +
474 + // Site-level opt-out for generated widget PHP (ClickUp 86d41zavc). This path regenerates
475 + // register_controls() and rewrites the widget's .php, so it is a PHP write like any other
476 + // and has to honour the same filter. Checked after the dry_run return above, so a preview
477 + // still works on a locked-down site.
478 + if (function_exists('wdesignkit_widget_php_write_allowed') && !wdesignkit_widget_php_write_allowed()) {
479 + return [
480 + 'success' => false,
481 + 'message' => "PHP was not rewritten for {$builder}/{$folder}: generated widget PHP writes are disabled on this site via the wdesignkit_allow_widget_php_write filter. Use dry_run: true to preview the change.",
470 482 ];
471 483 }
472 484
473 485 $written = @file_put_contents($php_path, $new_php_code);