protected function runPostMergeFilters( Content $content, Status $status, User $user ) {
// Run old style post-section-merge edit filter
if ( !ContentHandler::runLegacyHooks( 'EditFilterMerged',
- [ $this, $content, &$this->hookError, $this->summary ] )
- ) {
+ [ $this, $content, &$this->hookError, $this->summary ]
+ ) ) {
# Error messages etc. could be handled within the hook...
$status->fatal( 'hookaborted' );
$status->value = self::AS_HOOK_ERROR;
'id' => $name,
'cols' => $wgUser->getIntOption( 'cols' ),
'rows' => $wgUser->getIntOption( 'rows' ),
- // The following classes can be used here:
- // * mw-editfont-default
- // * mw-editfont-monospace
- // * mw-editfont-sans-serif
- // * mw-editfont-serif
- 'class' => 'mw-editfont-' . $wgUser->getOption( 'editfont' ),
// Avoid PHP notices when appending preferences
// (appending allows customAttribs['style'] to still work).
'style' => ''
];
+ // The following classes can be used here:
+ // * mw-editfont-default
+ // * mw-editfont-monospace
+ // * mw-editfont-sans-serif
+ // * mw-editfont-serif
+ $class = 'mw-editfont-' . $wgUser->getOption( 'editfont' );
+
+ if ( isset( $attribs['class'] ) ) {
+ if ( is_string( $attribs['class'] ) ) {
+ $attribs['class'] .= ' ' . $class;
+ } elseif ( is_array( $attribs['class'] ) ) {
+ $attribs['class'][] = $class;
+ }
+ } else {
+ $attribs['class'] = $class;
+ }
+
$pageLang = $this->mTitle->getPageLanguage();
$attribs['lang'] = $pageLang->getHtmlCode();
$attribs['dir'] = $pageLang->getDir();
}
if ( $newContent ) {
- ContentHandler::runLegacyHooks( 'EditPageGetDiffText', [ $this, &$newContent ] );
+ ContentHandler::runLegacyHooks( 'EditPageGetDiffText', [ $this, &$newContent ], '1.21' );
Hooks::run( 'EditPageGetDiffContent', [ $this, &$newContent ] );
$popts = ParserOptions::newFromUserAndLang( $wgUser, $wgContLang );
}
$hook_args = [ $this, &$content ];
- ContentHandler::runLegacyHooks( 'EditPageGetPreviewText', $hook_args );
+ ContentHandler::runLegacyHooks( 'EditPageGetPreviewText', $hook_args, '1.25' );
Hooks::run( 'EditPageGetPreviewContent', $hook_args );
$parserResult = $this->doPreviewParse( $content );
'name' => 'wpSave',
'tabindex' => ++$tabindex,
] + Linker::tooltipAndAccesskeyAttribs( 'save' );
- $buttons['save'] = Html::submitButton( $buttonLabel, $attribs, [ 'mw-ui-constructive' ] );
+ $buttons['save'] = Html::submitButton( $buttonLabel, $attribs, [ 'mw-ui-progressive' ] );
++$tabindex; // use the same for preview and live preview
$attribs = [