- License.php now calls the aurora-licensing plugin's REST API (/wp-json/aurora-licensing/v1/validate|activate|deactivate) instead of treating any non-empty license_key as active. Result is cached in the aurora_admin_license_status option for 12 hours; is_active() and is_feature_available() read the cache instead of hitting the network on every admin page load. - Hooks update_option_aurora_admin_settings to activate/deactivate immediately when the license_key setting actually changes, rather than waiting out the cache. Instantiated in AuroraAdmin.php so that hook registers. - Settings page now surfaces the real status (active/invalid/unreachable, with the server's own message) as a status line under the License key field, instead of a field that silently does nothing. - Verified live against the real server: a fake test key correctly came back locked with the server's own "License key not found." message. Co-Authored-By: Claude Sonnet 5 <[email protected]>
61 lines
1.6 KiB
PHP
61 lines
1.6 KiB
PHP
<?php
|
|
namespace AuroraAdmin\App;
|
|
|
|
use AuroraAdmin\Options\Settings;
|
|
use AuroraAdmin\Licensing\License;
|
|
use AuroraAdmin\Shell\Shell;
|
|
use AuroraAdmin\Pages\DashboardTakeover;
|
|
use AuroraAdmin\Pages\SettingsPage;
|
|
use AuroraAdmin\Rest\DashboardData;
|
|
use AuroraAdmin\Analytics\Analytics;
|
|
use AuroraAdmin\Rest\AnalyticsData;
|
|
use AuroraAdmin\Rest\PluginsData;
|
|
use AuroraAdmin\Rest\CommentsData;
|
|
use AuroraAdmin\Posts\ScheduledDayFilter;
|
|
use AuroraAdmin\WhiteLabel\WhiteLabel;
|
|
use AuroraAdmin\Pages\SubApps;
|
|
use AuroraAdmin\MenuCreator\MenuCreator;
|
|
use AuroraAdmin\MenuCreator\MenuCreatorData;
|
|
use AuroraAdmin\Notices\Notices;
|
|
use AuroraAdmin\Notices\NoticesData;
|
|
use AuroraAdmin\Roles\RolesData;
|
|
use AuroraAdmin\ActivityLog\ActivityLog;
|
|
use AuroraAdmin\ActivityLog\ActivityLogData;
|
|
use AuroraAdmin\DatabaseExplorer\DatabaseExplorerData;
|
|
|
|
defined("ABSPATH") || exit();
|
|
|
|
/**
|
|
* Plugin bootstrap. Deliberately minimal: each piece of functionality
|
|
* registers its own hooks in its own constructor, instantiated here.
|
|
* No global state, no manifest-parsing gymnastics beyond Assets::enqueue,
|
|
* no body-hider/temporary-style tricks.
|
|
*/
|
|
class AuroraAdmin
|
|
{
|
|
public function __construct()
|
|
{
|
|
new Settings();
|
|
new License();
|
|
new Shell();
|
|
new DashboardTakeover();
|
|
new SettingsPage();
|
|
new DashboardData();
|
|
new Analytics();
|
|
new AnalyticsData();
|
|
new PluginsData();
|
|
new CommentsData();
|
|
new ScheduledDayFilter();
|
|
new WhiteLabel();
|
|
new SubApps();
|
|
new MenuCreator();
|
|
new MenuCreatorData();
|
|
new Notices();
|
|
new NoticesData();
|
|
new RolesData();
|
|
new ActivityLog();
|
|
new ActivityLogData();
|
|
new DatabaseExplorerData();
|
|
}
|
|
}
|