mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 07:35:14 +00:00
allow widget 'packages' as well as individual files
This commit is contained in:
parent
b816a575eb
commit
8d61efa0e8
1 changed files with 7 additions and 2 deletions
|
@ -284,8 +284,13 @@ function comanche_widget($name, $text) {
|
|||
|
||||
$func = 'widget_' . trim($name);
|
||||
|
||||
if((! function_exists($func)) && file_exists('widget/' . trim($name) . '.php'))
|
||||
require_once('widget/' . trim($name) . '.php');
|
||||
if(! function_exists($func)) {
|
||||
if(file_exists('widget/' . trim($name) . '.php'))
|
||||
require_once('widget/' . trim($name) . '.php');
|
||||
elseif(is_dir('widget/'. trim($name))
|
||||
&& (file_exists('widget/' . trim($name) . '/' . trim($name) . '.php')))
|
||||
require_once('widget/' . trim($name) . '/' . trim($name) . '.php');
|
||||
}
|
||||
else {
|
||||
$theme_widget = $func . '.php';
|
||||
if((! function_exists($func)) && theme_include($theme_widget))
|
||||
|
|
Loading…
Reference in a new issue