As we evolve the skin architecture, we are trying to reduce the amount of functions that skins can extend to reduce the possibility of divergence in HTML marks. Currently subtitles use inconsistent markup meaning extensions have to make use of skinStyles/Scripts to target them in different skins. See also T253813. We thus plan to remove this function.
- In SkinTemplate Skin::subPageSubtitle is called inside SkinTemplate::prepareSubtitle and provided via the Template variable subtitle
- In the new SkinMustache this is provided as the template variable html-subtitle
Core code provides subtitle inside a span element with class "subpages":
https://gerrit.wikimedia.org/g/mediawiki/core/ /27076b5e34b2b3302fbfb64da9dbeb3101a89b4a/includes/skins/SkinTemplate.php#194
Despite this Nostalgia uses the method directly
$subpages = $skin->subPageSubtitle(); 494 $sub .= !empty( $subpages ) ? "</p><p class='subpages'>$subpages" : ''; 495 $s = "<p class='subtitle'>{$sub}</p>\n";
CologneBlue also uses this directly:
<?php 352 if ( $this->getSkin()->subPageSubtitle() ) { 353 ?> 354 <p class="subpages"><?php echo $this->getSkin()->subPageSubtitle() ?></p> 355 <?php 356 }
Acceptance criteria
- Update CologneBlue to use the value of subtitle directly includes/CologneBlueTemplate.php#352
- Make SkinTemplate::prepareSubtitle a public method
- Update VisualEditor to call prepareSubtitle includes/ApiVisualEditorEdit.php#433
- Update Nostalgia
- Mark the Skin::subPageSubtitle method as deprecated and move its content to a private Skin method.