X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FHtml.php;h=3bcf13132f1beaa98fb01dfb15eb1feee4c233d0;hp=dfd80a8c434dd7ef0bd00a9aa7dcefc334e882eb;hb=ee56f00ddf0609082f8ae9a4dc3e6e1b6f54ddfd;hpb=9de578da93ec2b649340e5512db61618cc12e442 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 ); } /**