Comment: | Remove extra inline <script> exposing $wgDraftsStyleVersion to JS; the JS doesn't use it.
Note -- if it's necessary later, it would be cleaner to add it to the global JS vars with another hook, so we don't have to build another <script> around it:
// Add $wgDraftsStyleVersion to page JS vars
$wgHooks['MakeGlobalVariablesScript'][] = 'DraftHooks::addStyleVersion';
...
/**
* MakeGlobalVariablesScript hook
* Add $wgDraftsStyleVersion to JS page vars
*/
public static function addStyleVersion( &$vars ) {
global $wgDraftsStyleVersion;
$vars['wgDraftsStyleVersion'] = $wgDraftsStyleVersion;
return true;
} |