Internal-only tool, so no distribution obligations under either license. Apache-2.0 chosen for its explicit patent grant. Can be relicensed to GPL later if wp.org distribution becomes relevant. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
50 lines
2.0 KiB
PHP
50 lines
2.0 KiB
PHP
<?php
|
|
/**
|
|
* Plugin Name: ATT Site Healthcheck
|
|
* Description: Walks a technician through a structured WordPress site healthcheck. Steps are drop-in PHP files so adding/removing one is a single file change.
|
|
* Version: 0.1.2
|
|
* Author: Steve Hanlon
|
|
* License: Apache-2.0
|
|
* License URI: https://www.apache.org/licenses/LICENSE-2.0
|
|
* Requires PHP: 7.4
|
|
*
|
|
* Internal/agency tool — not distributed via WP.org. See beads decision hc-5ix.26.
|
|
*/
|
|
|
|
if (!defined('ABSPATH')) {
|
|
exit;
|
|
}
|
|
|
|
define('ATT_HC_VERSION', '0.1.2');
|
|
define('ATT_HC_PLUGIN_FILE', __FILE__);
|
|
define('ATT_HC_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
|
define('ATT_HC_PLUGIN_URL', plugin_dir_url(__FILE__));
|
|
define('ATT_HC_OPT_SESSION', 'att_hc_session');
|
|
|
|
require_once ATT_HC_PLUGIN_DIR . 'includes/class-att-hc-step.php';
|
|
require_once ATT_HC_PLUGIN_DIR . 'includes/class-att-hc-steps.php';
|
|
require_once ATT_HC_PLUGIN_DIR . 'includes/class-att-hc-api-exception.php';
|
|
require_once ATT_HC_PLUGIN_DIR . 'includes/class-att-hc-api.php';
|
|
require_once ATT_HC_PLUGIN_DIR . 'includes/class-att-hc-session.php';
|
|
require_once ATT_HC_PLUGIN_DIR . 'includes/recovery-bootstrap.php';
|
|
require_once ATT_HC_PLUGIN_DIR . 'includes/recovery-installer.php';
|
|
require_once ATT_HC_PLUGIN_DIR . 'includes/admin-page.php';
|
|
require_once ATT_HC_PLUGIN_DIR . 'includes/report.php';
|
|
|
|
add_action('plugins_loaded', function () {
|
|
ATT_HC_Steps::instance()->discover(ATT_HC_PLUGIN_DIR . 'includes/steps/');
|
|
});
|
|
|
|
// Self-hosted updates from Gitea. Metadata JSON lives on the repo's main branch;
|
|
// PUC polls it twice a day and surfaces new versions via WP's normal update flow.
|
|
$att_hc_puc = ATT_HC_PLUGIN_DIR . 'vendor/plugin-update-checker/plugin-update-checker.php';
|
|
if (file_exists($att_hc_puc)) {
|
|
require_once $att_hc_puc;
|
|
\YahnisElsts\PluginUpdateChecker\v5\PucFactory::buildUpdateChecker(
|
|
'https://git.h12e.com/steve/wp-healthcheck/raw/branch/main/updates.json',
|
|
ATT_HC_PLUGIN_FILE,
|
|
'att-site-healthcheck'
|
|
);
|
|
}
|
|
unset($att_hc_puc);
|