This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php snippets.php [SNIPPETS_DIRECTORY] | |
e.g. php snippets.php vue | |
SNIPPETS_DIRECTORY: Assuming that the snippets are categorized in directories (preferably by languages) and snippet directories and the script have the same parent directory. | |
e.g. | |
/snippets | |
| | |
+--- snippets.php | |
| | |
+--- /php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Include inline svg with + allow custom attributes as php function arguments | |
* | |
* Based on | |
* https://gist.github.com/kingkool68/6d72977fe8c82eeb9a85295ac3623cde#file-svg-functions-php | |
* | |
*/ | |
/** |