r100614 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100613‎ | r100614 | r100615 >
Date:17:00, 24 October 2011
Author:santhosh
Status:ok
Tags:
Comment:
Set the default preference value of webfontsEnable as true for anonymous and new users.
Modified paths:
  • /trunk/extensions/WebFonts/WebFonts.hooks.php (modified) (history)
  • /trunk/extensions/WebFonts/WebFonts.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WebFonts/WebFonts.hooks.php
@@ -31,12 +31,13 @@
3232 }
3333
3434 public static function addPreference( $user, &$preferences ) {
 35+ global $wgUser;
3536 // A checkbox in preferences to enable WebFonts
3637 $preferences['webfontsEnable'] = array(
3738 'type' => 'toggle',
3839 'label-message' => 'webfonts-enable-preference', // a system message
3940 'section' => 'rendering/advancedrendering', // under 'Advanced options' section of 'Editing' tab
40 - 'default' => true
 41+ 'default' => $wgUser->getOption( 'webfontsEnable' )
4142 );
4243
4344 return true;
Index: trunk/extensions/WebFonts/WebFonts.php
@@ -39,6 +39,9 @@
4040
4141 $wgWebFontsEnabledByDefault = true;
4242
 43+// By default, the preference page option to enable webfonts is set to true.
 44+$wgDefaultUserOptions['webfontsEnable'] = true;
 45+
4346 $wgResourceModules['webfonts'] = array(
4447 'scripts' => 'js/webfonts.js',
4548 'styles' => 'css/webfonts.css',

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100600Change the negative preference "Disable Webfonts" to postive preference "Enab...santhosh10:54, 24 October 2011

Status & tagging log