0 && get_post( $existing ) ) { return $existing; } $id = wp_insert_post( array( 'post_title' => __( 'AI Assistant Transparency', 'agentyllo' ), 'post_content' => '[' . self::SHORTCODE . ']', 'post_status' => 'draft', 'post_type' => 'page', ) ); if ( is_wp_error( $id ) || ! $id ) { return 0; } update_option( 'agyl_transparency_page_id', (int) $id, false ); Audit::log( 'privacy.transparency_page_created', (string) $id ); return (int) $id; } /** * Shortcode renderer. */ public function render_shortcode(): string { $general = $this->settings->get( 'general' ); $privacy = $this->settings->get( 'privacy' ); $mode = (string) $general['operating_mode']; $tiers = array( 'classic' => __( 'Classic (non-generative) agents: answers are extracted verbatim from this site\'s own content.', 'agentyllo' ) ); if ( in_array( $mode, array( 'free_ai', 'classic_free_ai' ), true ) ) { $tiers['free_ai'] = __( 'Local AI models running on this website\'s own server (no data leaves the server).', 'agentyllo' ); } if ( in_array( $mode, array( 'paid_ai', 'classic_paid_ai' ), true ) ) { $tiers['paid_ai'] = __( 'Third-party AI providers configured by the site owner (see data flows below).', 'agentyllo' ); } $custom = trim( (string) $privacy['transparency_text'] ); ob_start(); ?>