=== SuperLight CPT Manager ===

Contributors: RyanEdmunds
Tags: custom post type, cpt, shortcode, lightweight
Requires at least: 5.5
Tested up to: 7.0
Stable tag: 1.3.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Create and manage custom post types instantly. Each CPT gets its own shortcode.

== Description ==

SuperLight CPT Manager is a minimalist WordPress plugin that lets administrators create Custom Post Types without clutter or bloat.

Each CPT automatically:

- Registers itself with WordPress
- Supports basic post features (title, editor, thumbnail, excerpt)
- Appears in the REST API and block editor
- Comes with a unique shortcode (e.g. `[superlight_cpt slug="book"]`)

There are no extra scripts, no custom tables, and no unnecessary settings — just pure, clean functionality.

**Features**

* Add, edit, import/export, or delete custom post types on the fly
* Each post type gets its own shortcode
* Works with Query Loop and block editors (`show_in_rest` enabled)
* All CPTs stored in a single WordPress option (`superlight_cpts`)
* Adds lightweight admin hooks for companion plugins, including SuperLight Taxonomies
* No dependencies, no setup, no nonsense

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/superlight-cpt-manager/`
2. Activate it from **Plugins → Installed Plugins**
3. Open **CPT Manager** in the WordPress admin menu
4. Add a new post type (e.g. Name: “Books”, Slug: `book`)
5. Use the shortcode `[superlight_cpt slug="book"]` anywhere to list posts or use the Query Loop block to create a custom post type archive.

== Frequently Asked Questions ==

= Why aren’t my CPTs showing in the Query Loop or block editor? =

Version 1.2 and later registers CPTs with `show_in_rest => true`, so they appear in Gutenberg and block-based queries.

= Does it create new database tables? =

No. All CPT definitions are saved as one serialized option in the database.

= What’s the shortcode format? =

Use `[superlight_cpt slug="your_post_type_slug"]` — it will automatically list posts of that type.

= Can I customize the output? =

Yes, you can use a Query Loop block to have total control over the output. You can also override the shortcode loop template directly in your theme if desired, or edit the plugin’s shortcode function.

= Does it work with existing CPTs? =

SuperLight CPT Manager will not intentionally override a registered post type using the same slug. Disable the existing CPT registration source to migrate ownership.

== Screenshots ==

1. Clean, dedicated admin screen for creating Custom Post Types.
2. Custom Post Types displayed using the Query Loop block in the block editor.

== Changelog ==

= 1.3.1 =
* Automatically flush rewrite rules after CPT changes to prevent 404s on new post type single URLs.


= 1.3.1 =

* Added edit/update support for registered CPT definitions.
* Added a simple tab system and extension hooks for companion plugins.
* Preserved the same single-option storage approach.

= 1.2.1 =

* Clarified feature descriptions in the readme.
* Added screenshots.
* No functional changes.

= 1.2 =

* Added `show_in_rest` support for block editor and Query Loop visibility
* Improved shortcode output for CPT listings
* Minor UI and sanitization improvements

= 1.1 =

* Added CPT delete and import/export functionality
* Improved option storage system

= 1.0 =

* Initial release — create and register CPTs via admin page

== License ==

This plugin is licensed under the GPLv2 or later.
