From c7fcaf9f61456222cb835f5150cb66b80d66715e Mon Sep 17 00:00:00 2001 From: Erik van der Bas Date: Mon, 9 Dec 2024 09:41:34 +0100 Subject: [PATCH] 4.1.0 --- README.md | 7 +++++++ acf-svg-icon-picker.php | 4 ++-- class-acf-field-svg-icon-picker.php | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 86992ec..ef2f291 100755 --- a/README.md +++ b/README.md @@ -98,6 +98,13 @@ $fields->addField('my_icon', 'svg_icon_picker', [ ## Changelog [See releases for the full changelog](https://github.com/smithfield-studio/acf-svg-icon-picker/releases) +* 4.1.0: + * feat: Add possebility to directly return the icon markup from the field by using the `icon` return format + * feat: Enhance markup of the icon picker modal and field. + * docs: Update hooks in readme to the correct ones + * test: Add tests for the new return format + * ci: Run PHPCS on PRs + * 4.0.1: * Fix version numbers in constant. * chore: Add files to export ignore diff --git a/acf-svg-icon-picker.php b/acf-svg-icon-picker.php index 40909a7..66459fa 100755 --- a/acf-svg-icon-picker.php +++ b/acf-svg-icon-picker.php @@ -4,7 +4,7 @@ * Plugin Name: Advanced Custom Fields: SVG Icon Picker * Plugin URI: https://github.com/smithfield-studio/acf-svg-icon-picker * Description: Allows you to pick an icon from a predefined list - * Version: 4.0.1 + * Version: 4.1.0 * Author: Smithfield & Studio Lemon * Author URI: https://github.com/smithfield-studio/acf-svg-icon-picker/ * Text Domain: acf-svg-icon-picker @@ -25,7 +25,7 @@ * Change this version number and the version in the * docblock above when releasing a new version of this plugin. */ -define('ACF_SVG_ICON_PICKER_VERSION', '4.0.1'); +define('ACF_SVG_ICON_PICKER_VERSION', '4.1.0'); define('ACF_SVG_ICON_PICKER_URL', plugin_dir_url(__FILE__)); define('ACF_SVG_ICON_PICKER_PATH', plugin_dir_path(__FILE__)); diff --git a/class-acf-field-svg-icon-picker.php b/class-acf-field-svg-icon-picker.php index d4e9e63..4091e98 100755 --- a/class-acf-field-svg-icon-picker.php +++ b/class-acf-field-svg-icon-picker.php @@ -99,7 +99,7 @@ private function check_priority_dir(): array } if (! is_array($priority_dir_settings) || ! isset($priority_dir_settings['path']) || ! isset($priority_dir_settings['url'])) { - _doing_it_wrong(__FUNCTION__, esc_attr__('The acf_svg_icon_picker_custom_location filter should contain an array with a path and url.', 'acf-svg-icon-picker'), '1.0.0'); + _doing_it_wrong(__FUNCTION__, esc_attr__('The acf_svg_icon_picker_custom_location filter should contain an array with a path and url.', 'acf-svg-icon-picker'), '4.0.0'); return []; } @@ -167,11 +167,11 @@ public function render_field_settings($field): void 'instructions' => '', 'type' => 'radio', 'name' => 'return_format', + 'layout' => 'horizontal', 'choices' => [ 'value' => __('Value', 'acf-svg-icon-picker'), 'icon' => __('Icon', 'acf-svg-icon-picker'), ], - 'layout' => 'horizontal', ] ); }