=== Mevabi – Related Posts Inline ===
Contributors:      mevabien22
Tags:              related posts, inline related posts, related content, content marketing, internal links
Requires at least: 5.9
Tested up to:      6.9
Stable tag:        1.1.0
Requires PHP:      7.4
License:           GPL-2.0-or-later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

Display related posts inline within your content or at the end, with three modern designs and full color customization.

== Description ==

**Mevabi – Related Posts Inline** lets you automatically insert related posts directly inside your post content — not just at the bottom. Keep readers engaged by surfacing relevant content right where their attention is.

= Key Features =

* **Two placement modes** — Insert related posts at the *end* of the content, or *distribute them inline* evenly throughout paragraphs.
* **Three modern layouts** — Choose the style that fits your theme:
  * **Design 1 · Solid + Arrow** — Full-color card with a large right-hand arrow CTA. Section title displayed above the box.
  * **Design 2 · Grey · Centered** — Subtle light-grey card, centered text, section title inside the box. No arrow.
  * **Design 3 · Image + Arrow** — Same as Design 1 but with the featured image displayed on the left side of the card.
* **Fully clickable cards** — The entire card area is a single link; no awkward partial click zones.
* **Per-design color customization** — Every color (background, hover, title, excerpt, arrow, section label, border, border-radius) is individually configurable via native color pickers in the admin.
* **Optional post excerpt** — Show a short, clean text excerpt (shortcodes and HTML stripped automatically). If the post begins with a shortcode it is skipped and the first real text paragraph is used instead.
* **Typography controls** — Set font sizes (in any CSS unit) for the section title, post title, and excerpt independently.
* **Match by category or tags** — Choose which taxonomy drives the "related" logic.
* **Link target** — Open related post links in the same tab or a new tab (with proper `rel="noopener noreferrer"`).
* **Section title** — Define a custom heading shown above (or inside) each related posts block.
* **1–3 posts** — Display one, two, or three related posts per block.
* **Lightweight** — No jQuery, no external libraries; vanilla JS + a single small CSS file.

= Privacy =

This plugin does not collect, store, or transmit any personal data.

== Installation ==

1. Upload the `mevabi-related-posts-inline` folder to the `/wp-content/plugins/` directory, **or** install via **Plugins → Add New** in your WordPress admin.
2. Activate the plugin through the **Plugins** menu.
3. Go to **Settings → Related Posts Inline** to configure the plugin.

== Frequently Asked Questions ==

= Will related posts show on pages, archives, or custom post types? =

No. Related posts are injected only on single blog posts (`is_single()`), in the main query loop.

= What happens if a post has no matching category or tag? =

No block will be shown. The content is returned unmodified.

= What happens if the content has fewer than two paragraphs and inline mode is selected? =

The plugin automatically falls back to appending the block at the end of the content.

= Does Design 3 require a featured image? =

No. If a related post has no featured image the card is displayed without the image column.

= Is the excerpt safe from shortcode execution? =

Yes. All shortcode tags are stripped with a regex before the text is sanitized, so no shortcode is ever executed inside the excerpt area.

= Can I use this plugin on a multisite installation? =

Yes. Settings are stored per-site using the standard WordPress options API.

== Screenshots ==

1. Design 1 – Solid color card with arrow CTA, title above the box.
2. Design 2 – Light grey card, centered text, title inside the box.
3. Design 3 – Solid color card with featured image on the left and arrow CTA.
4. Admin – General settings tab.
5. Admin – Design & Colors tab with live color pickers.
6. Admin – Typography tab.

== Changelog ==

= 1.1.0 =
* Added Stats tab with Pro feature notice.
* Added Free vs Pro comparison tab.
* Added "Upgrade to Pro" submenu link.
* Pro features (display mode, relation types, exclusions, min word count, designs 4–6) are now visually locked in the admin UI.
* Related posts count limited to 3 in Free version.
* Ensured no Pro functionality executes in Free version.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.1.0 =
No upgrade steps required. Update to enjoy the improved admin UI with Pro feature previews.

= 1.0.0 =
Initial release. No upgrade steps required.