diff --git a/doc/Addons.md b/doc/Addons.md index 756ded800a..4df91864bc 100644 --- a/doc/Addons.md +++ b/doc/Addons.md @@ -295,7 +295,7 @@ Called at the start of prepare_body Hook data: 'item' => item array (input/output) -### 'content_filter' +### 'prepare_body_content_filter' Called before the HTML conversion in prepare_body. If the item matches a content filter rule set by an addon, it should just add the reason to the filter_reasons element of the hook data. Hook data: @@ -353,7 +353,7 @@ include/security.php: Addon::callHooks('logged_in', $a->user); include/text.php: Addon::callHooks('contact_block_end', $arr); include/text.php: Addon::callHooks('poke_verbs', $arr); include/text.php: Addon::callHooks('prepare_body_init', $item); -include/text.php: Addon::callHooks('content_filter', $hook_data); +include/text.php: Addon::callHooks('prepare_body_content_filter', $hook_data); include/text.php: Addon::callHooks('prepare_body', $hook_data); include/text.php: Addon::callHooks('prepare_body_final', $hook_data); diff --git a/doc/de/Addons.md b/doc/de/Addons.md index 4e4beefade..7651840f41 100644 --- a/doc/de/Addons.md +++ b/doc/de/Addons.md @@ -223,7 +223,7 @@ include/security.php: Addon::callHooks('logged_in', $a->user); include/text.php: Addon::callHooks('contact_block_end', $arr); include/text.php: Addon::callHooks('poke_verbs', $arr); include/text.php: Addon::callHooks('prepare_body_init', $item); -include/text.php: Addon::callHooks('content_filter', $hook_data); +include/text.php: Addon::callHooks('prepare_body_content_filter', $hook_data); include/text.php: Addon::callHooks('prepare_body', $hook_data); include/text.php: Addon::callHooks('prepare_body_final', $hook_data); diff --git a/include/text.php b/include/text.php index b1a9f70d02..8a6fd00312 100644 --- a/include/text.php +++ b/include/text.php @@ -1214,7 +1214,7 @@ function put_item_in_cache(&$item, $update = false) * @param boolean $is_preview * @return string item body html * @hook prepare_body_init item array before any work - * @hook content_filter ('item'=>item array, 'filter_reasons'=>string array) before first bbcode to html + * @hook prepare_body_content_filter ('item'=>item array, 'filter_reasons'=>string array) before first bbcode to html * @hook prepare_body ('item'=>item array, 'html'=>body string, 'is_preview'=>boolean, 'filter_reasons'=>string array) after first bbcode to html * @hook prepare_body_final ('item'=>item array, 'html'=>body string) after attach icons and blockquote special case handling (spoiler, author) */ @@ -1279,7 +1279,7 @@ function prepare_body(array &$item, $attach = false, $is_preview = false) 'item' => $item, 'filter_reasons' => $filter_reasons ]; - Addon::callHooks('content_filter', $hook_data); + Addon::callHooks('prepare_body_content_filter', $hook_data); $filter_reasons = $hook_data['filter_reasons']; unset($hook_data); }