Merge "Only enable VisualDiff on VE-supported content models"

This commit is contained in:
jenkins-bot 2017-07-18 22:35:26 +00:00 committed by Gerrit Code Review
commit 400e207e5a

View file

@ -92,6 +92,11 @@ class VisualEditorHooks {
return;
}
$veConfig = ConfigFactory::getDefaultInstance()->makeConfig( 'visualeditor' );
if ( !ApiVisualEditor::isAllowedContentType( $veConfig, $diff->getTitle()->getContentModel() ) ) {
return;
}
$output->addModuleStyles( [
'ext.visualEditor.diffPage.init.styles',
'oojs-ui.styles.icons-alerts',