=== M7tawa Content Highlights ===
Contributors: aymanabdullahdev
Tags: highlights, key points, navigation, headings, content
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 3.4.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Create editor-curated reader highlights with independent key-point text and optional links to selected H2 or H3 sections.

== Description ==

M7tawa Content Highlights is an editorial reader-highlights tool. The editor creates a separate ordered list of key points for readers instead of generating a navigation list from the article structure.

Each highlight has its own editable text. It can be written from scratch, copied from an H2 or H3 heading and rewritten, optionally linked to a selected section, or displayed as plain text.

The highlights list is independent from the article headings: it does not have to contain the same number of items, use the same wording, or follow the same order as the H2/H3 structure. The editor decides what deserves attention and how it should be presented.

This makes the plugin useful as a focused reader shortcut for long articles, tutorials, reviews, guides, recipes, and other content where selected editorial points are more useful than automatically exposing the full heading structure.

= Editorial control over reader highlights =

You decide which points deserve attention. Highlights are separate editorial items and are not automatically generated from every heading in the post.

= Optional links to selected sections =

Each highlight can optionally link to a selected H2 or H3 heading in the same post or page. A point can also remain plain text when navigation is not needed.

= Copy a heading, then rewrite it =

Select a heading and copy its text into the highlight field with one click. The copied text remains fully editable, so you can shorten or rewrite it for readers.

= Stable heading detection =

The plugin scans headings authored directly in the post content before other shortcodes expand. This helps prevent recipe plugins and other tools that generate additional front-end headings from changing the editor's heading map.

= Flexible placement =

Display the highlights box automatically before or after the content, or place it exactly where you want with the `[smart_highlights]` shortcode.

= Per-content box titles =

Set a custom highlights-box title for an individual post or page while keeping the global title as the fallback.

Features include:

* Curated key points selected by the editor instead of an automatically generated full table of contents.
* Optional links from individual highlights to selected H2 or H3 sections.
* Plain-text highlights when no section link is needed.
* One-click copying of a selected heading into an editable highlight field.
* Optional custom box title for individual posts and pages.
* Automatic placement before or after content.
* Manual placement with `[smart_highlights]`.
* Duplicate-output prevention when the shortcode is used.
* Optional smooth scrolling with a configurable sticky-header offset.
* Heading detection based on authored post content before other shortcodes expand.
* Support for the Classic Editor and the block editor.
* RTL and LTR friendly.
* Translation-ready with English as the source language.
* No AI service, external API, telemetry, or third-party content processing.
* Reads highlight data created by Simple Content Highlights 3.1.1 and migrates each post to the new meta key when that post is next saved.

== Installation ==

1. Upload the plugin ZIP from Plugins > Add New > Upload Plugin, or install it from the WordPress Plugin Directory.
2. Activate M7tawa Content Highlights.
3. Open a post or page and use the M7tawa Content Highlights panel.
4. Add the key points you want readers to see.
5. Optionally link each point to a selected H2 or H3 section.
6. Update or publish the post.

== Upgrade Notice ==

= 3.4.0 =
Refines the editor experience with point cards, completion states, clearer heading refresh feedback, a dedicated shortcode panel, and improved RTL/LTR layout without changing saved data or front-end behavior.

= 3.3.0 =
Adds an optional box-title override for individual posts and pages while keeping the global settings title as the fallback.

= 3.2.1 =
Compatibility and repository-readiness update for WordPress 7.1. No functional behavior was changed.

= 3.2.0 =
Renames the plugin to M7tawa Content Highlights while preserving existing highlight data and safely migrating settings from Simple Content Highlights.

== Frequently Asked Questions ==

= Is this a table of contents plugin? =

No. The plugin does not generate a navigation list from article headings. The editor creates an independent list of reader-facing highlights, and each highlight may optionally link to a selected H2 or H3 section.

= Does the plugin automatically decide which points are important? =

No. The highlights are editorially curated. You decide what readers should see.

= Do all highlights need to link to a heading? =

No. A highlight can link to a selected H2 or H3 section, or it can be displayed as plain text.

= Do highlights have to follow the wording or order of the article headings? =

No. The highlights list is independent. You can use different wording, choose fewer points than there are headings, and arrange the highlights in the editorial order you want readers to see.

= Can I use the text of an existing heading as a highlight? =

Yes. Select the heading and use the copy button. The copied text remains editable, so you can shorten or rewrite it.

= Can I use a different box title on one post or page? =

Yes. Enter a custom title in the editor panel. Leave it blank to keep using the global box title from the plugin settings.

= Can I place the box manually? =

Yes. Add `[smart_highlights]` anywhere in the post or page content. When the shortcode is present, the automatic before/after box is not added.

= Does it work with recipe plugins or other plugins that generate headings? =

The plugin maps headings from the authored post content before shortcodes expand. This helps prevent generated front-end headings from changing the heading map used in the editor.

= Does it use AI or send content to an external service? =

No. The plugin does not require an AI service, external API, telemetry, or third-party content processing.

= Will my existing Simple Content Highlights data remain available? =

Yes. Version 3.2.0 reads the legacy highlight meta when needed, writes the new prefixed meta key on the next post save, and migrates legacy settings to the new plugin option.

== Changelog ==

= 3.4.2 =
* Refined the editor wording to present the feature as Editorial Reader Highlights.
* Added clearer in-editor guidance that H2/H3 linking is optional and highlight text is independent from article headings.
* Updated the readme and plugin description to clarify that highlight count, wording, and order do not have to match the article heading structure.
* No functional changes, no data-format changes, and no changes to saved settings or front-end behavior.

= 3.4.1 =
* Improved heading detection reliability across Gutenberg, Classic Editor, TinyMCE, and WordPress 7.1 editor contexts.
* No changes to frontend behavior, settings, saved data, or the v3.4.0 editor design.

= 3.4.0 =
* Redesigned the post/page editor panel with clearer cards for each highlight point.
* Added visual complete/incomplete states based on whether point text is filled.
* Added clearer heading-refresh feedback with the number of detected H2/H3 headings.
* Improved the per-content title section and shortcode-copy section.
* Improved responsive RTL/LTR layout and button alignment.
* Added a compact M7tawa identity footer inside the editor panel.
* No changes to stored highlight data, front-end linking, shortcode behavior, settings values, or the settings-page workflow.

= 3.3.0 =
* Added an optional per-post and per-page box title field in the editor.
* Leaving the per-content title blank continues to use the global title from the plugin settings.
* No changes to the existing settings page or highlight-linking behavior.

= 3.2.1 =
* Updated Tested up to to WordPress 7.1.
* Reviewed plugin metadata and packaging for WordPress.org submission readiness.
* No functional changes; all v3.2.0 behavior and upgrade compatibility are preserved.

= 3.2.0 =
* Renamed the plugin to M7tawa Content Highlights.
* Changed the plugin folder, main file, Text Domain, PHP classes, constants, script handles, and settings-page slug to the M7tawa identity.
* Added a safe one-time migration from the legacy `sch_settings` option to `m7ch_settings`.
* Added `_m7ch_highlights` as the primary post-meta key while retaining read compatibility with legacy `_sch_highlights_v2` data; legacy post data migrates on the next save instead of using a bulk database operation.
* Preserved the `[smart_highlights]` shortcode and all v3.1.1 behavior.
* Updated the WordPress.org contributor to `aymanabdullahdev`.
* Removed the duplicate Plugin URI and kept the verified author website separately.
* Kept English as the source language and prepared all interface strings for WordPress.org translations.
* Does not contact external services or send site content to third parties.

= 3.1.1 =
* Standardized source strings and plugin metadata for WordPress.org compatibility.
* Improved input sanitization and translator comments.
* Rewrote the readme in standard English.

= 3.1.0 =
* Added a "Copy heading to text" button for each selected heading in the post editor.
* Kept the point field fully editable after copying.

= 3.0.0 =
* Added `[smart_highlights]` to the post editor with a direct copy button.

= 2.1.3 =
* Processes authored post headings before recipe and other shortcodes expand.
* Prevents generated recipe headings from changing the heading map.

== Shortcode ==

Use `[smart_highlights]` inside a post or page to display the box at that exact position.
