File Manager / wp-content Search Upload New Item Settings File "db5.php" Full path: /home1/epichome/public_html/wp-content/db5.php File size: 60.67 B (60.67 KB bytes) MIME-type: text/x-php Charset: utf-8 Download Open Edit Advanced Editor Back
/home/pharmacy/www/wp-content/plugins/maxbuttons/assets/libraries/font-awesome-5/convert.php
<?php
// prevent direct access, but for conversion might be uncommented temporarily.
defined('ABSPATH') or die('No direct access permitted');
exit();

ini_set('display_errors', 1);
error_reporting(E_ALL);


$dir = '.';
$icon_json = file_get_contents($dir . '/icons.json');
$file_icon_array = json_decode($icon_json, true);


$array = array();


foreach($file_icon_array as $index => $item)
{
  $svg = $item['svg'];
  foreach($svg as $type => $data)
  {
    unset($svg[$type]['raw']);
    unset($svg[$type]['last_modified']);
  }

  $array[$index] = array(
      'styles' => $item['styles'],
      'label' => $item['label'],
      'svg' => $svg,

  );

}

$file = fopen('./icons_processed.json', 'w+');
fwrite($file, json_encode($array) );
fclose($file);

echo "<PRE>"; print_r($array); echo "</PRE>";



echo "DONE";


?>



<?php

function convert($size)
{
    $unit=array('b','kb','mb','gb','tb','pb');
    return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];
}


/* function tick_handler() {
    $mem = memory_get_usage();
    $bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2)[0];
    fwrite($file, $bt["file"].":".$bt["line"]."\t".$mem."\n");
}
register_tick_function('tick_handler');
*/
?>