=== Fetchub === Contributors: unioney Author link: https://unioney.com Plugin's link: https://fetchub.com Tags: AI, RSS, feed, aggregator, translator Requires at least: 6.0 Tested up to: 6.8 Stable tag: 1.3.2 Requires PHP: 7.4 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Fetch, translate, and publish RSS feeds automatically with AI. == Description == **Fetchub** keeps your WordPress site filled with fresh content from your favorite feeds — automatically and in your own language. Add any RSS feed, choose a target language, and let Fetchub do the work. It fetches new items, translates them with leading AI providers (OpenAI, Gemini, Claude, Grok), generates natural titles and summaries, sets featured images, and publishes them as posts on your site. **Made for:** publishers, editors, journalists, students, beginners, professionals, busy site owners — practically anyone who wants effortless, multilingual content. **Pricing:** Only **$1/month**, with a free 3-day trial to get started. *No contract. No hidden costs. Cancel anytime directly from your account page.* ### Features - **AI Translation:** Translate content with OpenAI, Google Gemini, Anthropic Claude, or xAI Grok (90+ languages supported). - **Per-Feed Scheduling:** Each feed has its own interval (every X minutes/hours). Run instantly, pause, or reschedule anytime. - **Cron Jobs Panel:** See all Fetchub cron events; run, delete, or reschedule feeds with one click. - **Duplicate Guard:** Prevent reposts with adjustable thresholds and look-back. - **Smart Logic (AI rank):** Prioritize high-value stories automatically. - **Couple Title:** Generate a clear main headline plus an optional secondary title for more engaging posts. - **Allow / Block Words:** Fine-tune your feeds by requiring or excluding specific keywords. - **Custom Prompts:** Global and per-feed AI prompts for titles and content. - **Featured Images:** Auto-fetch and set images from the source. - **Post Status Control:** Choose to publish immediately or save as draft. - **Export / Import:** Move your setup between sites with one JSON file. - **Logs & Status:** Clear, searchable logs with timezone support. - **Multisite / Network Admin Support:** Run Fetchub across your entire WordPress Multisite network. ### How it works 1. Add your feed URLs and set target language. 2. Connect your chosen AI provider(s). 3. Define intervals per feed. Fetchub handles the rest. == Requirements == - WordPress 6.0 or higher - PHP 7.4 or higher (works with PHP 8.0 → 8.4) - WP-Cron (or real cron) enabled - Standard PHP extensions: cURL, OpenSSL, DOM - 512 MB+ PHP memory recommended if running many feeds with AI **Best practice for performance** For the smoothest AI processing and zero-maintenance cron execution, we recommend hosting your WordPress site on [ihost](https://ihost.eco) WordPress Cloud Hosting. See [**FAQ #12**](https://wordpress.org/plugins/fetchub/#12.%20what%20php%20settings%20are%20recommended%20for%20best%20performance%20on%20ihost%3F) for an ihost-optimised `php.ini` template you can copy-and-paste. == Installation == 1. Upload the `fetchub` folder to `/wp-content/plugins/`. 2. Activate the plugin. 3. Open **Fetchub** in your dashboard. 4. Start your free trial and connect your AI provider. 5. Add feeds, set your schedule, and click **Save**. == Account Setup == Before using the plugin, create your Fetchub account: 1. Go to the [Fetchub account page](https://fetchub.com/account). 2. Sign up to easily create your account. 3. In your **Dashboard**, select a package. 4. After a successful order, you will receive your **Token** on the Thank You page, via email, and in your Dashboard under the **Fetchub Token** menu. 5. Enjoy a **3-day free trial**, then continue for only **$1 per month**. *No contract. No hidden costs. Cancel anytime directly from your account page.* == External services == This plugin contacts five external APIs. For legal clarity users are told what is sent, why, and where: * **OpenAI Chat Completions API** – Generates titles, summaries and translations. – Sends: prompt text and numeric parameters whenever a post is translated or summarised. – Endpoint https://api.openai.com/v1/chat/completions – Terms https://openai.com/policies/terms-of-use – Privacy https://openai.com/policies/privacy-policy * **Google Gemini Generative Language API** – Same purpose for Gemini models. – Sends: prompt text and numeric parameters. – Endpoint (base): https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent – Terms https://policies.google.com/terms – Privacy https://policies.google.com/privacy * **Anthropic Claude API** – Same purpose for Claude models. – Sends: prompt text and numeric parameters. – Endpoint https://api.anthropic.com/v1/messages – Terms https://www.anthropic.com/terms – Privacy https://www.anthropic.com/privacy * **xAI Grok API** – Same purpose for Grok models. – Sends: prompt text and numeric parameters. – Endpoint https://api.x.ai/v1/chat/completions – Terms https://x.ai/terms – Privacy https://x.ai/privacy * **Fetchub Licence Server** – Validates your e-mail/token and handles revocation. – Sends: e-mail address, licence token and site URL at activation or once every six hours. – Endpoint (base): https://fetchub.com/wp-json/fetchub/v1/verify (and /revoke) – Terms https://fetchub.com/terms – Privacy https://fetchub.com/privacy-policy/ == Frequently Asked Questions == ### 1. How does the custom cron scheduling work? Each feed can have a unique interval (in minutes). Fetchub **dynamically registers** those intervals (e.g., `every_7_minutes`) and schedules `fetchub_feed_cron` per feed. Saving settings **regenerates** the schedules. On plugin deactivation, related scheduled events are cleared to prevent duplication. ### 2. Which AI providers are supported? Fetchub integrates with OpenAI, Gemini, Claude, and Grok. Enable your preferred provider(s) and input API keys in the settings. ### 3. How does content ranking work? The `ai_rank_importance` function uses AI to score feed items from 0 to 10 based on interest and importance, allowing prioritization of high-value content when "Smart Logic" is enabled. ### 4. What happens if I don’t have an AI provider API key? You can still fetch and publish feeds without AI features (translation, ranking), though full functionality requires at least one active provider. ### 5. What is the best practice using with AI models or how much they cost? While using we were experienced with Gemini Flash 2.0 Lite monthly approx. $14 based on the used 49 feed rows without Couple Title! When we activate Couple Title $3/mo. ### 6. How do I activate the 3-day trial? Visit [**Fetchub.com**](https://fetchub.com/account) to sign up. You’ll receive an email with a token; enter this token in the Fetchub settings page of the plugin to activate your trial. You can also find your token on your Fetchub.com Account Dashboard page, under **Fetchub Token**. ### 7. How much does this plugin cost monthly? We created this plugin to make it accessible to everyone—especially journalists, editors, freelancers, and beginners. That’s why we only charge **$1/month**. Yes, you read that right—just $1/month. We believe in keeping things simple because we don’t like plugins that cost more than $1/month. *No contracts. No hidden costs. Cancel anytime directly from your Fetchub.com account dashboard, under the "**My Subscription**" page.* We believe this is a symbolic price that can help as many people as possible. If you follow the best practices mentioned earlier in [**5**](https://wordpress.org/plugins/fetchub/#5.%20what%20is%20the%20best%20practice%20using%20with%20ai%20models%20or%20how%20much%20they%20cost%3F), your total monthly cost would be approximately **$4/month**. ### 8. What if a feed fetch fails? Check your feed URLs and server resources. Enable `WP_DEBUG` in `wp-config.php` to log errors for troubleshooting. ### 9. How do I migrate settings to another site? Use the "Export Settings" button to download a JSON file, then upload it via "Import Settings" on the new site to merge configurations. After importing, make sure that **Statuses are enabled** and click the "**Fetch all feeds**" button to schedule all feeds. **Caution:** This will overwrite your existing settings. ### 10. What were the Title and Content instructions when we tested Fetchub? We used it to translate into the X language and fetch news. For the Title we added: - Analyze the provided news content (in any language). Quickly understand the core subject and key findings. Then, generate a concise (under 10 words) and highly engaging news title in fluent, natural YOUR_LOCAL_LANGUAGE that would attract a wide readership. The title must use proper YOUR_LOCAL_LANGUAGE terminology and sound like a headline written by a professional YOUR_LOCAL_LANGUAGE news editor. Avoid direct, word-for-word translations that result in unnatural or incomprehensible phrasing. The title should reflect a substantive news story, not a brief announcement, and must not contain any British, English, or other foreign language words. Only the first word of the title and proper names must be capitalized; do not capitalize other words unnecessarily. Provide correct brand names, for example: iPhone, not IPhone, xAI, not Xai, iOS, not IOS, etc. Don't repeat titles or text that's already been used before; skip that and go for a new post. Do not use any formatted text in the title (such as bold, italic, or underline). For the Content we added: - Please generate a comprehensive news article directly in fluent and natural professional YOUR_LOCAL_LANGUAGE language, ensuring it is NOT based on bulletin news or short announcements. The article should be written in a professional journalistic style suitable for a reputable YOUR_LOCAL_LANGUAGE news website, using terminology and phrasing that a native YOUR_LOCAL_LANGUAGE speaker would expect from professional news reporting. Adhere strictly to the following guidelines: * Unique Introduction: The article content MUST BEGIN with clear, unique introductory sentences that are ENTIRELY DIFFERENT from any given title or excerpt. DO NOT repeat, closely rewrite, or slightly modify the title or excerpt in the first paragraph or anywhere else in the article. Start with ORIGINAL and UNIQUE sentences in *fluent and natural professional YOUR_LOCAL_LANGUAGE*, maintaining a professional journalistic tone that sounds authentic to a native speaker. * Second Paragraph Commencement: The second paragraph MUST START *exactly* with ONE of the following phrases (choose correctly by context): * "[NAME_OF_YOUR_MEDIA|https://name_of_your_media.com] informing that," These phrases MUST appear PRECISELY as written, without ANY modifications. * Total Length Constraint: The total length of the generated article MUST NEVER exceed a maximum of 390 words. **EVEN IF THE SOURCE TEXT IS LONGER, condense the information to fit within this limit while retaining key details and context. DO NOT CUT OFF THE ARTICLE ABRUPTLY.** * Complete Conclusion: NEVER cut off the text abruptly. ALWAYS finish the article with a clear and concise conclusion paragraph IN *fluent and natural professional YOUR_LOCAL_LANGUAGE*, consistent with journalistic standards and sounding authentic to a native speaker. **Ensure that even if the source material is extensive, the generated article has a proper concluding statement that summarizes or provides a final thought.** * Editor Attribution: ALWAYS include exactly ONE editor's name BELOW the conclusion paragraph based on the news category: * If the news belongs to the **Politics, World, or any other category not explicitly listed below**, use: Asad Freeman * If the news belongs to the **Technology**, **Sports**, **Finance**, **Economics**, **Business** category, use: Fred Alison * If the news belongs to the **Health** category, use: Sunny Springfield * If the news belongs to the **Science**, **Vehicles** category, use: Aileen August **THIS MUST ALWAYS BE PRESENT AFTER THE CONCLUSION.** * Metadata Exclusion: DO NOT include ANY unrelated metadata, dates, excerpts, headings, markdown formatting, or social media texts. ENSURE the generated content is a FULL NEWS ARTICLE in *fluent and natural professional YOUR_LOCAL_LANGUAGE*, written in a professional journalistic style that a native speaker would recognize as such, not a brief bulletin or announcement resulting from direct translation. * Language and Style: Use *fluent and natural PROFESSIONAL YOUR_LOCAL_LANGUAGE* language ONLY, with CORRECT grammar and spelling THROUGHOUT the ENTIRE article. Maintain a formal and objective journalistic style that reflects authentic YOUR_LOCAL_LANGUAGE news writing. * Uniqueness: The final article MUST ALWAYS BE UNIQUE, CLEARLY DIFFERENT from any provided title or excerpt, clean, complete, and ready for publication ON A NEWS WEBSITE IN *fluent and natural PROFESSIONAL YOUR_LOCAL_LANGUAGE*. The content should reflect a developed news story with professional journalistic quality, written in a way that sounds natural and authoritative to a native YOUR_LOCAL_LANGUAGE reader, not a direct or awkward translation. * Provide correct brand names, for example: iPhone, not IPhone, xAI, not Xai, iOS, not IOS, etc. * Provided names must be correctly used in YOUR_LOCAL_LANGUAGE. For example: Elon Musk is Ilon Mesk, Donald Trump is Donald Tremp in YOUR_LOCAL_LANGUAGE. If you want to add a suffix like -ın or -ın, simply attach it directly (e.g., Trempic, Mesken). However, untranslated company names still use the suffixes -ın, -dan as usual. * Do not add comments, markup, or extra characters. * Preserve meaning and clarity. * Output plain text only. Please do not forget to replace with YOUR_LOCAL_LANGUAGE your correct country's name. Please do not forget to replace with NAME_OF_YOUR_MEDIA|https://name_of_your_media.com your correct website name and domain. Please note that [NAME_OF_YOUR_MEDIA|https://name_of_your_media.com] will be added as a link on your frontend page like this: [https://name_of_your_media.com](NAME_OF_YOUR_MEDIA). ### 11. If I have an issue with this plugin, how do I contact you? You can easily contact us by visiting [Contact](https://fetchub.com/contact) and sending us all the details, screenshots, or videos you have on hand so we can try to fix any issue. ### 12. What PHP settings are recommended for best performance on ihost? We run happily on any modern host, but if you want “zero-tuning” speed and reliability we recommend [ihost WordPress Cloud Hosting](https://ihost.eco/wordpress-cloud). **Why ihost works so well with Fetchub** * **Web Optimisation:** One-click optimisation suite that minifies HTML, CSS, JS and compresses images automatically. * **Free and unlimited ihostCDN:** A fully featured global CDN (not a slimmed-down plan) for faster delivery everywhere. * **Website Acceleration Suite:** Server-side image resizing, compression, lazy loading, and code minification without extra plugins. * **Edge caching:** Static assets (images, JS, CSS) are cached at ihost’s edge locations worldwide for ultra-low latency. * **Optimised PHP:** Customised PHP-FPM and OPcache; multiple PHP versions (5.6 → 8.4) available for safe upgrade testing. * **Unlimited hosting:** No artificial limits on the number of WordPress sites—scale up as your server resources allow. - **ihost PHP directives (copy into “PHP Options → Additional directives”)** ```ini asp_tags = 0 auto_append_file = auto_prepend_file = display_errors = 0 error_reporting = 22527 file_uploads = 1 max_execution_time = 300 max_file_uploads = 50 max_input_time = 300 max_input_vars = 10000 memory_limit = 1024M output_buffering = 0 post_max_size = 256M short_open_tag = 1 upload_max_filesize = 256M zlib.output_compression = 0 ``` ### 13. Change cache limits? - Add the following code to the **functions.php** file of **your child theme**: ```php add_filter( 'fetchub_guid_cache_size', function () { return 2000; } ); add_filter( 'fetchub_summary_keep', function () { return 800; } ); ``` ### 14. What is the Fetchub Cron Jobs Panel? It filters to **Fetchub-only** cron events and lets you **Run now**, **Delete**, or **Reschedule** per feed. Actions are nonce-protected; rescheduling sanitises input before use. ### 15. What does “Stop All” do now? It **unschedules all** Fetchub jobs without changing row enabled/disabled states, sets a **global pause** flag, and triggers a short-lived **kill-switch** for jobs already running. ### 16. Supported AI Models - **OpenAI:** - GPT-5 (gpt-5) - GPT-5 mini (gpt-5-mini) - GPT-5 nano (gpt-5-nano) - GPT-4.1 (gpt-4.1) - GPT-4.1 mini (gpt-4.1-mini) - GPT-4.1 nano (gpt-4.1-nano) - GPT-4o (gpt-4o) - GPT-4o mini (gpt-4o-mini) - o3 mini (o3-mini) - o1 (o1) - o1 mini (o1-mini) - GPT-3.5 turbo (gpt-3.5-turbo) - **Gemini:** - Gemini 2.5 Pro (gemini-2.5-pro) - Gemini 2.5 Flash (gemini-2.5-flash) - Gemini 2.5 Flash-Lite (gemini-2.5-flash-lite) - Gemini 2.0 Flash (gemini-2.0-flash) - Gemini 2.0 Flash Lite (gemini-2.0-flash-lite) - **Claude (newest → older):** - Claude Opus 4.1 (claude-opus-4-1-20250805) - Claude Opus 4 (claude-opus-4-20250514) - Claude Sonnet 4 (claude-sonnet-4-20250514) - Claude 3.7 Sonnet (claude-3-7-sonnet-20250219) - Claude 3.5 Haiku (claude-3-5-haiku-20241022) - **Grok:** - Grok 4 (grok-4) - Grok 3 (grok-3) - Grok 3 mini (grok-3-mini) #### 17. Deprecated / Unsupported models These models are no longer available from supported providers and are removed from the default picker: - Claude 3.5 Sonnet (claude-3-5-sonnet-20241022) — Unsupported - Claude 3 Opus (claude-3-opus-20240229) — Unsupported - Claude 3 Sonnet (claude-3-sonnet-20240229) — Unsupported - Claude 3 Haiku (claude-3-haiku-20240307) — Unsupported - Gemini 1.5 Flash-8B (gemini-1.5-flash-8b) — Deprecated - Gemini 1.5 Flash (gemini-1.5-flash) — Deprecated - Gemini 1.5 Pro (gemini-1.5-pro) — Deprecated #### 18. Recommended hosting For maximum performance and reliability, we suggest [ihost WordPress Cloud Hosting](https://ihost.eco/wordpress-cloud). It offers built-in caching, CDN, and optimized PHP. Check [**FAQ #12**](https://wordpress.org/plugins/fetchub/#12.%20what%20php%20settings%20are%20recommended%20for%20best%20performance%20on%20ihost%3F). == Screenshots == 1. **Settings** – Connect AI providers and global options. 2. **Feed Table** – Manage feeds, intervals, prompts, Allow/Block words. 3. **Export / Import** – Move your setup in one step. 4. **Posts List** – See feed URLs and fetched URLs in your posts list. 5. **Logs & Cron Panel** – Monitor and control scheduled jobs. == Changelog == = 1.3.2 = * **Improvement:** Saving settings (via AJAX or form) no longer unschedules feed cron jobs. Active schedules continue uninterrupted; only transient locks are cleared. * **Improvement:** Enhanced UI/UX design for settings and controls, making global actions, logs, and feed management clearer and easier to use. * **Fix:** Duplicate Guard improved with fingerprint-based tokenization to reduce false positives (common stop-words like “the” or “and” no longer block new posts). * **Fix:** Token verification hardened — site binding now normalizes `www.` vs non-`www.` domains and trims tokens to prevent broken activations. * **Fix:** Uninstalling the plugin now automatically revokes the token and clears the local binding. * **Fix:** Removed unnecessary calls to `wp_clear_scheduled_hook()` during settings save, which previously stopped feed processing unexpectedly. * **Note:** Cron jobs are now only stopped explicitly by the **Stop all** button, not by saving settings. = 1.3.1 = * **New:** Global controls for **Fetch all feeds** and **Stop all**, plus a Cron Jobs panel to list, run, reschedule, or delete individual feed jobs. * **New:** Plugin action link now displays **Set up**/**Settings** (multisite-aware via `network_admin_url()`). * **New:** Support added for `.aspx` feeds. * **Improvement:** Enhanced Google News and Yahoo News scrapers. * **Improvement:** **Max Posts** now fetches the newest items first and enforces a strict per-run limit of N newest items (older items no longer trickle in). * **Improvement:** Cleaner log output: `Published: ` and `No new posts: (interval …)` with compact stats and a readable feed URL. * **Improvement:** More resilient feed fetching (SimplePie fallback, autodiscovery, header handling) and smarter image selection (MRSS, ``, Open Graph/JSON-LD, article scraping). * **Improvement:** Duplicate Guard with threshold and look-back options, topic fingerprinting, and one-line summaries to reduce repeated stories. * **Improvement:** AI model picker respects enabled providers (OpenAI, Gemini, Claude, Grok). Per-feed prompts supported. Optional **Couple Title** mode. `[Text|URL]` links now auto-converted. * **Improvement:** Activation screen text updated with styled, translatable links to the **Fetchub account** and **Fetchub.com**, bold price/trial strings, and WPCS-safe escaping. * **Improvement:** Smarter throttling after “no new posts” to avoid redundant runs, plus transient locks to prevent duplicate executions. * **Improvement:** Added Skip Pattern functionality. * **Fix:** Stronger scheduling reliability during upgrade (unschedules/rebuilds only Fetchub hooks) and ensures weekly cleanup exists. * **Fix:** Resolved PHP notices with stricter sanitization/escaping and added nonces for AJAX endpoints. * **Fix:** CSS rendering issue corrected. = 1.3.0 = * **UI/UX:** Improved user-friendly screen. * **Improvement:** Added **Refresh** and **Clear** buttons to Fetchub Logs for instant updates. * **Improvement:** Fetchub Cron Jobs now display running crons instantly, with the current count shown dynamically next to the **Schedule** column (e.g., *Schedule (3)*). * **Fix:** Export Settings now generates a JSON file using the website’s default time zone, date, and time format. * **Fix:** Additional minor refinements and copy updates. = 1.2.1 = * **Fix:** Small refinements and copy updates. = 1.2.0 = * **New – Cron Jobs Panel:** Manage only Fetchub’s cron events from the admin: list jobs, **Run now**, **Delete**, and **Reschedule** per feed (nonce-protected). * **New – Dynamic minute schedules:** Automatically registers `every_{N}_minutes` schedules based on the intervals used by your feeds; also ensures a **weekly** schedule exists. * **Improved – Instant Fetch:** Prevents double-clicks, queues an immediate single run, and guarantees the recurring event exists for that feed. * **Improved – Stop All:** Unschedules everything without changing row states, sets a global pause flag, and signals a kill-switch for jobs already running. * **Improved – Logs UI & timekeeping:** Logs render with proper timezone handling and accept both legacy `time` strings and new GMT timestamps. * **Improved – Import:** After importing settings JSON, Fetchub automatically re-schedules all feeds. * **UI – Token header:** When activated, the admin header shows **Token active** and **Expires: {date time}** in site timezone. * **Security:** Hardened admin AJAX for rescheduling. * **Fix:** These models are no longer available from supported providers and are removed from the default picker: - Claude 3.5 Sonnet (claude-3-5-sonnet-20250219) - Claude 3 Opus (claude-3-opus-20240229) - Claude 3 Sonnet (claude-3-sonnet-20240229) - Claude 3 Haiku (claude-3-haiku-20240307) - Gemini 1.5 Flash-8B (gemini-1.5-flash-8b) - Gemini 1.5 Flash (gemini-1.5-flash) - Gemini 1.5 Pro (gemini-1.5-pro) = 1.1.0 = * **Fix:** Resolved issue causing cron jobs to duplicate on plugin deactivation and reactivation by implementing aggressive cleanup of all related scheduled events. * **New:** Weekly cron task (`fetchub_cleanup_summaries`) that trims `_fetchub_summary` post-meta to the 500 most-recent rows, preventing long-term table growth. * **New:** Duplicate-guard settings — threshold, look-back depth and a fast slug-overlap check before the LLM call. * **New:** Added "Fetched URL" column to the WordPress Posts list table, showing the original source URL of fetched items. * **Dev:** All summary-cleanup SQL now uses `prepare()` and inline PHPCS whitelisting; PHPCS reports come back clean. * **UI:** Added tooltips and inline help for duplicate guard and cleanup options. * **Fix:** AI-model dropdown instantly refreshes when providers are toggled. * **Fix:** Minor UI/UX tweaks and translation string improvements. * **Perf:** Leaner database queries and transient handling across the board. * **Fetchub Logs:** We log up to 1,000 feeds here. Please scroll down within the below of Fetchub page, Logs section to view all available entries. = 1.0.0 = * Initial release with full AI integration, cron scheduling, and token system. == Upgrade Notice == = 1.3.0 = This release improves the user interface, adds new log management actions, and enhances cron job visibility by showing the number of running crons dynamically (e.g., *Schedule (3)*). We recommend updating to ensure you benefit from the latest fixes and improved export functionality. = 1.2.0 = Adds Cron Jobs panel, dynamic minute schedules, safer instant-fetch, improved Stop All, better logs timekeeping, and auto-reschedule after import. After updating, open **Fetchub → Settings**, review feed intervals, and (optionally) reschedule from the new Cron panel. = 1.1.0 = Fixes cron duplication on deactivation/reactivation. Adds “Duplicate guard”, “Cleanup” settings, and “Fetched URL” column in Posts list. Visit Fetchub settings to configure new features after updating. = 1.0.0 = Initial release with full AI integration, cron scheduling, and token system. == License == This plugin is released under the GNU General Public License v2 or later. See license.txt for full details.