Index: trunk/extensions/WebFonts/WebFonts.hooks.php |
— | — | @@ -31,12 +31,13 @@ |
32 | 32 | } |
33 | 33 | |
34 | 34 | public static function addPreference( $user, &$preferences ) { |
| 35 | + global $wgUser; |
35 | 36 | // A checkbox in preferences to enable WebFonts |
36 | 37 | $preferences['webfontsEnable'] = array( |
37 | 38 | 'type' => 'toggle', |
38 | 39 | 'label-message' => 'webfonts-enable-preference', // a system message |
39 | 40 | 'section' => 'rendering/advancedrendering', // under 'Advanced options' section of 'Editing' tab |
40 | | - 'default' => true |
| 41 | + 'default' => $wgUser->getOption( 'webfontsEnable' ) |
41 | 42 | ); |
42 | 43 | |
43 | 44 | return true; |
Index: trunk/extensions/WebFonts/WebFonts.php |
— | — | @@ -39,6 +39,9 @@ |
40 | 40 | |
41 | 41 | $wgWebFontsEnabledByDefault = true; |
42 | 42 | |
| 43 | +// By default, the preference page option to enable webfonts is set to true. |
| 44 | +$wgDefaultUserOptions['webfontsEnable'] = true; |
| 45 | + |
43 | 46 | $wgResourceModules['webfonts'] = array( |
44 | 47 | 'scripts' => 'js/webfonts.js', |
45 | 48 | 'styles' => 'css/webfonts.css', |