PluginProbe
WindPress – Tailwind CSS integration for WordPress / 3.0.13
WindPress – Tailwind CSS integration for WordPress v3.0.13
3.2.89 3.2.88 3.2.87 3.2.86 3.2.85 3.2.84 3.2.83 3.2.82 3.2.81 trunk 3.0.0 3.0.1 3.0.10 3.0.11 3.0.12 3.0.13 3.0.14 3.0.15 3.0.16 3.0.17 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 All 143 releases
windpress / vendor / masterminds / html5 / bin / entities.php

entities.php in WindPress – Tailwind CSS integration for WordPress 3.0.13, at vendor/masterminds/html5/bin/entities.php

26 lines 666 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WindPressDeps;
4
5 /**
6 * Fetch the entities.json file and convert to PHP datastructure.
7 */
8 // The URL to the official entities JSON file.
9 $ENTITIES_URL = 'http://www.w3.org/TR/2012/CR-html5-20121217/entities.json';
10 $payload = \file_get_contents($ENTITIES_URL);
11 $json = \json_decode($payload);
12 $table = array();
13 foreach ($json as $name => $obj) {
14 $sname = \substr($name, 1, -1);
15 $table[$sname] = $obj->characters;
16 }
17 echo '<?php
18 namespace Masterminds\\HTML5;
19 /** Entity lookup tables. This class is automatically generated. */
20 class Entities {
21 public static $byName = ';
22 \var_export($table);
23 echo ';
24 }' . \PHP_EOL;
25 //print serialize($table);
26