mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-07 09:54:27 +02:00
Update function names
update function names and hook calls
This commit is contained in:
parent
0afd633346
commit
c71f7b0e1a
50 changed files with 356 additions and 348 deletions
|
@ -16,7 +16,7 @@ function krynn_install() {
|
|||
|
||||
/**
|
||||
*
|
||||
* Our demo plugin will attach in three places.
|
||||
* Our demo addon will attach in three places.
|
||||
* The first is just prior to storing a local post.
|
||||
*
|
||||
*/
|
||||
|
@ -25,14 +25,14 @@ function krynn_install() {
|
|||
|
||||
/**
|
||||
*
|
||||
* Then we'll attach into the plugin settings page, and also the
|
||||
* Then we'll attach into the addon settings page, and also the
|
||||
* settings post hook so that we can create and update
|
||||
* user preferences.
|
||||
*
|
||||
*/
|
||||
|
||||
Addon::registerHook('plugin_settings', 'addon/krynn/krynn.php', 'krynn_settings');
|
||||
Addon::registerHook('plugin_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
|
||||
Addon::registerHook('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
|
||||
Addon::registerHook('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
|
||||
|
||||
logger("installed krynn");
|
||||
}
|
||||
|
@ -49,8 +49,8 @@ function krynn_uninstall() {
|
|||
*/
|
||||
|
||||
Addon::unregisterHook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
|
||||
Addon::unregisterHook('plugin_settings', 'addon/krynn/krynn.php', 'krynn_settings');
|
||||
Addon::unregisterHook('plugin_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
|
||||
Addon::unregisterHook('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
|
||||
Addon::unregisterHook('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
|
||||
|
||||
|
||||
logger("removed krynn");
|
||||
|
@ -65,7 +65,7 @@ function krynn_post_hook($a, &$item) {
|
|||
* An item was posted on the local system.
|
||||
* We are going to look for specific items:
|
||||
* - A status post by a profile owner
|
||||
* - The profile owner must have allowed our plugin
|
||||
* - The profile owner must have allowed our addon
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -126,7 +126,7 @@ function krynn_settings_post($a,$post) {
|
|||
|
||||
/**
|
||||
*
|
||||
* Called from the Plugin Setting form.
|
||||
* Called from the addon Setting form.
|
||||
* Add our own settings info to the page.
|
||||
*
|
||||
*/
|
||||
|
@ -162,7 +162,7 @@ function krynn_settings(&$a,&$s) {
|
|||
$s .= '<div class="settings-block">';
|
||||
$s .= '<h3>' . t('Krynn Settings') . '</h3>';
|
||||
$s .= '<div id="krynn-enable-wrapper">';
|
||||
$s .= '<label id="krynn-enable-label" for="krynn-checkbox">' . t('Enable Krynn Plugin') . '</label>';
|
||||
$s .= '<label id="krynn-enable-label" for="krynn-checkbox">' . t('Enable Krynn Addon') . '</label>';
|
||||
$s .= '<input id="krynn-checkbox" type="checkbox" name="krynn" value="1" ' . $checked . '/>';
|
||||
$s .= '</div><div class="clear"></div></div>';
|
||||
/* provide a submit button */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue