=== Tag My Hash ===
Contributors: webgrrrl
Tags: hashtags, tags, taxonomy, auto-tag, content
Stable tag: 1.1
Tested up to: 7.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Creation time: 07-May-2026
Donate: https://paypal.me/cyberntnet

Automatically converts #hashtags in your posts into WordPress tags and clickable links to tag archive pages.

== Description ==
Tag My Hash (#TagMyHash) is a lightweight WordPress plugin that bridges social-media-style hashtag usage with WordPress's native tag taxonomy. This plugin scans your post content, identifies anything starting with a pound (a.k.a. hashtags sign #), and turns it into a functional part of your site’s tag structure. You no longer have to manually scroll down to the “Tags” meta box every time you want to categorise a quick update. A live front-end demo of this plugin can be found @ [LornaTimbah.com](https://lornatimbah.com).

Features:
- Automatic hashtag detection in post content
- Auto-create missing WordPress tags
- Auto-assign hashtags as tags on save
- Convert hashtags into clickable links to tag archive pages
- Simple settings page (enable/disable + mode toggle)
- Standard Posts support

== Installation ==
1. Upload the plugin to `/wp-content/plugins/tagmyhash` or install via the WordPress Plugin Directory.
2. Activate the plugin.
3. Go to Settings -> Tag My Hash to configure.

== Caveat ==
Hashtag links use the current Tag base configured under *Settings* -> *Permalinks*.

If you change the `Tag` base, existing hashtag links will continue to use the previous setting until you re-render them. Go to *Settings* -> *Tag My Hash* and click "Re-scan Existing Posts" to update existing hashtag links without changing the post content. Alternatively, new or edited posts are rendered automatically with the changed `Tag` base when saved.

On a headless WordPress setup, if the frontend requests the standard REST API’s `content.rendered` field, hashtag links should generally be included. Otherwise, if it requests `content.raw`, uses custom GraphQL fields, or renders Markdown/HTML itself, this plugin’s `the_content` filter may be bypassed. Hashtags will then remain plain text.

== Frequently Asked Questions ==
= Does it process hashtags inside code blocks? =
No. Hashtags inside `pre`, `code`, `a`, `script`, and `style` elements are ignored by default.

= Does it process hashtags inside HTML attributes? =
No. HTML tags, attributes, comments, and declarations are preserved and ignored. Only hashtag text outside HTML markup is processed.

= Will it touch my existing tags? =
No. The plugin appends new tags only and never removes manually assigned tags.

= Does this work on a multisite installation? =
Yes. The frontend demo at LornaTimbah.com uses a WordPress multisite setup.

== Changelog ==
= 1.2 =
* Security: Replaced broad HTML block matching with WordPress HTML tokenization.
* Security: Hashtags in HTML attributes and markup are no longer processed.
* Hardening: Hashtags inside excluded elements remain ignored while only text nodes are parsed.
* Added: Administrators can re-scan existing posts after changing the permalink Tag base.
* Added: The rescan tool displays per-post status, errors, a summary, and recommended next steps.

== Screenshots ==

1. Example front-end (posts) with Tag My Hash enabled.
2. Tag My Hash settings page in WordPress dashboard.

== Upgrade Notice ==
N/A.