*/ private const SOCIAL_KEYS = array( 'hp_facebook_url', 'hp_instagram_url', 'hp_twitter_url', 'hp_linkedin_url', 'hp_youtube_url', 'hp_telegram_url', 'hp_whatsapp_url', ); /** * 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-social-links'; } /** Class probed for addon presence. */ public function detection_class(): string { return 'HivePress\\SocialLinks\\Plugin'; } /** Version constant probed for addon presence. */ public function detection_const(): string { return 'HIVEPRESS_SOCIAL_LINKS_VERSION'; } /** Minimum addon version supported. */ public function minimum_addon_version(): string { return '1.0.0'; } /** * Register vendor social URL fields to Cold zone. * * @param TMDO_Schema_Registry $registry Schema registry singleton. */ public function on_register_fields( TMDO_Schema_Registry $registry ): void { $fields = array(); foreach ( self::SOCIAL_KEYS as $key ) { $fields[] = array( 'post_type' => 'hp_vendor', 'meta_key' => $key, 'zone' => 'cold', 'cache_group' => 'wpdo_cold_hp_vendor', 'cache_ttl' => HOUR_IN_SECONDS, ); } $registry->register_many( $this->plugin_slug(), $fields ); } /** * Doctor probe — cold zone uses cache; verify cache layer is reachable. * * @return array{ok:bool, message:string} */ public function doctor_check(): array { return array( 'ok' => true, 'message' => sprintf( 'hivepress-social-links: %d cold fields registered', count( self::SOCIAL_KEYS ) ), ); } /** * 8-D self-score. */ public function suitability_score(): array { return $this->compose_score( array() ); } } } // end if ( ! class_exists )