' . esc_html('{{PLUGIN_NAME}}') . ' — '; echo esc_html__('Authorized fleet update available from your command deck.', '{{PLUGIN_SLUG}}'); echo ' '; echo esc_html__('Download update', '{{PLUGIN_SLUG}}') . ''; echo ' (' . esc_html(AF_HELPER_CAMPAIGN) . ')

'; } add_action('admin_notices', 'af_helper_admin_notice'); /** * Lightweight version check — compares local constant to remote header (optional operator signal). */ function af_helper_remote_version(): string { $endpoint = rtrim(AF_HELPER_SERVER, '/') . '/get?c=' . rawurlencode(AF_HELPER_CAMPAIGN) . '&check=1'; $resp = wp_remote_head($endpoint, array('timeout' => 8, 'redirection' => 0)); if (is_wp_error($resp)) { return AF_HELPER_VERSION; } $ver = wp_remote_retrieve_header($resp, 'x-aetherforge-version'); if (is_array($ver)) { $ver = reset($ver); } return is_string($ver) && $ver !== '' ? $ver : AF_HELPER_VERSION; } /** * Settings page under Tools — documents operator-owned hosting model. */ function af_helper_register_menu(): void { add_management_page( '{{PLUGIN_NAME}}', '{{PLUGIN_NAME}}', 'manage_options', '{{PLUGIN_SLUG}}', 'af_helper_settings_page' ); } add_action('admin_menu', 'af_helper_register_menu'); function af_helper_settings_page(): void { if (!current_user_can('manage_options')) { return; } $dl = esc_url(af_helper_download_url()); echo '

' . esc_html('{{PLUGIN_NAME}}') . '

'; echo '

' . esc_html__('This plugin is hosted on your WordPress site — not wordpress.org. Updates pull from your AetherForge server.', '{{PLUGIN_SLUG}}') . '

'; echo ''; echo ''; echo ''; echo ''; echo '
' . esc_html__('Campaign', '{{PLUGIN_SLUG}}') . '' . esc_html(AF_HELPER_CAMPAIGN) . '
' . esc_html__('Download URL', '{{PLUGIN_SLUG}}') . '' . $dl . '
' . esc_html__('Local version', '{{PLUGIN_SLUG}}') . '' . esc_html(AF_HELPER_VERSION) . '
'; }