How the RSS Integration Works (Step-by-Step)
- Trigger
- Manual: Click “Refresh Counts & RSS Now” button in Status Dashboard.
- Automatic: Runs inside the monthly auto-pull (2nd of the month at 2 AM) and also when “Post Articles” or “Post From Start Date” is used.
- Safety Lock
- A 5-minute transient lock (dp_rss_processing_lock) prevents overlapping runs.
- Processing Each Feed
- Only enabled feeds are processed.
- Uses wp_remote_get() with 15-second timeout.
- Parses the RSS with simplexml_load_string().
- Filters to current month only (compares pubDate to today’s month/year).
- Weekly feeds additionally skip articles older than 7 days.
- Respects the per-feed article limit (stops after X items).
- Checks for duplicate posts by title + date (updates existing post if found).
- Category Mapping
- If “Auto”: creates or uses a category from the domain name.
- If a category is selected: uses that exact WordPress category (slug).
- Dynamic Post categories are excluded from the dropdown to prevent accidental mapping.
- Image Handling
- Extracts the first image from the RSS item description.
- If toggle is OFF (default): hot-links the original image URL (_thumbnail_ext_url meta).
- If toggle is ON: saves the image to the WordPress Media Library using the existing generate_featured_image_by_url() function and sets _thumbnail_id.
- Post Creation
- Uses the selected Post Status.
- Author is set to the Service2Client user.
- Date is taken from the RSS pubDate.
- Stores the original RSS link and other metadata.
- Last Import Timestamp
- Each feed shows “Last imported: Apr 11, 2026 12:33 AM (3 new posts)” in the settings panel.
3. Key Safety & Performance Features
- Circuit breaker protects against repeated failures (same as the main API).
- Transient lock prevents multiple simultaneous RSS runs.
- Only current-month articles are pulled (no old archive spam).
- Graceful handling of blocked hot-links or empty feeds.
- No impact on main Dynamic Post API logic (Free/Full behavior unchanged).
4. How RSS Posts Appear on Your Site
- RSS posts are normal WordPress posts (category-mapped as chosen).
- They respect your theme, shortcodes, and all existing display rules.
- The disclaimer is not added to RSS posts (only to Dynamicontent.net API articles).
- Shortcodes like [dynamic-post] and [dynamic-posts] work with RSS-mapped categories.
5. Quick Summary of What Changed in v7.5
- Added the 4 new per-feed controls (enable/disable, post status, save-to-media toggle, last-import display).
- Made the toggle a clean On/Off slider.
- Ensured “Reads Now” and “Reads All” work correctly with RSS posts.
- All previous features (historical posting, version checking, API/Blog counts, etc.) remain untouched.
Article ID: 129, Created: 4/10/2026 at 11:37 PM, Modified: 4/10/2026 at 11:37 PM