- Drop PHP 8.0 from matrix — DTOs use readonly properties (8.1+) - Add composer.json with PHPCS/WPCS as dev dependencies - Add phpcs.xml.dist for WordPress coding standard config - Use dealerdirect/phpcodesniffer-composer-installer for auto path setup - Separate lint jobs: PHP syntax (8.1/8.2/8.3) + PHPCS + file-size - Update Requires PHP header to 8.1 - Update ARCHITECTURE.md file tree Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
47 lines
2.0 KiB
PHP
47 lines
2.0 KiB
PHP
<?php
|
|
/**
|
|
* Plugin Name: Peptide Repo Core
|
|
* Plugin URI: https://peptiderepo.com
|
|
* Description: Canonical peptide schema — shared data layer for the peptiderepo.com ecosystem. Provides the pr_peptide CPT, dosing rows, legal status cells, AI candidate queue, disclaimer component, and JSON-LD output.
|
|
* Version: 0.1.0
|
|
* Author: peptiderepo
|
|
* Author URI: https://peptiderepo.com
|
|
* License: GPL-2.0-or-later
|
|
* Text Domain: peptide-repo-core
|
|
* Requires PHP: 8.1
|
|
*
|
|
* @see ARCHITECTURE.md — Full data flow and file tree.
|
|
* @see CONVENTIONS.md — Naming patterns and extension guides.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
|
|
/* ── Constants ────────────────────────────────────────────────────────── */
|
|
|
|
define( 'PR_CORE_VERSION', '0.1.0' );
|
|
define( 'PR_CORE_PLUGIN_FILE', __FILE__ );
|
|
define( 'PR_CORE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
|
define( 'PR_CORE_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
|
define( 'PR_CORE_TARGET_SCHEMA_VERSION', 3 );
|
|
|
|
/* ── Autoloader ───────────────────────────────────────────────────────── */
|
|
|
|
require_once PR_CORE_PLUGIN_DIR . 'includes/class-pr-core-autoloader.php';
|
|
PR_Core_Autoloader::register();
|
|
|
|
/* ── Activation / Deactivation ────────────────────────────────────────── */
|
|
|
|
register_activation_hook( __FILE__, [ 'PR_Core_Activator', 'activate' ] );
|
|
register_deactivation_hook( __FILE__, [ 'PR_Core_Deactivator', 'deactivate' ] );
|
|
|
|
/* ── Boot ──────────────────────────────────────────────────────────────── */
|
|
|
|
add_action( 'plugins_loaded', static function (): void {
|
|
$plugin = new PR_Core();
|
|
$plugin->init();
|
|
} );
|