=== Hash Permalink ===
Contributors: cavien
Tags: permalink, short URL, hash, random URL, SEO, slug, post name
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automatically generate random hash-based short permalinks for new posts.

== Description ==

**Hash Permalink** is a lightweight, high-performance WordPress plugin that automatically replaces default post slugs with random hash-based short URLs when new content is published.

= Why Use Hash Permalinks? =

* **Privacy & Security** — Hash URLs prevent content scraping and hide your publishing patterns.
* **Clean & Professional** — Short, random URLs look modern and trustworthy.
* **SEO Safe** — Only applies to new posts; existing URLs are never modified.
* **Flexible** — Customize hash length, character set, prefixes, and which post types to apply.

= Key Features =

* **Auto Hash Generation** — Seamlessly generates unique hash slugs using cryptographically secure random numbers.
* **Collision Prevention** — Database-level uniqueness check with automatic retry.
* **Multiple Character Sets** — Choose from numeric, lowercase alphanumeric, mixed case, or hexadecimal.
* **Configurable Length** — Select 8, 12, or 16 character hashes.
* **Post Type Support** — Works with Posts, Pages, and any registered Custom Post Type.
* **Custom Prefix & Suffix** — Add optional URL prefixes or suffixes.
* **Settings Page** — Intuitive admin settings page under Settings menu.

= Example URLs =

* `https://yoursite.com/a7k2m9x4b1n3` (lowercase alphanumeric, 12 chars)
* `https://yoursite.com/6031e781c304` (hexadecimal, 12 chars)
* `https://yoursite.com/post-a7k2m9x4` (with "post" prefix, 8 chars)
* `https://yoursite.com/839201748362` (numeric, 12 chars)

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/hash-permalink` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to **Settings** -> **Hash Permalink** to configure the character set and length.
4. Publish a new post, and it will automatically receive a hash-based slug!

== Frequently Asked Questions ==

= Will this plugin modify existing post URLs? =

No. The plugin only intercepts the saving process for new posts or posts that have their slug manually cleared. Existing URLs are safe and will not be altered.

= What happens if I uninstall the plugin? =

The hash URLs generated while the plugin was active are permanently saved to the WordPress database as native post slugs. Uninstalling the plugin will not break your existing links.

== Screenshots ==

1. The plugin settings page.
2. A newly generated hash permalink when editing a post.

== Changelog ==

= 1.0.0 =
* Initial release.
