mirror of
https://github.com/flextype/flextype.git
synced 2025-08-30 00:10:31 +02:00
@@ -86,9 +86,8 @@ class Snippets
|
||||
// If there is any snippets file then go...
|
||||
if (count($_snippets) > 0) {
|
||||
foreach ($_snippets as $snippet) {
|
||||
if ($snippet['type'] == 'file' && $snippet['extension'] == 'json') {
|
||||
$snippet_content = JsonParser::decode(Filesystem::read($snippet['path']));
|
||||
$snippet[$snippet['basename']] = $snippet_content['title'];
|
||||
if ($snippet['type'] == 'file' && $snippet['extension'] == 'php') {
|
||||
$snippet[$snippet['basename']] = $snippet['basename'];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -232,4 +231,15 @@ class Snippets
|
||||
{
|
||||
return PATH['snippets'] . '/' . $id . '.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method _dir_location
|
||||
*
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
private function _dir_location() : string
|
||||
{
|
||||
return PATH['snippets'] . '/';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user