=== Manager for IcoMoon ===
Contributors: albedo0
Tags: icomoon, font, icon, manager
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MURUC7JZG94RA&source=url
Requires at least: 4.7.4
Tested up to: 7.0
Stable tag: trunk
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Manage IcoMoon icon font packages in WordPress.

== Description ==
Manager for IcoMoon helps you use icon fonts generated with the IcoMoon app inside WordPress.

You can import a custom IcoMoon ZIP package, browse the available icons in the admin, and insert icons in your content with shortcodes or direct HTML from the Gutenberg editor.

Main features:

* Import IcoMoon font ZIP packages, including packages generated by the newer IcoMoon app.
* Analyze a custom font package before installing it.
* Preview new and removed icons before replacing the current font.
* Detect removed icons that may already be used in post content.
* Warn when IcoMoon settings such as class prefix or postfix change and may affect direct HTML icons.
* Optionally update existing direct HTML icon classes when compatible icons still exist.
* Insert icons from the Gutenberg editor as shortcode or HTML.
* Organize icons into categories by using a separator in IcoMoon icon names.
* List available icons with their shortcode, HTML markup, and code.
* Restore the default icon pack if needed.

Shortcodes are generally safer for long-term content because they rely on the icon name. Direct HTML gives more markup control, but may be affected when generated CSS classes change.

== Quick start ==

1. Create your icon font in the IcoMoon app.
2. If you want categories, rename icons with a separator between the category and the icon name. Example: `social--facebook` with separator `--` will be listed in category `social`.
3. Download the font ZIP from IcoMoon.
4. Upload the ZIP from the plugin upload screen and review the import summary before installation.
5. Configure the same category separator in the plugin settings if you use categorized names.
6. Insert icons with shortcodes or the Gutenberg editor buttons.

Before replacing an existing font pack, keep a copy of your IcoMoon project or manifest file. Removed icons can stop displaying in existing content.


== Installation ==
- Upload the plugin files to the /wp-content/plugins/managerforicomoon/ directory, or install the plugin through the WordPress plugins screen - directly.
- Activate the plugin through the Plugins screen in WordPress
- Use the plugin settings to configure shortcode behavior, Gutenberg insertion, custom CSS class presets, and the category separator.
- Upload your IcoMoon ZIP package from the plugin upload screen.

== Frequently Asked Questions ==

= How do icon categories work? =

Categories are based on icon names from IcoMoon. Set a category separator in the plugin settings, then use the same separator in IcoMoon icon names.

For example, with separator `--`, an icon named `social--facebook` is displayed in category `social` with icon name `facebook`.

= Should I insert icons with shortcode or HTML? =

Use shortcodes when possible. They are more resilient when generated CSS classes change after importing a new IcoMoon package.

Use direct HTML when you need full markup control. Before replacing a font pack, check the import summary carefully because prefix, postfix, or CSS class changes may affect existing direct HTML icons.

= What happens when I upload a new ZIP package? =

The plugin analyzes the ZIP before installing it. The import summary lists new icons, removed icons, detected usage of removed icons, and settings changes that may impact existing content.

= Can the plugin update existing HTML icon classes? =

When compatible icons still exist in the new font pack, the import screen can offer an option to update direct HTML classes in the database for prefix or postfix changes. Always review the import summary before using it.

== Screenshots ==

1. Modal window to select an icon
2. Modal window to customize selected icon
3. Settings home page
4. Import a zip file created on the IcoMoon site
5. Import summary
6. Plugin settings
7. List of available icons and associated shortcode
8. Shortcode options

== Changelog ==

= 3.0 =
* Added support for font packages generated by the newer IcoMoon app.
* Added ZIP integrity and expected package structure checks before import.
* Added an import summary before installation with new icons, removed icons, usage detection, and settings changes.
* Added a confirmation step when removed icons may stop working.
* Added optional migration for compatible direct HTML icon class changes.
* Improved the getting started guide and category separator documentation.
* Reworked Gutenberg icon insertion into a single modal with icon selection, live preview, and HTML/shortcode insertion actions.
* Removed the setting that forced customization options to open by default.

= 2.4 =
* Added a setting to enable or disable the icon search field in the modal.
* Added support for predefined CSS class presets, configurable in the plugin settings and selectable in the modal.
* Added an option to show customization options by default when opening the modal.

= 2.3.10 =
* Local translation files included within the plugin take precedence over WordPress.org language packs, guaranteeing that custom translations are always applied, especially for the French language.

= 2.3.9 =
* The plugin’s textdomain has been updated and standardized to ensure full compatibility with the WordPress.org translation system.

= 2.3.8 =
* Introduces support for categorizing icons by adding a separator within icon names.

= 2.3.7 =
* Corrected deprecated dynamic property creation for compatibility with PHP 8.2.

= 2.3.6 =
* Fixed notice regarding translation being loaded too early.
* Icons in the icons list are now sorted alphabetically.

= 2.3.5 =
* Improved reliability of HTTPS.

= 2.3.4 =
* Fixed retrieval of codes for colored icons.

= 2.3.2 =
* Minor improvements.

= 2.3.1 =
* Corrected some French translations.

= 2.3 =
* Improved the ergonomics of inserting an icon via shortcode in the Gutenberg editor.
* Added the ability to insert icons directly in HTML in the Gutenberg editor.
* Added HTML code for each icon in the icons list.
* Added new copy options.

= 2.2.1 =
* Fixed typos and corrected French translations.

= 2.2 =
* Fixed Cross-Site Scripting vulnerability in shortcode.

= 2.1 =
* Fixed security issue when uploading ZIP archives.

= 2.0 =
* Fixed a bug with the plugin update that restored the default font pack. PLEASE DOWNLOAD YOUR SELECTION.JSON BEFORE UPLOADING.
* Added a shortcode manager in the Gutenberg editor.
* Added CSS minification feature.
* Managed parameters automatically from selection.json.
* Added postfix settings.

= 1.2.2 = 
* Fixed bug with old version of settings.

= 1.2 =
* New application logo.
* Design improvements.
* Added a button to copy shortcode to clipboard.
* Enabled/disabled restore button when checking the box.

= 1.1 =
* Updated backoffice design.
* Fixed part of the English translation.
* Added a link to download the selection.json file.
* Added the possibility to restore the default icons set.

= 1.0.8 =
* Fixed preview for icons with numbers in their names.

= 1.0.7 =
* Fixed URL for plugin repository.
* Corrected minor translation errors.

= 1.0.6 =
* Fixed bug for MIME type application/x-zip-compressed.

= 1.0 =
* Initial release of the plugin.
