From 2fa533bfadb0995c09c7ee267d7088c653d7eacc Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Fri, 29 Apr 2016 22:30:57 +0100 Subject: [PATCH] Add class to div wrapper around category lists Allows VE to target non-editable content to keep on the page. Change-Id: If687b84d9ad33a0315a8ba4260bc3532691f05ed --- includes/CategoryViewer.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; } -- 2.20.1