commit
4627a3544b
2 changed files with 6 additions and 6 deletions
|
@ -321,7 +321,7 @@ function createPage($args) {
|
|||
$key = $pages->add($args);
|
||||
if ($key) {
|
||||
// Call the plugins after page created
|
||||
Theme::plugins('afterPageCreate');
|
||||
Theme::plugins('afterPageCreate', array($key));
|
||||
|
||||
reindexCategories();
|
||||
reindexTags();
|
||||
|
@ -371,7 +371,7 @@ function editPage($args) {
|
|||
$key = $pages->edit($args);
|
||||
if ($key) {
|
||||
// Call the plugins after page modified
|
||||
Theme::plugins('afterPageModify');
|
||||
Theme::plugins('afterPageModify', array($key));
|
||||
|
||||
reindexCategories();
|
||||
reindexTags();
|
||||
|
@ -392,10 +392,10 @@ function editPage($args) {
|
|||
function deletePage($key) {
|
||||
global $pages;
|
||||
global $syslog;
|
||||
|
||||
|
||||
if ($pages->delete($key)) {
|
||||
// Call the plugins after page deleted
|
||||
Theme::plugins('afterPageDelete');
|
||||
Theme::plugins('afterPageDelete', array($key));
|
||||
|
||||
reindexCategories();
|
||||
reindexTags();
|
||||
|
|
|
@ -225,11 +225,11 @@ class Theme {
|
|||
return self::javascript($files, $base, $attributes);
|
||||
}
|
||||
|
||||
public static function plugins($type)
|
||||
public static function plugins($type, $args = array())
|
||||
{
|
||||
global $plugins;
|
||||
foreach ($plugins[$type] as $plugin) {
|
||||
echo call_user_func(array($plugin, $type));
|
||||
echo call_user_func_array(array($plugin, $type), $args);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue