PR Vision v0.1.1: rename from peptide-geo-monitor + QA P2 fixes (#2)
Rename to PR Vision (PRV_/pr-vision); fix www-strip char-mask in competitor display (str_starts_with); make PHPCS a CI gate; remove dead in-run cache. QA: APPROVE — qa-reviews/pr-vision/2026-06-13-c633fdb9e1541386a713a6de12d2ee2ae4239640.md Agent-Session: pr-vision rename v0.1.1 merge
This commit is contained in:
69
pr-vision.php
Normal file
69
pr-vision.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin Name: PR Vision
|
||||
* Plugin URI: https://peptiderepo.com
|
||||
* Description: Weekly server-side LLM probes for AI-visibility (GEO) tracking. Records whether peptiderepo.com is cited by LLMs across core peptides, stores time-series, and renders an admin trendline + standings table.
|
||||
* Version: 0.1.1
|
||||
* Author: peptiderepo
|
||||
* Author URI: https://peptiderepo.com
|
||||
* License: GPL-2.0-or-later
|
||||
* Text Domain: pr-vision
|
||||
* Requires PHP: 8.1
|
||||
*
|
||||
* @see ARCHITECTURE.md — Full data flow and file tree.
|
||||
* @see CONVENTIONS.md — Naming patterns and extension guide.
|
||||
* @see CONTEXT.md — Domain glossary incl. the visibility score formula.
|
||||
* @package PrVision
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/* ── Constants ────────────────────────────────────────────────────────── */
|
||||
|
||||
define( 'PRV_VERSION', '0.1.1' );
|
||||
define( 'PRV_PLUGIN_FILE', __FILE__ );
|
||||
define( 'PRV_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
||||
define( 'PRV_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
||||
define( 'PRV_SCHEMA_VERSION', 1 );
|
||||
|
||||
/** Maximum HTTP retries for LLM API calls. @var int */
|
||||
define( 'PRV_MAX_RETRIES', 3 );
|
||||
|
||||
/** API request timeout in seconds. @var int */
|
||||
define( 'PRV_API_TIMEOUT_SECONDS', 60 );
|
||||
|
||||
/** Base backoff delay (seconds) between retries. @var int */
|
||||
define( 'PRV_RETRY_BASE_DELAY_SECONDS', 2 );
|
||||
|
||||
/** Default monthly budget cap in USD. @var float */
|
||||
define( 'PRV_DEFAULT_MONTHLY_BUDGET_USD', 5.0 );
|
||||
|
||||
/** WP-Cron hook name for the weekly probe run. @var string */
|
||||
define( 'PRV_CRON_HOOK', 'prv_weekly_probe' );
|
||||
|
||||
/** The site we are tracking citations for. @var string */
|
||||
define( 'PRV_TARGET_DOMAIN', 'peptiderepo.com' );
|
||||
|
||||
/* ── Autoloader ───────────────────────────────────────────────────────── */
|
||||
|
||||
require_once PRV_PLUGIN_DIR . 'includes/core/class-prv-autoloader.php';
|
||||
PRV_Autoloader::register();
|
||||
|
||||
/* ── Activation / Deactivation ────────────────────────────────────────── */
|
||||
|
||||
register_activation_hook( __FILE__, array( 'PRV_Activator', 'activate' ) );
|
||||
register_deactivation_hook( __FILE__, array( 'PRV_Deactivator', 'deactivate' ) );
|
||||
|
||||
/* ── Boot ──────────────────────────────────────────────────────────────── */
|
||||
|
||||
add_action(
|
||||
'plugins_loaded',
|
||||
static function (): void {
|
||||
$plugin = new PRV_Plugin();
|
||||
$plugin->init();
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user