downgrade hook to v1
This commit is contained in:
parent
ff04986083
commit
55eb683b36
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Name: Link
|
* Name: Link
|
||||||
* Description: Using short links on whole hub
|
* Description: Using short links on whole hub
|
||||||
* Version: 0.66
|
* Version: 0.67
|
||||||
* Author: ivan zlax <@zlax@ussr.win>
|
* Author: ivan zlax <@zlax@ussr.win>
|
||||||
* Maintainer: ivan zlax <@zlax@ussr.win>
|
* Maintainer: ivan zlax <@zlax@ussr.win>
|
||||||
*/
|
*/
|
||||||
|
@ -14,13 +14,13 @@ use Zotlabs\Extend\Route;
|
||||||
function link_load() {
|
function link_load() {
|
||||||
Route::register('addon/link/Mod_Link.php','link');
|
Route::register('addon/link/Mod_Link.php','link');
|
||||||
if (get_config('link','linkonhub'))
|
if (get_config('link','linkonhub'))
|
||||||
Hook::register('dropdown_extras', 'addon/link/link.php', 'dropdown_link', 1, 5000);
|
register_hook('dropdown_extras', 'addon/link/link.php', 'dropdown_link');
|
||||||
set_config('link','linkenabled',1);
|
set_config('link','linkenabled',1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function link_unload() {
|
function link_unload() {
|
||||||
Route::unregister('addon/link/Mod_Link.php','link');
|
Route::unregister('addon/link/Mod_Link.php','link');
|
||||||
Hook::unregister('dropdown_extras', 'addon/link/link.php', 'dropdown_link');
|
unregister_hook('dropdown_extras', 'addon/link/link.php', 'dropdown_link');
|
||||||
del_config('link','linkenabled');
|
del_config('link','linkenabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,9 +35,9 @@ function link_plugin_admin(&$a,&$o) {
|
||||||
function link_plugin_admin_post(&$a) {
|
function link_plugin_admin_post(&$a) {
|
||||||
set_config('link','linkonhub',trim($_POST['linkonhub']));
|
set_config('link','linkonhub',trim($_POST['linkonhub']));
|
||||||
if (get_config('link','linkonhub'))
|
if (get_config('link','linkonhub'))
|
||||||
Hook::register('dropdown_extras', 'addon/link/link.php', 'dropdown_link', 1, 5000);
|
register_hook('dropdown_extras', 'addon/link/link.php', 'dropdown_link');
|
||||||
else
|
else
|
||||||
Hook::unregister('dropdown_extras', 'addon/link/link.php', 'dropdown_link');
|
unregister_hook('dropdown_extras', 'addon/link/link.php', 'dropdown_link');
|
||||||
info( t('Settings updated.') . EOL );
|
info( t('Settings updated.') . EOL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue