The ugliness of this sort of code is probably part of why there's still a Linker::tooltip() function.
Please don't just replace it with worse code; if truly cleaning it up this should be done by giving a saner interface to the nav generation code
unset( $nav[$section][$key]['class'] );
}
if ( isset( $link['tooltiponly'] ) && $link['tooltiponly'] ) {
- $tooltip = Linker::titleAttrib( $xmlID );
- $tooltip = $tooltip === false ? '' : Xml::expandAttributes( array( 'title' => $tooltip ) );
- $nav[$section][$key]['key'] = $tooltip;
-
+ $nav[$section][$key]['key'] =
+ Linker::tooltip( $xmlID );
} else {
$nav[$section][$key]['key'] =
Xml::expandAttributes( Linker::tooltipAndAccesskeyAttribs( $xmlID ) );