=== WP Jerusalem Post ===
Contributors: areimann
Donate link: https://aaronreimann.com
Tags: israel, jerusalem, jpost, news, feed, rss, elementor, beaver builder, block
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 2.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display recent news and articles from The Jerusalem Post (jpost.com) RSS feeds with support for Gutenberg blocks, Elementor, Beaver Builder, shortcodes, and classic widgets.

== Description ==

**WP Jerusalem Post** brings the latest news, politics, defense, tech, and cultural headlines from *The Jerusalem Post* (jpost.com) directly to your WordPress website.

Whether you run an Israel-focused blog, a community news site, or an organization that needs up-to-the-minute updates from Israel and the Middle East, WP Jerusalem Post makes embedding feeds effortless, responsive, and secure.

### Key Features

* **Gutenberg Block**: Native block with live preview in the WordPress block editor.
* **Elementor Widget**: Drag-and-drop Jerusalem Post widget with full style controls in Elementor.
* **Beaver Builder Module**: Native Beaver Builder module with live editing support.
* **Shortcodes**: Easily embed feeds anywhere with `[jerusalem_post]` or `[wp_jerusalem_post]`.
* **Classic Widget**: Refreshed and fully compatible with modern WordPress and PHP 8+.
* **5 Modern Layout Themes**:
  * **Modern Card** &mdash; Responsive cards with article thumbnails, hover lift effects, and clean typography.
  * **Editorial List** &mdash; Side-by-side thumbnail and excerpt list.
  * **Compact Headlines** &mdash; Streamlined headline and timestamp list, ideal for sidebars.
  * **Minimal Clean** &mdash; Typography-focused, distraction-free layout.
  * **Original Legacy** &mdash; Backwards-compatible styling matching version 1.0.
* **20+ Curated Active Feeds**: Front Page, Headlines, Israel News, Middle East, Politics & Diplomacy, Jerusalem, Opinion, Sports, Tech & Startups, Culture, Diaspora, Judaism, Real Estate, Health, Food, Science, and more.
* **Custom Feed URLs**: Support for any custom RSS feed URL.
* **High Performance**: Automatic 15-minute transient caching prevents slowdowns and avoids rate-limiting, with automatic fallback during network hiccups.
* **Full PHP 8+ Compatibility**: Clean, modern codebase with strict escaping and sanitization.

== Installation ==

1. Upload the `wp-jerusalem-post` folder to your `/wp-content/plugins/` directory, or install directly through the WordPress plugin screen.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Add feeds to your pages using your favorite method:
   * **Block Editor**: Insert the **WP Jerusalem Post** block and configure in the sidebar.
   * **Elementor**: Drag the **Jerusalem Post** widget into your layout.
   * **Beaver Builder**: Add the **WP Jerusalem Post** module to any row or column.
   * **Shortcode**: Insert `[jerusalem_post]` into any page, post, or text area.
   * **Classic Widget**: Go to **Appearance → Widgets** and drag the **Jerusalem Post Widget** into your sidebar or footer.

== Shortcode Reference ==

Embed anywhere using:
`[jerusalem_post]`

Optional attributes:
* `feed="frontpage"` &mdash; Feed section slug (`frontpage`, `headlines`, `israelnews`, `middleeast`, `politics`, `jerusalem`, `opinion`, `sports`, `tech`, `culture`, `diaspora`, etc.).
* `url="https://..."` &mdash; Custom RSS feed URL.
* `count="5"` &mdash; Number of articles to display (1 to 20).
* `theme="card"` &mdash; Layout theme (`card`, `list`, `compact`, `minimal`, or `original`).
* `show_image="1"` &mdash; `1` to show thumbnail image, `0` to hide.
* `show_date="1"` &mdash; `1` to show publication date or relative time, `0` to hide.
* `show_description="1"` &mdash; `1` to show article excerpt, `0` to hide.
* `new_window="1"` &mdash; `1` to open links in a new window/tab, `0` for current tab.

Example:
`[jerusalem_post feed="tech" count="3" theme="card"]`

== Frequently Asked Questions ==

= Is this plugin affiliated with The Jerusalem Post? =

No. This plugin is an independent utility developed by Aaron Reimann to help WordPress users display RSS feeds published publicly by jpost.com. It is not officially endorsed or maintained by The Jerusalem Post.

= How often is the feed refreshed? =

Feed items are cached in WordPress transients for 15 minutes to keep your website fast. You can also purge the cache on demand from **Settings → WP Jerusalem Post**.

= Can I use my own custom feed URL? =

Yes! You can choose "Custom RSS Feed URL" in the block, widget, or page builder controls, or supply `url="https://..."` in the shortcode.

= Does this plugin work with PHP 8? =

Yes! Version 2.0.0 has been completely rebuilt from the ground up for modern PHP 7.4 through PHP 8.3+.

== Screenshots ==

1. Modern Card layout showcasing Jerusalem Post headlines and thumbnails.
2. Native Gutenberg block inspector controls with real-time preview.
3. Classic widget settings panel.
4. Settings page in WordPress admin with feed cache management.

== Changelog ==

= 2.0.0 =
* Major modernization update.
* Added native Gutenberg block (`wp-jerusalem-post/feed`) with real-time editor preview.
* Added native Elementor widget with full typography, color, and layout controls.
* Added native Beaver Builder module.
* Added `[jerusalem_post]` and `[wp_jerusalem_post]` shortcodes.
* Refactored classic widget (`jPostWidget`) with PHP 8+ constructors and updated options.
* Replaced deprecated `fetch_rss()` and MagpieRSS with modern `fetch_feed()` / SimplePie engine.
* Added 15-minute transient caching with 7-day resilient offline fallback.
* Added 5 layout themes: Modern Card, Editorial List, Compact Headlines, Minimal Clean, and Original Legacy.
* Updated feed directory with 20+ active, verified HTTPS feed endpoints from jpost.com.
* Added custom RSS feed URL support.
* Added admin settings page under Settings → WP Jerusalem Post with cache purge action.
* Updated asset enqueuing to standard `wp_enqueue_scripts` hook.
* Comprehensive output escaping with `esc_url`, `esc_html`, and `wp_kses`.

= 1.0.1 =
* Adds UL tags for more correct CSS.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 2.0.0 =
Major modernization release adding Gutenberg block, Elementor, Beaver Builder, shortcode support, transient caching, and PHP 8+ compatibility.
