44 if ( strval( $wikitext ) !==
'' ) {
61 if ( $classes === [] ) {
65 return Sanitizer::mergeAttributes(
67 [
'class' => implode(
' ', $classes ) ]
77 if (
$title->isProtected(
'edit' ) &&
79 ->getNamespaceRestrictionLevels(
$title->getNamespace() ) !== [
'' ]
81 # Is the title semi-protected?
82 if (
$title->isSemiProtected() ) {
83 $classes[] =
'mw-textarea-sprotected';
85 # Then it must be protected based on static groups (regular)
86 $classes[] =
'mw-textarea-protected';
88 # Is the title cascade-protected?
89 if (
$title->isCascadeProtected() ) {
90 $classes[] =
'mw-textarea-cprotected';
105 $attribs = $customAttribs + [
119 $class =
'mw-editfont-' . $user->
getOption(
'editfont' );
121 if ( isset( $attribs[
'class'] ) ) {
122 if ( is_string( $attribs[
'class'] ) ) {
123 $attribs[
'class'] .=
' ' . $class;
124 } elseif ( is_array( $attribs[
'class'] ) ) {
125 $attribs[
'class'][] = $class;
128 $attribs[
'class'] = $class;
131 $pageLang =
$title->getPageLanguage();
132 $attribs[
'lang'] = $pageLang->getHtmlCode();
133 $attribs[
'dir'] = $pageLang->getDir();