=== DaazSync – RSS News Aggregator ===
Contributors: daazlabs
Tags: rss, feed, news, aggregator, atom
Requires at least: 5.6
Tested up to: 7.0
Stable tag: 1.2.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add unlimited RSS/Atom feeds and display beautiful news sections anywhere on your site — 5 layouts, shortcodes, auto-import. No coding required.

== Description ==

**DaazSync** turns any WordPress site into a real-time news hub. Point it at any RSS or Atom feed, choose a layout and paste a shortcode — your curated news section is live in minutes.

No coding. No page-builder lock-in. No external dependencies.

= ✅ Everything You Need — Completely Free =

**5 Ready-to-Use Display Layouts**

Pick the layout that fits your design and switch it per shortcode:

* **Grid** — responsive card grid, ideal for magazine-style pages and news portals
* **List** — clean vertical list, perfect for sidebars and content-heavy pages
* **Carousel** — auto-playing or click-to-advance article slider
* **Hero** — large featured article with supporting cards alongside
* **Minimal** — ultra-light display for footers, widgets and embeds

**Unlimited RSS / Atom Feeds**

Add as many sources as you need. Each feed gets its own category, enabling tight per-shortcode filtering without any extra configuration.

**Powerful Shortcode System**

One shortcode gives you full control over every news block:

`[newssync layout="grid" limit="6" category="Tech"]`

Available attributes:

* `layout` — grid, list, carousel, hero, minimal
* `limit` — how many articles to display
* `category` — show only feeds from a specific category
* `offset` — skip the first N articles (great for multi-column layouts)
* `orderby` / `order` — sort by date or title, ascending or descending
* `show_image`, `show_date`, `show_excerpt`, `show_source` — toggle each element independently
* `excerpt_length` — set how many words appear in the preview

**Auto-Import as WordPress Posts**

Enable the built-in scheduler and new articles from your feeds become real WordPress posts — fully searchable, categorisable and SEO-friendly. Run imports on a schedule or trigger them manually from the dashboard.

**Smart Caching**

Each feed is cached independently as a WordPress transient. You control the duration. Zero front-end API calls — output is clean, static HTML.

**Works Everywhere**

Compatible with the Gutenberg editor (Shortcode block), Elementor, Divi, Beaver Builder, the Classic Editor and any PHP template.

---

= 🚀 Take It Further with DaazSync PRO =

DaazSync PRO is a premium add-on that extends the free plugin with advanced tools for demanding publishers, agencies and power users.

**Keyword Filtering per Shortcode**
Display only articles that match specific topics — using simple OR logic or precise AND-groups to show articles at the intersection of two subjects:

`[newssync keyword_filter="AI,machine learning|crypto,blockchain,DeFi"]`

→ Shows only articles that mention **both** AI **and** a crypto topic.

**Site-Wide Advanced Filtering**
Set global include and exclude keyword rules from the admin panel. Every shortcode on every page respects them automatically.

**Full-Text Extraction**
Standard RSS feeds only carry a short excerpt. PRO fetches the full article body from the source page — ideal for richer display or AI summaries.

**AI-Powered Article Summaries**
Auto-generate article summaries in your language using OpenAI (GPT-4o), Anthropic Claude, Google Gemini or any custom API provider. Bring your own key — no middleman markup.

**Managed Feeds Dashboard**
A production-ready feed management table with live status indicators, one-click manual refresh, last-import timestamps and per-feed error reporting.

**Detailed Import Logs**
Per-article status, error traces and batch timing — so you always know exactly what happened during an import and can diagnose feed problems in seconds.

**Priority Support**
Direct email support with a guaranteed 48-hour response.

[Upgrade to PRO →](https://daazlabs.com/daazsync-pro)

---

= 👤 Who Uses DaazSync? =

* **Bloggers and content creators** who want to automatically embed related news inside their posts
* **News portals** aggregating content from multiple sources into topic-based sections
* **Agencies** managing multiple client sites that need automated, always-fresh news areas
* **Niche communities** curating content around tech, crypto, finance, sport or any other topic
* **Corporate intranets** surfacing industry news for internal teams without manual curation

---

= ⚡ Get Started in 3 Steps =

1. Activate DaazSync and go to **DaazSync → Feeds**
2. Add your first RSS/Atom feed and assign it a category
3. Paste `[newssync layout="grid" limit="6"]` into any page

That's it — your live news feed is ready.

== Installation ==

= From the WordPress Plugin Directory =

1. Go to **Plugins → Add New** in your WordPress admin
2. Search for **DaazSync**
3. Click **Install Now**, then **Activate**

= Manual Installation =

1. Download the ZIP from the plugin page
2. Go to **Plugins → Add New → Upload Plugin**
3. Upload the ZIP and click **Install Now**, then **Activate**

= After Activation =

1. Go to **DaazSync → Feeds** and click **Add Feed**
2. Paste an RSS or Atom URL and assign a category to the feed
3. Use `[newssync layout="grid" limit="6"]` on any page or post
4. Optionally enable auto-import under **DaazSync → Settings → Auto-Import**

== Frequently Asked Questions ==

= Is DaazSync really free? =

Yes. The core plugin — unlimited feeds, 5 layouts, the full shortcode system, auto-import and caching — is 100% free and open source (GPLv2).

DaazSync PRO is a separate paid add-on that adds keyword filtering, AI summaries, full-text extraction and advanced logging. It is completely optional.

= How many RSS feeds can I add? =

Unlimited. There is no cap on the number of feeds in either the free or PRO version.

= What layouts are included in the free version? =

Five: **Grid**, **List**, **Carousel**, **Hero** and **Minimal**. All are fully responsive and configurable via shortcode attributes — no CSS required.

= Can I show different news sections on different pages? =

Yes. Every `[newssync]` shortcode is independent. Use a different layout, limit, category and display settings on each page. You can even place multiple shortcodes on the same page to build multi-column news layouts.

= Does it work with Elementor, Divi or other page builders? =

Yes. DaazSync uses a standard WordPress shortcode that works in any editor or page builder that supports shortcodes — including the Gutenberg Shortcode block, Elementor, Divi, Beaver Builder and the Classic Editor.

= Can I filter articles to show only news about a specific topic? =

The free version supports category-level filtering: assign a category to each feed and use `[newssync category="Tech"]` to show only that category. Keyword-level filtering (showing only articles that contain specific words) is a DaazSync PRO feature.

= Can imported articles become real WordPress posts? =

Yes. Enable the auto-import scheduler under **DaazSync → Settings → Auto-Import**. New articles from your feeds will be created as regular WordPress posts — fully indexed by search engines and your site's internal search.

= Will this slow down my website? =

No. Feed data is cached as WordPress transients and served as plain HTML. The only JavaScript loaded is a lightweight Swiper instance for the Carousel layout. There are no front-end API calls.

= Does the plugin send my data to external servers? =

No. DaazSync only contacts the RSS feed URLs you configure. It does not transmit your site data, user data or any personal information to any external service. The optional PRO AI summary feature connects directly to the AI provider you choose, using your own API key.

= My feed shows no articles — what should I try? =

1. Open the feed URL in a browser to confirm it is valid and returns XML
2. In **DaazSync → Feeds**, click the **Refresh** button on the feed
3. Clear the plugin cache under **DaazSync → Settings → Cache**
4. If the feed uses a non-standard encoding or requires a specific User-Agent, enable the **Force Feed** option in the feed settings

= What is the difference between "Run now (schedule)" and "Run now (direct)"? =

**Run now (schedule)** queues an import job via WP-Cron — it runs in the background on the next cron tick. **Run now (direct)** executes one import batch immediately in your browser session, which is useful when WP-Cron is disabled on your server or when you want to test a feed instantly.

= Where can I get support? =

Free support is available on the [WordPress.org support forum](https://wordpress.org/support/plugin/daazsync/). PRO customers receive priority email support with a 48-hour response guarantee.

== Screenshots ==

1. **Feed Manager** — add, organise and refresh all your RSS/Atom feeds from a single clean dashboard.
2. **Add Feed** — configure the feed URL, category label, cache duration and import options in one form.
3. **Grid Layout** — responsive magazine-style card grid, ideal for news portals and front pages.
4. **List Layout** — clean vertical article feed, perfect for sidebars and content-heavy pages.
5. **Carousel Layout** — auto-playing article slider with manual navigation controls.
6. **Hero Layout** — large featured article paired with supporting cards — great for homepages.
7. **Settings Panel** — configure import schedule, image handling, cache duration and display defaults.
8. **PRO – Keyword Filter** — filter the displayed articles by topic, using AND-group logic per shortcode.

== Changelog ==

= 1.2.1 =
* Fix: Critical error ("There has been a critical error on this website") that could occur on any page displaying a [newssync] shortcode, caused by a WordPress core SimplePie edge case where an RSS item's parsed date returns as a float instead of an integer, triggering an uncaught TypeError on PHP 8.1+. Date handling now avoids the unsafe SimplePie code path entirely.

= 1.2.0 =
* New: "Media & Post Cleanup" tool on the Tools admin page — manually delete RSS-downloaded photos (and optionally their articles) older than 15/30/60 days, with a preview (dry-run) mode before anything is deleted.
* Fix: RSS-downloaded photos were never cleaned up even after their article was deleted, because they were stored as unattached media — a new safe-delete helper now checks that a photo isn't still referenced by another post (e.g. as a shared thumbnail) before removing it, and cleans it up automatically when its post is deleted.
* New: 5 additional stock placeholder images (10 total) for the CDN hotlink-block fallback introduced in 1.1.9.

= 1.1.9 =
* Fix: Images from external CDNs (e.g. CoinTelegraph) now fall back to placeholder images when the CDN blocks hotlinking.
* Improvement: Added newssync/live_item_img filter to allow PRO to enrich live RSS images via background og:image lookup.

= 1.1.8 =
* Fix: Article links now use the canonical GUID URL when the RSS <link> field points to a defunct tracking subdomain (e.g. conpletus.cointelegraph.com).
* Fix: Images now display correctly in live RSS mode (img_url field was not being mapped to the img key expected by layout templates).

= 1.1.7 =
* Improvement: Added extensibility hook (newssync/pre_item_fetch) to allow async feed loading in DaazSync PRO.

= 1.1.6 =
* Fix: Clear Cache now also flushes WordPress's built-in SimplePie feed cache, eliminating stale or corrupted data from feeds that have since gone offline.

= 1.1.5 =
* Fix: Dead or unreachable feeds no longer cause a page timeout on every load — fetch failures are now cached for 5 minutes.

= 1.1.4 =
* Improvement: Admin documentation tab expanded with complete shortcode parameter reference and additional examples.
* Fix: custom_css_class attribute added to shortcode parameter table.

= 1.1.3 =
* New: Option to disable placeholder images when a feed item has no image (Settings → Display → Placeholder Images).
* Improvement: Automatic dark mode support for themes that use prefers-color-scheme: dark.
* Fix: show_image="no" and hide_image="yes" now work correctly in Grid and Carousel layouts.

= 1.1.2 =
* Fix: keyword_filter shortcode attribute now works correctly with carousel and hero layouts.

= 1.1.1 =
* Integration: added Freemius licensing and upgrade flow.
* Admin: added Upgrade to PRO button in header and PRO features card in Settings → PRO tab.
* Admin: fixed Tools page buttons (Clear Cache, Dismiss Notice, Show/Hide guide).

= 1.1.0 =
* Security: removed all debug output; added ABSPATH guards across all files.
* HTTP: centralised request wrappers with proper User-Agent header and timeout defaults.
* Admin: enqueued assets correctly; removed inline scripts and styles.
* AJAX: improved error handling for manual import actions.
* Code: full PHPCS prefix compliance and i18n fixes throughout.

= 1.0.0 =
* Initial public release.
* Core RSS/Atom aggregation and display engine.
* Five built-in layouts: Grid, List, Carousel, Hero and Minimal.
* Auto-import scheduler with WP-Cron integration.
* i18n ready with .pot file included.