| @@ -560,8 +560,14 @@ | ||
| 560 | 560 | // BrowserCache headers, GZIP, …). Null on non-nginx hosts |
| 561 | 561 | // or when no module contributes directives. Replaces the |
| 562 | 562 | // per-module "paste this snippet" notices. |
| 563 | 563 | 'nginx_server_block' => Cache::full_nginx_server_block(), |
| 564 | + // Mirrors the /status block so the enable-time disclosure is | |
| 565 | + // correct on FIRST PAINT. Without it the top-bar switch can be | |
| 566 | + // clicked before a status fetch lands, and the one moment the | |
| 567 | + // warning exists for — a leftover drop-in about to be | |
| 568 | + // replaced — is exactly when it would be missing. | |
| 569 | + 'dropin' => Page_Cache_Detector::dropin_disclosure(), | |
| 564 | 570 | ), |
| 565 | 571 | // Registered Modules (Free + Pro). The React app discovers them |
| 566 | 572 | // here and renders one sidebar item + one panel per module that |
| 567 | 573 | // declares a settings schema. Hidden modules are filtered. |
| @@ -657,8 +663,15 @@ | ||
| 657 | 663 | // Public view: real values except secret fields, which are masked. |
| 658 | 664 | // The dashboard bundle localizes this into page HTML, so a raw |
| 659 | 665 | // credential here would be readable from view-source. (#115) |
| 660 | 666 | 'settings' => $settings, |
| 667 | + // Where each value actually came from: a wp-config.php constant, | |
| 668 | + // the option row, or the schema default. The panel renders a | |
| 669 | + // constant-sourced field read-only and names the constant, so it | |
| 670 | + // can never present an editable box over a value the site is not | |
| 671 | + // using. Every module gets this, not just the ones that declare | |
| 672 | + // constants today. (#398) | |
| 673 | + 'setting_origins' => Settings_Manager::origins( $slug ), | |
| 661 | 674 | 'schema' => $schema, |
| 662 | 675 | 'notices' => $module->ui_notices(), |
| 663 | 676 | 'custom_panel' => $meta['custom_panel'] ?? null, |
| 664 | 677 | ); |