From ccbedc725412baecbe0dc6b4f2257bb7a691fcc9 Mon Sep 17 00:00:00 2001 From: Phillip Date: Thu, 2 May 2024 16:17:25 +0200 Subject: [PATCH] change way for retrieving the filename --- fields/acf-icon-picker-v5.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fields/acf-icon-picker-v5.php b/fields/acf-icon-picker-v5.php index 7d53a2f..29d9f34 100755 --- a/fields/acf-icon-picker-v5.php +++ b/fields/acf-icon-picker-v5.php @@ -42,9 +42,9 @@ function __construct( $settings ) { $files = array_diff(scandir($this->path), array('.', '..')); foreach ($files as $file) { if( pathinfo($file, PATHINFO_EXTENSION) == 'svg' ){ - $exploded = explode('.', $file); + $filename = pathinfo($file, PATHINFO_FILENAME); $icon = array( - 'name' => $exploded[0], + 'name' => $filename, 'icon' => $file ); array_push($this->svgs, $icon);