Commit Graph
5 Commits
Author SHA1 Message Date
Keith Solomon 7887f7d9ce feature: Add reset-cache action to settings page
Adds a 'Reset cache' button to the Podcast RSS Import settings page that
clears the SimplePie feed-cache rows (both the cached XML and the
modification timestamp) plus the importer's per-feed import lock for the
configured feed. Multisite site-transient variants are also cleared.

Use this when the importer is skipping items or refusing to re-fetch a
feed that has changed at the source. The next 'Import now' click will
re-pull the XML from the network.

clear_feed_cache() is exposed as a public method so it is unit-testable,
and a do_action hook (rss2cpt_cache_cleared) lets other code react when
the cache is cleared. Two smoke tests pin down the expected option and
site-transient names, and a third ensures an empty feed URL is a no-op.
2026-08-24 11:05:16 -05:00
Keith Solomon 0a6cf92146 🐛fix: Use feed publication date as post_date on import
Extracted the wp_insert_post/wp_update_post argument construction into a
private build_postarr() helper so the post_date/post_date_gmt derivation
from the feed timestamp can be exercised in isolation. Added smoke tests
that pin down the create-path behavior (feed timestamp becomes post_date)
and the fallback path (no feed date leaves post_date unset for WordPress
to fill in at import time). Added minimal get_date_from_gmt and
get_gmt_from_date stubs to the test bootstrap so the new tests run
without WordPress loaded.
2026-08-24 10:14:50 -05:00
Keith Solomon 82f955808d 📄 docs: Clean up lint errors 2026-08-24 08:48:40 -05:00
Keith Solomon 4fa7e2a6dd 📄 docs: Add readme 2026-08-24 08:47:53 -05:00
Keith Solomon 158f978021 feature: Initial commit 2026-08-24 08:46:51 -05:00