From: Ed Sanders Date: Fri, 29 Apr 2016 21:30:57 +0000 (+0100) Subject: Add class to div wrapper around category lists X-Git-Tag: 1.31.0-rc.0~7138^2 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=2fa533bfadb0995c09c7ee267d7088c653d7eacc;p=lhc%2Fweb%2Fwiklou.git Add class to div wrapper around category lists Allows VE to target non-editable content to keep on the page. Change-Id: If687b84d9ad33a0315a8ba4260bc3532691f05ed --- diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php index f7490033d4..389b077474 100644 --- a/includes/CategoryViewer.php +++ b/includes/CategoryViewer.php @@ -138,9 +138,13 @@ class CategoryViewer extends ContextSource { } $lang = $this->getLanguage(); - $langAttribs = [ 'lang' => $lang->getHtmlCode(), 'dir' => $lang->getDir() ]; + $attribs = [ + 'class' => 'mw-category-generated', + 'lang' => $lang->getHtmlCode(), + 'dir' => $lang->getDir() + ]; # put a div around the headings which are in the user language - $r = Html::openElement( 'div', $langAttribs ) . $r . ''; + $r = Html::openElement( 'div', $attribs ) . $r . ''; return $r; }