=== Category Description & Image (اضافه کردن توضیحات و تصویر به دسته بندی‌ها) ===
Contributors: you
Tags: taxonomy, category, description, editor, tinymce, woocommerce, brand, thumbnail, image
Requires at least: 5.0
Tested up to: 6.6
Stable tag: 4.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Enables the WordPress visual editor (TinyMCE) on taxonomy descriptions with full HTML support, adds a Category Thumbnail image field, and improves the admin column display.

== Description ==
This plugin transforms the default WordPress taxonomy experience by adding three major features:

1.  **Visual Editor (WYSIWYG):** Replaces the plain textarea with the WordPress visual editor (TinyMCE) on `edit-tags.php` and `term.php`.
2.  **Full HTML Saving:** Force-saves full HTML (headings, lists, images, alignment, etc.) by bypassing strict filters. It directly updates the database to ensure your content stays exactly as you designed it.
3.  **Category Images:** Adds a fully integrated "Category Image/Thumbnail" field to the Post Categories, allowing you to upload and assign images to categories securely.
4.  **Enhanced Admin UI:** Improves the "Description" column in the admin list view by wrapping long content in a scrollable box and adding a quick "Edit" button on hover.

**Key Technical Features:**
* Loosens default KSES filters (`pre_term_description`).
* Attaches `wp.editor` to the existing `textarea[name="description"]` without hiding existing fields.
* Uses `priority = 999` to override other plugins/themes that might strip tags.
* **Security:** Uses Nonce verification for image saving and separates logic for `unfiltered_html` users (Admins) vs standard users.
* **Performance:** Uses PHP-side rendering for admin columns (no heavy JS) to create a clean, scrollable description box.

== Installation ==
1.  Upload the ZIP via **Plugins → Add New → Upload Plugin** and activate.
2.  Ensure you are testing while logged-in as an Administrator (with `unfiltered_html` capability) to save unrestricted HTML.
3.  Go to **Posts → Categories**.
4.  You will see the Visual Editor for the description and a new "Category Image" field.
5.  In the category list table, long descriptions are now contained within a tidy scrollable box.

== Changelog ==
= 4.0 =
* **New Feature:** Added "Category Image" (Thumbnail) field for Post Categories with Media Library integration.
* **Security:** Implemented Nonce verification for saving category images.
* **UX Improvement:** Redesigned the "Description" column in the admin list. It now uses a scrollable wrapper (max-height 100px) to prevent layout breaking.
* **UX Improvement:** Added a floating "Edit" button that appears when hovering over the description in the admin list.
* **Fix:** Corrected database update logic to target `term_taxonomy` table instead of `terms` table (Fixed "Unknown column description" error).
* **Fix:** Resolved "Headers already sent" warnings by fixing the SQL query execution.

= 3.1.0 =
* Force-save full HTML for taxonomy descriptions after all other plugins/themes.

= 3.0.0 =
* Initial release of the visual editor features.