true ] ); return array_values( array_intersect( self::post_types(), array_keys( $public ) ) ); } /** * Whether a post may be exposed through the public AI endpoints. Gate for every * public surface: published status, no password, not excluded from the layer, * and a publicly-queryable tracked type. Drafts, private, trashed, scheduled, * password-protected and opted-out posts all fail this check. */ public static function is_publicly_servable( $post ) { if ( ! $post instanceof WP_Post ) return false; if ( 'publish' !== $post->post_status ) return false; if ( '' !== (string) $post->post_password ) return false; if ( self::is_excluded( $post->ID ) ) return false; return in_array( $post->post_type, self::public_post_types(), true ); } // Automatically analyse newly published content public static function auto_analyse() { return (bool) self::get( 'auto_analyse', true ); } // FAQ frontend display settings public static function faq_display_enabled() { return (bool) self::get( 'faq_display_enabled', true ); } public static function faq_settings() { return array_merge( [ 'heading' => 'Frequently Asked Questions', 'heading_color' => '#111827', 'bg_color' => '#f8f9fa', 'border_color' => '#e5e7eb', 'q_color' => '#1e40af', 'a_color' => '#374151', 'border_radius' => '8', ], self::get( 'faq_display', [] ) ); } }