From 0a2dcacbcf01e1ebb225570fb99811c4215c6ea9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 14 Nov 2021 11:11:49 +0300 Subject: normalize some mismatching hook function definitions to match base Plugin class --- plugins/af_youtube_embed/init.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/af_youtube_embed/init.php') diff --git a/plugins/af_youtube_embed/init.php b/plugins/af_youtube_embed/init.php index 771ee8c46..a1be5562a 100644 --- a/plugins/af_youtube_embed/init.php +++ b/plugins/af_youtube_embed/init.php @@ -18,7 +18,7 @@ class Af_Youtube_Embed extends Plugin { "youtu.be"]); } - function hook_render_enclosure($entry, $hide_images) { + function hook_render_enclosure($entry, $id, $rv) { $url = $entry["content_url"]; -- cgit v1.2.3-54-g00ecf From 6bd6a14c207ddaf35256b11dd381093d57ef38a4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 14 Nov 2021 20:19:12 +0300 Subject: revise phpdoc annotations for hook_sanitize() --- classes/plugin.php | 4 ++-- plugins/af_youtube_embed/init.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/af_youtube_embed/init.php') diff --git a/classes/plugin.php b/classes/plugin.php index 290c4cc3b..55ccff9c3 100644 --- a/classes/plugin.php +++ b/classes/plugin.php @@ -232,7 +232,7 @@ abstract class Plugin { * @param array $allowed_elements * @param array $disallowed_attributes * @param int $article_id - * @return DOMDocument + * @return DOMDocument|array> */ function hook_sanitize($doc, $site_url, $allowed_elements, $disallowed_attributes, $article_id) { user_error("Dummy method invoked.", E_USER_ERROR); @@ -519,7 +519,7 @@ abstract class Plugin { /** * @param string $url - * @return string + * @return string|false */ function hook_get_full_text($url) { user_error("Dummy method invoked.", E_USER_ERROR); diff --git a/plugins/af_youtube_embed/init.php b/plugins/af_youtube_embed/init.php index a1be5562a..ff44bb291 100644 --- a/plugins/af_youtube_embed/init.php +++ b/plugins/af_youtube_embed/init.php @@ -32,6 +32,8 @@ class Af_Youtube_Embed extends Plugin { "; } + + return ""; } function api_version() { -- cgit v1.2.3-54-g00ecf