Actualiser functions.php
This commit is contained in:
parent
75992faa5d
commit
69a6aaff7e
1 changed files with 6 additions and 6 deletions
|
|
@ -1,13 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
//directory where icons arent
|
||||||
$files = scandir(get_stylesheet_directory().'/icons2');
|
$files = scandir(get_stylesheet_directory().'/icons2');
|
||||||
|
|
||||||
function store_svg_icons_to_json($files) {
|
function store_svg_icons_to_json($files) {
|
||||||
|
// init empty array
|
||||||
$json_svgs=[];
|
$json_svgs=[];
|
||||||
|
// loop into files list
|
||||||
foreach($files as $file) {
|
foreach($files as $file) {
|
||||||
|
// remove empty files
|
||||||
if($file!='.' && $file!='..'){
|
if($file!='.' && $file!='..'){
|
||||||
|
|
||||||
$name = str_replace('.svg','',$file);
|
$name = str_replace('.svg','',$file);
|
||||||
$icon = esc_html(file_get_contents(get_stylesheet_directory().'/icons2/'.$file));
|
$icon = esc_html(file_get_contents(get_stylesheet_directory().'/icons2/'.$file));
|
||||||
$icon = str_replace('http://www.w3.org/2000/svg">','',$icon);
|
$icon = str_replace('http://www.w3.org/2000/svg">','',$icon);
|
||||||
|
|
@ -19,5 +21,3 @@ function store_svg_icons_to_json($files) {
|
||||||
}
|
}
|
||||||
return $jsons_svgs;
|
return $jsons_svgs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue