Rename "content_filter" hook to "prepare_body_content_filter"
parent
f73e083928
commit
0c3f747649
|
@ -12,7 +12,7 @@ use Friendica\Core\PConfig;
|
||||||
|
|
||||||
function blockem_install()
|
function blockem_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('content_filter', 'addon/blockem/blockem.php', 'blockem_content_filter');
|
Addon::registerHook('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
|
||||||
Addon::registerHook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
|
Addon::registerHook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
|
||||||
Addon::registerHook('addon_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings');
|
Addon::registerHook('addon_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
|
Addon::registerHook('addon_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
|
||||||
|
@ -23,7 +23,7 @@ function blockem_install()
|
||||||
|
|
||||||
function blockem_uninstall()
|
function blockem_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('content_filter', 'addon/blockem/blockem.php', 'blockem_content_filter');
|
Addon::unregisterHook('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
|
||||||
Addon::unregisterHook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
|
Addon::unregisterHook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
|
||||||
Addon::unregisterHook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
|
Addon::unregisterHook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings');
|
Addon::unregisterHook('addon_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings');
|
||||||
|
@ -107,7 +107,7 @@ function blockem_enotify_store(&$a,&$b) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function blockem_content_filter(\Friendica\App $a, &$hook_data)
|
function blockem_prepare_body_content_filter(\Friendica\App $a, &$hook_data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!local_user()) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -19,14 +19,14 @@ use Friendica\Core\PConfig;
|
||||||
|
|
||||||
function langfilter_install()
|
function langfilter_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('content_filter', 'addon/langfilter/langfilter.php', 'langfilter_content_filter', 10);
|
Addon::registerHook('prepare_body_content_filter', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body_content_filter', 10);
|
||||||
Addon::registerHook('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
|
Addon::registerHook('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
|
Addon::registerHook('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function langfilter_uninstall()
|
function langfilter_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('content_filter', 'addon/langfilter/langfilter.php', 'langfilter_content_filter');
|
Addon::unregisterHook('prepare_body_content_filter', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body_content_filter');
|
||||||
Addon::unregisterHook('prepare_body', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body');
|
Addon::unregisterHook('prepare_body', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
|
Addon::unregisterHook('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
|
Addon::unregisterHook('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
|
||||||
|
@ -115,7 +115,7 @@ function langfilter_addon_settings_post(App $a, &$b)
|
||||||
* expand it again.
|
* expand it again.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function langfilter_content_filter(App $a, &$hook_data)
|
function langfilter_prepare_body_content_filter(App $a, &$hook_data)
|
||||||
{
|
{
|
||||||
$logged_user = local_user();
|
$logged_user = local_user();
|
||||||
if (!$logged_user) {
|
if (!$logged_user) {
|
||||||
|
|
|
@ -13,14 +13,14 @@ use Friendica\Core\PConfig;
|
||||||
|
|
||||||
function nsfw_install()
|
function nsfw_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('content_filter', 'addon/nsfw/nsfw.php', 'nsfw_content_filter', 10);
|
Addon::registerHook('prepare_body_content_filter', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body_content_filter', 10);
|
||||||
Addon::registerHook('addon_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
|
Addon::registerHook('addon_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
|
Addon::registerHook('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function nsfw_uninstall()
|
function nsfw_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('content_filter', 'addon/nsfw/nsfw.php', 'nsfw_content_filter');
|
Addon::unregisterHook('prepare_body_content_filter', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body_content_filter');
|
||||||
Addon::unregisterHook('prepare_body', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body');
|
Addon::unregisterHook('prepare_body', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
|
Addon::unregisterHook('addon_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
|
Addon::unregisterHook('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
|
||||||
|
@ -110,7 +110,7 @@ function nsfw_addon_settings_post(&$a, &$b)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function nsfw_content_filter(\Friendica\App $a, &$hook_data)
|
function nsfw_prepare_body_content_filter(\Friendica\App $a, &$hook_data)
|
||||||
{
|
{
|
||||||
$words = null;
|
$words = null;
|
||||||
if (PConfig::get(local_user(), 'nsfw', 'disable')) {
|
if (PConfig::get(local_user(), 'nsfw', 'disable')) {
|
||||||
|
|
Loading…
Reference in New Issue