b4400a68e5
Baseline before backporting wp-data-optimizer v3.0.1-v3.4.6. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
74 lines
1.7 KiB
PHP
74 lines
1.7 KiB
PHP
<?php
|
|
/**
|
|
* Blocks adapter — `hivepress-blocks`.
|
|
*
|
|
* Pure presentation layer (Gutenberg block library). No models, no postmeta,
|
|
* no comment tables. Adapter exists solely so the detector and admin UI
|
|
* recognise the addon as installed and report it in the integration matrix.
|
|
*
|
|
* @package WP_Data_Optimizer
|
|
* @since 3.0.0
|
|
*/
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
|
|
if ( ! class_exists( 'TMDO_HivePress_Blocks_Adapter' ) ) {
|
|
|
|
/**
|
|
* Blocks addon adapter (presentation only, no EAV surface).
|
|
*/
|
|
final class TMDO_HivePress_Blocks_Adapter implements TMDO_HivePress_Adapter {
|
|
|
|
use TMDO_HivePress_Adapter_Trait;
|
|
|
|
/**
|
|
* Constructor — bind register hooks via inherited trait.
|
|
*/
|
|
public function __construct() {
|
|
$this->bind_anti_eav_hooks();
|
|
}
|
|
|
|
/** Adapter slug (matches wp.org plugin slug). */
|
|
public function plugin_slug(): string {
|
|
return 'hivepress-blocks';
|
|
}
|
|
|
|
/** Class probed for addon presence. */
|
|
public function detection_class(): string {
|
|
return 'HivePress\\Blocks\\Plugin';
|
|
}
|
|
|
|
/** Version constant probed for addon presence. */
|
|
public function detection_const(): string {
|
|
return 'HIVEPRESS_BLOCKS_VERSION';
|
|
}
|
|
|
|
/** Minimum addon version supported. */
|
|
public function minimum_addon_version(): string {
|
|
return '1.0.0';
|
|
}
|
|
|
|
/**
|
|
* Doctor probe — presentation-only, nothing to verify.
|
|
*
|
|
* @return array{ok:bool, message:string}
|
|
*/
|
|
public function doctor_check(): array {
|
|
return array(
|
|
'ok' => true,
|
|
'message' => 'hivepress-blocks: presentation-only addon, no anti-EAV surface',
|
|
);
|
|
}
|
|
|
|
/**
|
|
* 8-D self-score — perfect (no data layer).
|
|
*/
|
|
public function suitability_score(): array {
|
|
return $this->compose_score( array() );
|
|
}
|
|
}
|
|
|
|
} // end if ( ! class_exists )
|