From 70325b39523728f005149d393b9e989400997269 Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Wed, 26 Aug 2020 18:45:15 -0400 Subject: [PATCH] Remove The {{description2}} parser function is still present. The hooks was just added "so that Description2 can be used as a replacement for Extension:MetaDescriptionTag", but MW 1.35 deprecated and 1.36 removed support for Parser::setFunctionTagHook. Bug: T236809 Change-Id: I53710f0d0a7bc8de4a3404b6df9ccbd1381cf36d --- includes/Description2.php | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/includes/Description2.php b/includes/Description2.php index 29e0e7d..c14e74d 100644 --- a/includes/Description2.php +++ b/includes/Description2.php @@ -81,11 +81,6 @@ class Description2 { [ static::class, 'parserFunctionCallback' ], Parser::SFH_OBJECT_ARGS ); - $parser->setFunctionTagHook( - 'metadesc', - [ static::class, 'tagCallback' ], - Parser::SFH_OBJECT_ARGS - ); return true; } @@ -101,22 +96,6 @@ class Description2 { return ''; } - /** - * @param Parser $parser The parser. - * @param PPFrame $frame Not used. - * @param string $content The contents of the tag (if any). - * @param string[] $attributes The tag attributes (if any). - * @return string - */ - public static function tagCallback( Parser $parser, PPFrame $frame, $content, $attributes ) { - $contentAttr = isset( $attributes['content'] ) ? $attributes['content'] : null; - $desc = isset( $content ) ? $content : $contentAttr; - if ( isset( $desc ) ) { - self::setDescription( $parser, $desc ); - } - return ''; - } - /** * @param OutputPage &$out The output page to add the meta element to. * @param ParserOutput $parserOutput The parser output to get the description from.