Reduce number of calls to Hook::delete when uninstalling addons/themes
- Add a sweeping Hook deletion on theme uninstall (like for addons)
This commit is contained in:
parent
121bb85719
commit
cd84f9a921
2 changed files with 2 additions and 12 deletions
|
@ -158,6 +158,8 @@ class Theme
|
|||
if (function_exists($func)) {
|
||||
$func();
|
||||
}
|
||||
|
||||
Hook::delete(['file' => "view/theme/$theme/theme.php"]);
|
||||
}
|
||||
|
||||
$allowed_themes = Theme::getAllowedList();
|
||||
|
|
|
@ -54,18 +54,6 @@ function frio_install()
|
|||
Logger::log('installed theme frio');
|
||||
}
|
||||
|
||||
function frio_uninstall()
|
||||
{
|
||||
Hook::unregister('prepare_body_final', 'view/theme/frio/theme.php', 'frio_item_photo_links');
|
||||
Hook::unregister('item_photo_menu', 'view/theme/frio/theme.php', 'frio_item_photo_menu');
|
||||
Hook::unregister('contact_photo_menu', 'view/theme/frio/theme.php', 'frio_contact_photo_menu');
|
||||
Hook::unregister('nav_info', 'view/theme/frio/theme.php', 'frio_remote_nav');
|
||||
Hook::unregister('acl_lookup_end', 'view/theme/frio/theme.php', 'frio_acl_lookup');
|
||||
Hook::unregister('display_item', 'view/theme/frio/theme.php', 'frio_display_item');
|
||||
|
||||
Logger::log('uninstalled theme frio');
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace friendica photo links hook
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue