Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

change way for retrieving the filename #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fields/acf-icon-picker-v5.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down