calling hook has changed on Friendica development branch on Jan 20th 2018

This commit is contained in:
Tobias Diekershoff 2018-01-21 08:14:19 +01:00
parent 33ae19aed2
commit cc32f07105
1 changed files with 4 additions and 3 deletions

View File

@ -2,18 +2,19 @@
/* /*
* Name: Typography * Name: Typography
* Description: Applies typographical enhancements to the postings before displaying them * Description: Applies typographical enhancements to the postings before displaying them
* Version: 0.1 * Version: 0.2
* Author: Tobias Diekershoff <tobias@f.diekershoff.de> * Author: Tobias Diekershoff <tobias@f.diekershoff.de>
* License: GPL 2.0 * License: GPL 2.0
*/ */
use Friendica\Core\PConfig; use Friendica\Core\PConfig;
use Friendica\Core\Addon;
function typography_install () { function typography_install () {
register_hook ('prepare_body', 'addon/typography/typography.php', 'typography_render' ); Addon::registerHook ('prepare_body', 'addon/typography/typography.php', 'typography_render' );
} }
function typography_uninstall () { function typography_uninstall () {
unregister_hook ('prepare_body', 'addon/typography/typography.php', 'typography_render' ); Addon::unregisterHook ('prepare_body', 'addon/typography/typography.php', 'typography_render' );
} }
function typography_render ( &$a, &$o) { function typography_render ( &$a, &$o) {
require_once('php-typography/php-typography.php'); require_once('php-typography/php-typography.php');