X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FHtml.php;h=3bcf13132f1beaa98fb01dfb15eb1feee4c233d0;hb=d21c49254b9bfabfe7b0fbe6ec8dcb339ada3598;hp=dfd80a8c434dd7ef0bd00a9aa7dcefc334e882eb;hpb=58858df842f91d9ea1c9f9b6f3c767d8b204886b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Html.php b/includes/Html.php index dfd80a8c43..3bcf13132f 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -589,9 +589,12 @@ class Html { * * @param string $contents CSS * @param string $media A media type string, like 'screen' + * @param array $attribs (since 1.31) Associative array of attributes, e.g., [ + * 'href' => 'https://www.mediawiki.org/' ]. See expandAttributes() for + * further documentation. * @return string Raw HTML */ - public static function inlineStyle( $contents, $media = 'all' ) { + public static function inlineStyle( $contents, $media = 'all', $attribs = [] ) { // Don't escape '>' since that is used // as direct child selector. // Remember, in css, there is no "x" for hexadecimal escapes, and @@ -609,7 +612,7 @@ class Html { return self::rawElement( 'style', [ 'media' => $media, - ], $contents ); + ] + $attribs, $contents ); } /**