diff --git a/.plugin-data b/.plugin-data index 78024b8..83aec9e 100644 --- a/.plugin-data +++ b/.plugin-data @@ -1,4 +1,4 @@ { - "version": "1.0.3", + "version": "1.0.4", "slug": "blockparty-icons" } diff --git a/CHANGELOG.md b/CHANGELOG.md index da04f11..9cfc9af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ This plugin **doesn't run any sanitization on SVGs** before using them. Only use ## Changelog +### 1.0.4 - 2026-02-20 + +- Improve search result display in icons selector modal. +- Update translations + ### 1.0.3 - 2026-02-19 - Add support for WordPress <= 6.8 for ServerSideRender component diff --git a/README.md b/README.md index 39c8cdf..68af1d5 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,10 @@ function register_collection() { \Blockparty\Icons\register_icon_collection( 'my_collection', [ - 'label' => 'My custom icons collection', - 'type' => 'sprite', - 'source' => get_stylesheet_directory() . '/dist/icons/sprite.svg', + 'label' => 'My custom icons collection', + 'type' => 'sprite', + 'source' => get_stylesheet_directory() . '/dist/icons/sprite.svg', + 'version' => wp_get_theme()->get( 'Version' ), // Optional: cache busting for sprite URL ] ); } @@ -41,6 +42,7 @@ This is an example for adding a SVG sprite as a source. If you want to add icons | `label` | Label of the collection. | | `source` | Path to the SVG sprite file or folder containing SVG files. | | `type` | | +| `version` | Optional. Version string used for cache busting (e.g. theme version). When set, the sprite URL is appended with a `?v=...` query parameter. | ## How to develop diff --git a/blockparty-icons.php b/blockparty-icons.php index a46cb8c..a9a108d 100644 --- a/blockparty-icons.php +++ b/blockparty-icons.php @@ -4,7 +4,7 @@ * Description: Provides blocks in WordPress editor to add custom SVG icons. * Requires at least: 6.2 * Requires PHP: 8.1 - * Version: 1.0.3 + * Version: 1.0.4 * Author: Blockparty * Author URI: https://beapi.fr * License: GPL-2.0-or-later @@ -29,7 +29,7 @@ include_once __DIR__ . '/vendor/autoload.php'; } -define( 'BLOCKPARTY_ICONS_VERSION', '1.0.3' ); +define( 'BLOCKPARTY_ICONS_VERSION', '1.0.4' ); define( 'BLOCKPARTY_ICONS_URL', plugin_dir_url( __FILE__ ) ); define( 'BLOCKPARTY_ICONS_DIR', plugin_dir_path( __FILE__ ) ); define( 'BLOCKPARTY_ICONS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); diff --git a/languages/blockparty-icons-fr_FR-dfbff627e6c248bcb3b61d7d06da9ca9.json b/languages/blockparty-icons-fr_FR-dfbff627e6c248bcb3b61d7d06da9ca9.json index a86f043..e0a0045 100644 --- a/languages/blockparty-icons-fr_FR-dfbff627e6c248bcb3b61d7d06da9ca9.json +++ b/languages/blockparty-icons-fr_FR-dfbff627e6c248bcb3b61d7d06da9ca9.json @@ -1 +1 @@ -{"translation-revision-date":"2026-02-16 23:44+0100","generator":"WP-CLI\/2.11.0","source":"build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"No name icon":["Ic\u00f4ne sans nom"],"Icon pagination":["Pagination des ic\u00f4nes"],"Previous page":["Page pr\u00e9c\u00e9dente"],"Previous":["Pr\u00e9c\u00e9dent"],"Page %d":["Page %d"],"Next page":["Page suivante"],"Next":["Suivant"],"Select an icon from your collections":["S\u00e9lectionnez une ic\u00f4ne dans vos collections"],"Search an icon":["Recherche une ic\u00f4ne"],"wordpress, heart, star\u2026":["wordpress, coeur, etoile\u2026"],"Settings":["R\u00e9glages"],"Modal settings":["R\u00e9glages de la modale"],"Display":["Affichage"],"Preview of icon sizes":["Aper\u00e7u de la taille des ic\u00f4nes"],"Adjust preview size of the icons.":["Ajuster la taille de pr\u00e9visualisation des ic\u00f4nes."],"Pager":["Pagination"],"Icons per page":["Ic\u00f4nes par page"],"Number of icons displayed per page.":["Nombre d\u2019ic\u00f4nes \u00e0 afficher par page."],"No icons found matching your search.":["Aucune ic\u00f4ne trouv\u00e9e selon vos crit\u00e8res de recherche."],"No Icon found in this collection.":["Aucune ic\u00f4ne trouv\u00e9e dans cette collection."],"Icon color":["Couleur de l\u2019ic\u00f4ne"],"Add an icon":["Ajouter une ic\u00f4ne"],"Remove link":["Retirer le lien"],"Add a link":["Ajouter un lien"],"Replace icon":["Remplacer l\u2019ic\u00f4ne"],"Remove icon":["Retirer l\u2019ic\u00f4ne"],"Label of %s":["Libell\u00e9 de %s"],"Link label":["Libell\u00e9 du lien"],"Briefly describe the link to help screen reader users.":["D\u00e9crivez bri\u00e8vement le lien destin\u00e9 aux utilisateurs de lecteurs d'\u00e9cran."],"Icon radius":["Arrondis de l\u2019ic\u00f4ne"],"Icon size":["Taille de l\u2019ic\u00f4ne"],"Adjust the size of the icon (value in pixels)":["Ajustez la taille de l\u2019ic\u00f4ne (valeur en pixels)"]}}} \ No newline at end of file +{"translation-revision-date":"2026-02-20 09:31+0100","generator":"WP-CLI\/2.11.0","source":"build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"No name icon":["Ic\u00f4ne sans nom"],"Icon pagination":["Pagination des ic\u00f4nes"],"Previous page":["Page pr\u00e9c\u00e9dente"],"Previous":["Pr\u00e9c\u00e9dent"],"Page %d":["Page %d"],"Next page":["Page suivante"],"Next":["Suivant"],"Select an icon from your collections":["S\u00e9lectionnez une ic\u00f4ne dans vos collections"],"Search an icon":["Recherche une ic\u00f4ne"],"wordpress, heart, star\u2026":["wordpress, coeur, etoile\u2026"],"Hide settings":["Masquer les r\u00e9glages"],"Open settings":["Afficher les r\u00e9glages"],"Modal settings":["R\u00e9glages de la modale"],"Display":["Affichage"],"Preview of icon sizes":["Aper\u00e7u de la taille des ic\u00f4nes"],"Adjust preview size of the icons.":["Ajuster la taille de pr\u00e9visualisation des ic\u00f4nes."],"Pager":["Pagination"],"Icons per page":["Ic\u00f4nes par page"],"Number of icons displayed per page.":["Nombre d\u2019ic\u00f4nes \u00e0 afficher par page."],"No icons found matching your search.":["Aucune ic\u00f4ne trouv\u00e9e selon vos crit\u00e8res de recherche."],"%1$s (%2$d)":["%1$s (%2$d)"],"Icon color":["Couleur de l\u2019ic\u00f4ne"],"Add an icon":["Ajouter une ic\u00f4ne"],"Remove link":["Retirer le lien"],"Add a link":["Ajouter un lien"],"Replace icon":["Remplacer l\u2019ic\u00f4ne"],"Remove icon":["Retirer l\u2019ic\u00f4ne"],"Label of %s":["Libell\u00e9 de %s"],"Link label":["Libell\u00e9 du lien"],"Briefly describe the link to help screen reader users.":["D\u00e9crivez bri\u00e8vement le lien destin\u00e9 aux utilisateurs de lecteurs d'\u00e9cran."],"Icon radius":["Arrondis de l\u2019ic\u00f4ne"],"Icon size":["Taille de l\u2019ic\u00f4ne"],"Adjust the size of the icon (value in pixels)":["Ajustez la taille de l\u2019ic\u00f4ne (valeur en pixels)"]}}} \ No newline at end of file diff --git a/languages/blockparty-icons-fr_FR.mo b/languages/blockparty-icons-fr_FR.mo index 3eeb62e..1656080 100644 Binary files a/languages/blockparty-icons-fr_FR.mo and b/languages/blockparty-icons-fr_FR.mo differ diff --git a/languages/blockparty-icons-fr_FR.po b/languages/blockparty-icons-fr_FR.po index a21bd0a..6a70ada 100644 --- a/languages/blockparty-icons-fr_FR.po +++ b/languages/blockparty-icons-fr_FR.po @@ -5,8 +5,8 @@ msgstr "" "Project-Id-Version: Blockparty Icons 1.0.0\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/blockparty-" "icons\n" -"POT-Creation-Date: 2026-02-16T22:43:56+00:00\n" -"PO-Revision-Date: 2026-02-16 23:44+0100\n" +"POT-Creation-Date: 2026-02-20T08:30:46+00:00\n" +"PO-Revision-Date: 2026-02-20 09:31+0100\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr_FR\n" @@ -120,8 +120,12 @@ msgid "wordpress, heart, star…" msgstr "wordpress, coeur, etoile…" #: build/index.js:2 -msgid "Settings" -msgstr "Réglages" +msgid "Hide settings" +msgstr "Masquer les réglages" + +#: build/index.js:2 +msgid "Open settings" +msgstr "Afficher les réglages" #: build/index.js:2 msgid "Modal settings" @@ -155,57 +159,58 @@ msgstr "Nombre d’icônes à afficher par page." msgid "No icons found matching your search." msgstr "Aucune icône trouvée selon vos critères de recherche." -#: build/index.js:2 -msgid "No Icon found in this collection." -msgstr "Aucune icône trouvée dans cette collection." +#. translators: 1: collection name, 2: number of results +#: build/index.js:3 +msgid "%1$s (%2$d)" +msgstr "%1$s (%2$d)" -#: build/index.js:2 +#: build/index.js:3 msgid "Icon color" msgstr "Couleur de l’icône" -#: build/index.js:2 +#: build/index.js:3 msgid "Add an icon" msgstr "Ajouter une icône" -#: build/index.js:2 +#: build/index.js:3 msgid "Remove link" msgstr "Retirer le lien" -#: build/index.js:2 +#: build/index.js:3 msgid "Add a link" msgstr "Ajouter un lien" -#: build/index.js:2 +#: build/index.js:3 msgid "Replace icon" msgstr "Remplacer l’icône" -#: build/index.js:2 +#: build/index.js:3 msgid "Remove icon" msgstr "Retirer l’icône" #. translators: %s: name of the icon name. -#: build/index.js:3 +#: build/index.js:4 msgid "Label of %s" msgstr "Libellé de %s" -#: build/index.js:3 +#: build/index.js:4 msgid "Link label" msgstr "Libellé du lien" -#: build/index.js:3 +#: build/index.js:4 msgid "Briefly describe the link to help screen reader users." msgstr "" "Décrivez brièvement le lien destiné aux utilisateurs de lecteurs d'écran." -#: build/index.js:3 +#: build/index.js:4 msgid "Icon radius" msgstr "Arrondis de l’icône" -#: build/index.js:3 +#: build/index.js:4 msgid "Icon size" msgstr "Taille de l’icône" -#: build/index.js:3 +#: build/index.js:4 msgid "Adjust the size of the icon (value in pixels)" msgstr "Ajustez la taille de l’icône (valeur en pixels)" @@ -220,5 +225,11 @@ msgid "Easily add custom vector icon to your content." msgstr "" "Ajoutez facilement des icônes vectorielles personnalisées à votre contenu." +#~ msgid "Settings" +#~ msgstr "Réglages" + +#~ msgid "No Icon found in this collection." +#~ msgstr "Aucune icône trouvée dans cette collection." + #~ msgid "Link" #~ msgstr "Lien" diff --git a/languages/blockparty-icons.pot b/languages/blockparty-icons.pot index ec4b48e..37dcc27 100644 --- a/languages/blockparty-icons.pot +++ b/languages/blockparty-icons.pot @@ -2,14 +2,14 @@ # This file is distributed under the GPL-2.0-or-later. msgid "" msgstr "" -"Project-Id-Version: Blockparty Icons 1.0.0\n" +"Project-Id-Version: Blockparty Icons 1.0.3\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/blockparty-icons\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2026-02-16T22:43:56+00:00\n" +"POT-Creation-Date: 2026-02-20T08:30:46+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.11.0\n" "X-Domain: blockparty-icons\n" @@ -116,7 +116,11 @@ msgid "wordpress, heart, star…" msgstr "" #: build/index.js:2 -msgid "Settings" +msgid "Hide settings" +msgstr "" + +#: build/index.js:2 +msgid "Open settings" msgstr "" #: build/index.js:2 @@ -151,56 +155,57 @@ msgstr "" msgid "No icons found matching your search." msgstr "" -#: build/index.js:2 -msgid "No Icon found in this collection." +#. translators: 1: collection name, 2: number of results +#: build/index.js:3 +msgid "%1$s (%2$d)" msgstr "" -#: build/index.js:2 +#: build/index.js:3 msgid "Icon color" msgstr "" -#: build/index.js:2 +#: build/index.js:3 msgid "Add an icon" msgstr "" -#: build/index.js:2 +#: build/index.js:3 msgid "Remove link" msgstr "" -#: build/index.js:2 +#: build/index.js:3 msgid "Add a link" msgstr "" -#: build/index.js:2 +#: build/index.js:3 msgid "Replace icon" msgstr "" -#: build/index.js:2 +#: build/index.js:3 msgid "Remove icon" msgstr "" #. translators: %s: name of the icon name. -#: build/index.js:3 +#: build/index.js:4 msgid "Label of %s" msgstr "" -#: build/index.js:3 +#: build/index.js:4 msgid "Link label" msgstr "" -#: build/index.js:3 +#: build/index.js:4 msgid "Briefly describe the link to help screen reader users." msgstr "" -#: build/index.js:3 +#: build/index.js:4 msgid "Icon radius" msgstr "" -#: build/index.js:3 +#: build/index.js:4 msgid "Icon size" msgstr "" -#: build/index.js:3 +#: build/index.js:4 msgid "Adjust the size of the icon (value in pixels)" msgstr "" diff --git a/package.json b/package.json index 0d59363..699c286 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blockparty-icons", - "version": "1.0.3", + "version": "1.0.4", "description": "Provides blocks in WordPress editor to add custom SVG icons from your theme.", "author": "Be API Technical team", "license": "GPL-2.0-or-later", diff --git a/src/block.json b/src/block.json index 87297eb..498837c 100644 --- a/src/block.json +++ b/src/block.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "blockparty/icon", - "version": "1.0.3", + "version": "1.0.4", "title": "Icon", "category": "widgets", "description": "Easily add custom vector icon to your content.", diff --git a/src/components/icon-modal.js b/src/components/icon-modal.js index 6518760..a3e9e54 100644 --- a/src/components/icon-modal.js +++ b/src/components/icon-modal.js @@ -21,7 +21,7 @@ import { TabPanel, TextHighlight, } from '@wordpress/components'; -import { __ } from '@wordpress/i18n'; +import { __, sprintf } from '@wordpress/i18n'; import { Icon, settings } from '@wordpress/icons'; import { useSelect, useDispatch } from '@wordpress/data'; import { store as preferencesStore } from '@wordpress/preferences'; @@ -306,10 +306,17 @@ function IconModal( { collections, onClose, handleIconSelectButtonClick } ) {