Changeset 3735184 for guardforge/trunk/includes/class-core.php
- Timestamp:
- 10/08/2026 04:48:15 PM (6 weeks ago)
- File:
-
- 1 edited
-
guardforge/trunk/includes/class-core.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
guardforge/trunk/includes/class-core.php
r3712655 r3735184 39 39 * 40 40 * It names both versions and what stopped, because "update Pro" on its own 41 * does not tell them which of their screens changed. Only somebody who can 42 * install the update is told; for anybody else it is a sentence they 43 * cannot act on. 41 * does not tell them which of their screens changed. Since 1.6.0 such an 42 * add-on is also kept from booting 43 * (GUARDFORGE_Pro_Bridge::keep_outdated_addon_from_booting): the licence 44 * class it calls now lives in the add-on, and an older add-on looks for it 45 * in this core. Its update client is registered by name and keeps 46 * running, but a site may still see no update listed, so the third 47 * paragraph says where the package is. Only somebody who can install the 48 * update is told; for anybody else it is a sentence they cannot act on. 44 49 */ 45 50 public function pro_addon_outdated_notice() { … … 64 69 // The second line carries no placeholder, because the machine translator drops %1$s and %2$s when it rewrites a sentence this long. 65 70 echo '</p><p>'; 66 echo esc_html( __( 'Until then alerts to Telegram, Slack or a webhook, the Cloudflare firewall push, automatic lockdown, patch by update, the WAF, malware scanning, AI threat analysis, required 2FA and audit export are unavailable. This add-on has never heard of staging mode, so on a copy of your site it would have gone on mailing and pushing while the banner promised silence. Your logs, baselines and settings are kept.', 'guardforge' ) ); 71 echo esc_html( __( 'Until then alerts to Telegram, Slack or a webhook, the Cloudflare firewall push, automatic lockdown, patch by update, the WAF, malware scanning, AI threat analysis, required 2FA and audit export are unavailable. Your logs, baselines and settings are kept.', 'guardforge' ) ); 72 echo '</p><p>'; 73 echo esc_html( __( 'If Dashboard → Updates lists no update for it, download the add-on from your Avakode dashboard and upload it over this copy in Plugins → Add New Plugin → Upload Plugin.', 'guardforge' ) ); 74 echo ' <a href="https://avakode.com/dashboard/downloads/" target="_blank" rel="noopener">' . esc_html( __( 'Open Downloads', 'guardforge' ) ) . '</a>'; 67 75 echo '</p></div>'; 68 76 } … … 112 120 // Cloudflare token verification — so opening any row on the entry 113 121 // screen is at most one click from its detail. Logs, response tools 114 // and pure configuration follow, in that order; License stays last as 115 // before. This is a reordering of the same fourteen items, not a 116 // change to how many there are or what they are called. 122 // and pure configuration follow, in that order. The Alerts and License 123 // rows are the add-on's since 1.6.0 (GuardForge Pro registers them 124 // after these thirteen): both screens only ever ran against the 125 // add-on's classes, and without it there is nothing behind them. 117 126 $sub = [ 118 127 [ 'guardforge', __( 'Settings', 'guardforge' ), 'render_settings' ], … … 133 142 [ 'guardforge-geo', __( 'Geo-IP', 'guardforge' ), 'render_geo_ip' ], 134 143 [ 'guardforge-2fa', __( '2FA', 'guardforge' ), 'render_two_factor', self::two_factor_capability() ], 135 [ 'guardforge-alerts', __( 'Alerts', 'guardforge' ), 'render_alerts' ],136 [ 'guardforge-license', __( 'License', 'guardforge' ), 'render_license' ],137 144 ]; 138 145 foreach ( $sub as $row ) { … … 172 179 true 173 180 ); 174 // The alerts screen builds and removes channel cards in the browser.175 // Its script is a file, enqueued here, rather than a <script> block in176 // the partial (wp.org review 20.09.2026: "use wp_enqueue commands").177 $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null;178 if ( $screen && strpos( (string) $screen->id, 'guardforge-alerts' ) !== false ) {179 wp_enqueue_script(180 'guardforge-alerts',181 GUARDFORGE_URL . 'assets/js/alerts.js',182 [ 'guardforge-admin' ],183 GUARDFORGE_VERSION,184 true185 );186 }187 181 wp_localize_script( 'guardforge-admin', 'guardforgeAdmin', [ 188 182 'ajaxUrl' => admin_url( 'admin-ajax.php' ),
Note:
See TracChangeset
for help on using the changeset viewer.