X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fparser%2FParserOptions.php;h=ca8e739f9a0d8e9b5bf1fe0ba2e6edc81bb08597;hb=8b0e7298ac25ccbb83d382bcb81f6c9433d053ca;hp=f99089b89505efde0739574f595fa92d06e646c6;hpb=d0142faf253e069473888dc378979b804fb2b07e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/ParserOptions.php b/includes/parser/ParserOptions.php index f99089b895..ca8e739f9a 100644 --- a/includes/parser/ParserOptions.php +++ b/includes/parser/ParserOptions.php @@ -65,7 +65,6 @@ class ParserOptions { 'stubthreshold' => true, 'printable' => true, 'userlang' => true, - 'wrapclass' => true, ]; /** @@ -780,13 +779,17 @@ class ParserOptions { /** * CSS class to use to wrap output from Parser::parse() * @since 1.30 - * @param string|bool $className Set false to disable wrapping. + * @param string $className Class name to use for wrapping. + * Passing false to indicate "no wrapping" was deprecated in MediaWiki 1.31. * @return string|bool Current value */ public function setWrapOutputClass( $className ) { if ( $className === true ) { // DWIM, they probably want the default class name $className = 'mw-parser-output'; } + if ( $className === false ) { + wfDeprecated( __METHOD__ . '( false )', '1.31' ); + } return $this->setOption( 'wrapclass', $className ); } @@ -1059,8 +1062,8 @@ class ParserOptions { 'printable' => false, 'allowUnsafeRawHtml' => true, 'wrapclass' => 'mw-parser-output', - 'currentRevisionCallback' => [ 'Parser', 'statelessFetchRevision' ], - 'templateCallback' => [ 'Parser', 'statelessFetchTemplate' ], + 'currentRevisionCallback' => [ Parser::class, 'statelessFetchRevision' ], + 'templateCallback' => [ Parser::class, 'statelessFetchTemplate' ], 'speculativeRevIdCallback' => null, ];