X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fckeditor%2Fsrc%2FPlugin%2FCKEditorPlugin%2FInternal.php;fp=web%2Fcore%2Fmodules%2Fckeditor%2Fsrc%2FPlugin%2FCKEditorPlugin%2FInternal.php;h=ec286a68ec91eac43b9614780e8a9be83fd89fb6;hp=9a04ce72a20a53a8edf621dbcb4184a2521909c3;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php b/web/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php index 9a04ce72a..ec286a68e 100644 --- a/web/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php +++ b/web/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php @@ -101,7 +101,8 @@ class Internal extends CKEditorPluginBase implements ContainerFactoryPluginInter public function getConfig(Editor $editor) { // Reasonable defaults that provide expected basic behavior. $config = [ - 'customConfig' => '', // Don't load CKEditor's config.js file. + // Don't load CKEditor's config.js file. + 'customConfig' => '', 'pasteFromWordPromptCleanup' => TRUE, 'resize_dir' => 'vertical', 'justifyClasses' => ['text-align-left', 'text-align-center', 'text-align-right', 'text-align-justify'], @@ -126,7 +127,7 @@ class Internal extends CKEditorPluginBase implements ContainerFactoryPluginInter * {@inheritdoc} */ public function getButtons() { - $button = function($name, $direction = 'ltr') { + $button = function ($name, $direction = 'ltr') { // In the markup below, we mostly use the name (which may include spaces), // but in one spot we use it as a CSS class, so strip spaces. // Note: this uses str_replace() instead of Html::cleanCssIdentifier() @@ -420,8 +421,8 @@ class Internal extends CKEditorPluginBase implements ContainerFactoryPluginInter } // Generate setting that accurately reflects allowed tags and attributes. else { - $get_attribute_values = function($attribute_values, $allowed_values) { - $values = array_keys(array_filter($attribute_values, function($value) use ($allowed_values) { + $get_attribute_values = function ($attribute_values, $allowed_values) { + $values = array_keys(array_filter($attribute_values, function ($value) use ($allowed_values) { if ($allowed_values) { return $value !== FALSE; } @@ -532,7 +533,7 @@ class Internal extends CKEditorPluginBase implements ContainerFactoryPluginInter // getConfig() method, and override the JavaScript at // Drupal.editors.ckeditor to somehow make validation of values for // attributes other than "class" and "style" work. - $allowed_attributes = array_filter($attributes, function($value) { + $allowed_attributes = array_filter($attributes, function ($value) { return $value !== FALSE; }); if (count($allowed_attributes)) { @@ -567,7 +568,7 @@ class Internal extends CKEditorPluginBase implements ContainerFactoryPluginInter // implies that all of its possible attribute values are disallowed, // thus we must look at the disallowed attribute values on allowed // attributes. - $disallowed_attributes = array_filter($attributes, function($value) { + $disallowed_attributes = array_filter($attributes, function ($value) { return $value === FALSE; }); if (count($disallowed_attributes)) {