Update function names

update function names and hook calls
This commit is contained in:
Adam Magness 2018-01-20 08:57:41 -05:00
parent 0afd633346
commit c71f7b0e1a
50 changed files with 356 additions and 348 deletions

View file

@ -1,7 +1,7 @@
<?php
/**
* Name: Libravatar Support
* Description: If there is no avatar image for a new user or contact this plugin will look for one at Libravatar. Please disable Gravatar addon if you use this one. (requires PHP >= 5.3)
* Description: If there is no avatar image for a new user or contact this addon will look for one at Libravatar. Please disable Gravatar addon if you use this one. (requires PHP >= 5.3)
* Version: 1.1
* Author: Klaus Weidenbach <http://friendica.dszdw.net/profile/klaus>
*/
@ -9,7 +9,7 @@ use Friendica\Core\Addon;
use Friendica\Core\Config;
/**
* Installs the plugin hook
* Installs the addon hook
*/
function libravatar_install() {
if (! version_compare(PHP_VERSION, '5.3.0', '>=')) {
@ -23,7 +23,7 @@ function libravatar_install() {
}
/**
* Removes the plugin hook
* Removes the addon hook
*/
function libravatar_uninstall() {
Addon::unregisterHook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
@ -61,7 +61,7 @@ function libravatar_lookup($a, &$b) {
/**
* Display admin settings for this addon
*/
function libravatar_plugin_admin (&$a, &$o) {
function libravatar_addon_admin (&$a, &$o) {
$t = get_markup_template( "admin.tpl", "addon/libravatar" );
$default_avatar = Config::get('libravatar', 'default_img');
@ -106,7 +106,7 @@ function libravatar_plugin_admin (&$a, &$o) {
/**
* Save admin settings
*/
function libravatar_plugin_admin_post (&$a) {
function libravatar_addon_admin_post (&$a) {
check_form_security_token('libravatarrsave');
$default_avatar = ((x($_POST, 'avatar')) ? notags(trim($_POST['avatar'])) : 'identicon');