__( 'Every 15 minutes', 'peptide-news' ), 'every_thirty_minutes' => __( 'Every 30 minutes', 'peptide-news' ), 'hourly' => __( 'Hourly', 'peptide-news' ), 'every_four_hours' => __( 'Every 4 hours', 'peptide-news' ), 'every_six_hours' => __( 'Every 6 hours', 'peptide-news' ), 'twicedaily' => __( 'Twice daily', 'peptide-news' ), 'daily' => __( 'Daily', 'peptide-news' ), ); echo ''; echo '

' . esc_html__( 'How often to check for new articles. After changing, deactivate and reactivate the plugin.', 'peptide-news' ) . '

'; } public static function render_articles_count_field(): void { $value = get_option( 'peptide_news_articles_count', 10 ); printf( '', absint( $value ) ); echo '

' . esc_html__( 'Number of articles to display in the shortcode/widget.', 'peptide-news' ) . '

'; } public static function render_search_keywords_field(): void { $value = get_option( 'peptide_news_search_keywords', '' ); printf( '', esc_attr( $value ) ); echo '

' . esc_html__( 'Comma-separated keywords for NewsAPI searches.', 'peptide-news' ) . '

'; } public static function render_rss_enabled_field(): void { $value = get_option( 'peptide_news_rss_enabled', 1 ); printf( '', checked( $value, 1, false ), esc_html__( 'Fetch articles from RSS feeds', 'peptide-news' ) ); } public static function render_rss_feeds_field(): void { $value = get_option( 'peptide_news_rss_feeds', '' ); printf( '', esc_textarea( $value ) ); } public static function render_newsapi_enabled_field(): void { $value = get_option( 'peptide_news_newsapi_enabled', 0 ); printf( '', checked( $value, 1, false ), esc_html__( 'Fetch articles from NewsAPI.org', 'peptide-news' ) ); } public static function render_newsapi_key_field(): void { $value = get_option( 'peptide_news_newsapi_key', '' ); $display_value = ! empty( $value ) ? self::mask_api_key( $value ) : ''; printf( '', esc_attr( $display_value ), esc_attr__( 'Enter new API key to change', 'peptide-news' ) ); } public static function render_article_retention_field(): void { $value = get_option( 'peptide_news_article_retention', 90 ); printf( '', absint( $value ) ); echo '

' . esc_html__( 'How long to keep fetched articles before deactivating them.', 'peptide-news' ) . '

'; } public static function render_retention_field(): void { $value = get_option( 'peptide_news_analytics_retention', 365 ); printf( '', absint( $value ) ); echo '

' . esc_html__( 'How long to keep click analytics data.', 'peptide-news' ) . '

'; } public static function render_anonymize_ip_field(): void { $value = get_option( 'peptide_news_anonymize_ip', 1 ); printf( '', checked( $value, 1, false ), esc_html__( 'Anonymize IP addresses for GDPR compliance', 'peptide-news' ) ); } // ── Filter field proxies — @see Peptide_News_Admin_Filter_Field_Renderers ── public static function render_filter_enabled_field(): void { Peptide_News_Admin_Filter_Field_Renderers::render_filter_enabled_field(); } public static function render_filter_sensitivity_field(): void { Peptide_News_Admin_Filter_Field_Renderers::render_filter_sensitivity_field(); } public static function render_filter_llm_enabled_field(): void { Peptide_News_Admin_Filter_Field_Renderers::render_filter_llm_enabled_field(); } public static function render_filter_llm_model_field(): void { Peptide_News_Admin_Filter_Field_Renderers::render_filter_llm_model_field(); } public static function render_filter_title_keywords_field(): void { Peptide_News_Admin_Filter_Field_Renderers::render_filter_title_keywords_field(); } public static function render_filter_body_keywords_field(): void { Peptide_News_Admin_Filter_Field_Renderers::render_filter_body_keywords_field(); } public static function render_filter_blocked_domains_field(): void { Peptide_News_Admin_Filter_Field_Renderers::render_filter_blocked_domains_field(); } public static function render_llm_enabled_field(): void { $value = get_option( 'peptide_news_llm_enabled', 0 ); printf( '', checked( $value, 1, false ), esc_html__( 'Analyze articles with AI during each fetch cycle', 'peptide-news' ) ); } public static function render_openrouter_key_field(): void { $value = get_option( 'peptide_news_openrouter_api_key', '' ); $display_value = ! empty( $value ) ? self::mask_api_key( $value ) : ''; printf( '', esc_attr( $display_value ), esc_attr__( 'Enter new API key to change', 'peptide-news' ) ); echo '

' . wp_kses( __( 'Get an API key at openrouter.ai/keys.', 'peptide-news' ), array( 'a' => array( 'href' => array(), 'target' => array(), 'rel' => array(), ), ) ) . '

'; } public static function render_llm_keywords_model_field(): void { $value = get_option( 'peptide_news_llm_keywords_model', 'google/gemini-2.0-flash-001' ); printf( '', esc_attr( $value ) ); echo '

' . esc_html__( 'OpenRouter model ID for keyword extraction (e.g., google/gemini-2.0-flash-001, openai/gpt-4o-mini).', 'peptide-news' ) . '

'; } public static function render_llm_summary_model_field(): void { $value = get_option( 'peptide_news_llm_summary_model', 'google/gemini-2.0-flash-001' ); printf( '', esc_attr( $value ) ); echo '

' . esc_html__( 'OpenRouter model ID for article summarization (e.g., google/gemini-2.0-flash-001, anthropic/claude-3.5-sonnet).', 'peptide-news' ) . '

'; } public static function render_llm_max_articles_field(): void { $value = get_option( 'peptide_news_llm_max_articles', 10 ); printf( '', absint( $value ) ); echo '

' . esc_html__( 'Maximum number of articles to analyze with AI per fetch cycle. Controls API costs and prevents cron timeouts.', 'peptide-news' ) . '

'; } public static function render_monthly_budget_field(): void { $value = (float) get_option( 'peptide_news_monthly_budget', 0.0 ); printf( '', $value ); echo '

' . esc_html__( 'Set to 0 to disable budget limits. The plugin will stop making API calls when this amount is reached (if enforcement is enabled).', 'peptide-news' ) . '

'; } public static function render_budget_mode_field(): void { $value = get_option( 'peptide_news_budget_mode', 'disabled' ); $modes = array( 'disabled' => __( 'Disabled — track costs only, no limits', 'peptide-news' ), 'warn_only' => __( 'Warn only — log alerts at 50%, 80%, 100%', 'peptide-news' ), 'hard_stop' => __( 'Hard stop — block API calls when budget is reached', 'peptide-news' ), ); echo ''; } public static function render_cost_retention_field(): void { $value = absint( get_option( 'peptide_news_cost_retention', 365 ) ); printf( '', $value ); echo '

' . esc_html__( 'How long to keep detailed cost records. Minimum 30 days.', 'peptide-news' ) . '

'; } }