- static function editingPreferences( $user, &$defaultPreferences ) {
- global $wgUseExternalEditor, $wgAllowUserCssPrefs;
-
- ## Editing #####################################
- $defaultPreferences['cols'] = array(
- 'type' => 'int',
- 'label-message' => 'columns',
- 'section' => 'editing/textboxsize',
- 'min' => 4,
- 'max' => 1000,
- );
- $defaultPreferences['rows'] = array(
- 'type' => 'int',
- 'label-message' => 'rows',
- 'section' => 'editing/textboxsize',
- 'min' => 4,
- 'max' => 1000,
- );
-
- if ( $wgAllowUserCssPrefs ) {
- $defaultPreferences['editfont'] = array(
- 'type' => 'select',
- 'section' => 'editing/advancedediting',
- 'label-message' => 'editfont-style',
- 'options' => array(
- wfMsg( 'editfont-default' ) => 'default',
- wfMsg( 'editfont-monospace' ) => 'monospace',
- wfMsg( 'editfont-sansserif' ) => 'sans-serif',
- wfMsg( 'editfont-serif' ) => 'serif',
- )
- );
- }
- $defaultPreferences['previewontop'] = array(
- 'type' => 'toggle',
- 'section' => 'editing/advancedediting',
- 'label-message' => 'tog-previewontop',
- );
- $defaultPreferences['previewonfirst'] = array(
- 'type' => 'toggle',
- 'section' => 'editing/advancedediting',
- 'label-message' => 'tog-previewonfirst',
- );
-
- if ( $wgAllowUserCssPrefs ) {
- $defaultPreferences['editsection'] = array(
- 'type' => 'toggle',
- 'section' => 'editing/advancedediting',
- 'label-message' => 'tog-editsection',
- );
- }
- $defaultPreferences['editsectiononrightclick'] = array(
+ /**
+ * @param User $user
+ * @param IContextSource $context
+ * @param array &$defaultPreferences
+ */
+ static function editingPreferences( $user, IContextSource $context, &$defaultPreferences ) {
+ # # Editing #####################################
+ $defaultPreferences['editsectiononrightclick'] = [