Addshore has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/364785 )
Change subject: Factor out getEditFontClass in EditPage ...................................................................... Factor out getEditFontClass in EditPage Change-Id: I27d868437035ab4b77899dce4984eeb29361017c See: I25513f17f340a3fe79eede37b07c86874d4fbc35 --- M includes/EditPage.php 1 file changed, 17 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/85/364785/1 diff --git a/includes/EditPage.php b/includes/EditPage.php index 6be8771..1b97d7f 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -4727,12 +4727,7 @@ 'style' => '' ]; - // The following classes can be used here: - // * mw-editfont-default - // * mw-editfont-monospace - // * mw-editfont-sans-serif - // * mw-editfont-serif - $class = 'mw-editfont-' . $user->getOption( 'editfont' ); + $class = $this->getEditFontClass( $user ); if ( isset( $attribs['class'] ) ) { if ( is_string( $attribs['class'] ) ) { @@ -4752,6 +4747,22 @@ } /** + * @since 1.30 + * + * @param User $user + * + * @return string + * The following classes can be used here: + * * mw-editfont-default + * * mw-editfont-monospace + * * mw-editfont-sans-serif + * * mw-editfont-serif + */ + protected function getEditFontClass( User $user ) { + return 'mw-editfont-' . $user->getOption( 'editfont' ); + } + + /** * @param string $wikitext * @return string * @since 1.29 -- To view, visit https://gerrit.wikimedia.org/r/364785 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I27d868437035ab4b77899dce4984eeb29361017c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Addshore <addshorew...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits