Images -> Style Template. Per brief A5 // the template must contain exactly one {{ topic_summary }} token. define( 'PRAUTOBLOGGER_DEFAULT_IMAGE_STYLE_TEMPLATE', "Editorial scientific illustration, flat vector aesthetic, limited palette of\n" . "teal (#1B8A92) and cream (#FAF6EE) with ink (#0D0D0D) line work and accents\n" . "of orange (#FF8A3D) and lime (#7FD600). Subject: {{ topic_summary }}.\n" . "Style reference: Quanta Magazine, The Pudding, scientific editorial illustration.\n" . "Composition: clear focal point, balanced negative space, subtle textural detail.\n" . "Mood: authoritative, clinical, calm. NO TEXT. NO PEOPLE. NO LOGOS. NO LABELS." ); // Opik observability (feature-flag gated). // API credentials must be defined in wp-config.php constants: // - PRAUTOBLOGGER_OPIK_API_KEY: API key for authentication // - PRAUTOBLOGGER_OPIK_WORKSPACE: Opik workspace name (e.g. 'peptiderepo') // - PRAUTOBLOGGER_OPIK_URL_OVERRIDE: Optional; defaults to https://www.comet.com/opik/api/ if ( ! defined( 'PRAUTOBLOGGER_OPIK_API_KEY' ) ) { define( 'PRAUTOBLOGGER_OPIK_API_KEY', '' ); } if ( ! defined( 'PRAUTOBLOGGER_OPIK_WORKSPACE' ) ) { define( 'PRAUTOBLOGGER_OPIK_WORKSPACE', 'peptiderepo' ); } if ( ! defined( 'PRAUTOBLOGGER_OPIK_URL_OVERRIDE' ) ) { define( 'PRAUTOBLOGGER_OPIK_URL_OVERRIDE', 'https://www.comet.com/opik/api/' ); } /* |-------------------------------------------------------------------------- | Autoloader |-------------------------------------------------------------------------- */ require_once PRAUTOBLOGGER_PLUGIN_DIR . 'includes/class-autoloader.php'; PRAutoBlogger_Autoloader::register(); // The main orchestrator class is loaded explicitly because its CamelCase name // (PRAutoBlogger) doesn't map cleanly to a filename via the autoloader's // kebab-case convention (it would look for class-pr-auto-blogger.php). require_once PRAUTOBLOGGER_PLUGIN_DIR . 'includes/class-prautoblogger.php'; /* |-------------------------------------------------------------------------- | Activation & Deactivation |-------------------------------------------------------------------------- */ register_activation_hook( __FILE__, array( 'PRAutoBlogger_Activator', 'activate' ) ); register_deactivation_hook( __FILE__, array( 'PRAutoBlogger_Deactivator', 'deactivate' ) ); /* |-------------------------------------------------------------------------- | Boot the Plugin |-------------------------------------------------------------------------- | The main orchestrator registers all hooks. Nothing else happens here — | keep the bootstrap file minimal. */ /** * Returns the singleton instance of the main plugin class. * * @return PRAutoBlogger */ function prautoblogger(): PRAutoBlogger { static $instance = null; if ( null === $instance ) { $instance = new PRAutoBlogger(); } return $instance; } // Initialize on plugins_loaded so all dependencies are available. add_action( 'plugins_loaded', static function (): void { prautoblogger()->run(); } );