X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fthemes%2Fseven%2Fseven.theme;fp=web%2Fcore%2Fthemes%2Fseven%2Fseven.theme;h=2ad947c80b86694b4ab7b34ba81f14523ae41864;hp=7d4a525f040b9b5f32789b6583b16fde03191412;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/themes/seven/seven.theme b/web/core/themes/seven/seven.theme index 7d4a525f0..2ad947c80 100644 --- a/web/core/themes/seven/seven.theme +++ b/web/core/themes/seven/seven.theme @@ -6,7 +6,6 @@ */ use Drupal\Core\Form\FormStateInterface; -use Drupal\media\MediaForm; /** * Implements hook_preprocess_HOOK() for HTML document templates. @@ -168,14 +167,9 @@ function seven_form_node_form_alter(&$form, FormStateInterface $form_state) { * Implements hook_form_BASE_FORM_ID_alter() for \Drupal\media\MediaForm. */ function seven_form_media_form_alter(&$form, FormStateInterface $form_state) { - $media_is_enabled = \Drupal::moduleHandler()->moduleExists('media'); - // Only attach CSS from core if this form comes from Media core, and not from - // the contrib Media Entity 1.x branch. - if ($media_is_enabled && $form_state->getFormObject() instanceof MediaForm) { - // @todo Revisit after https://www.drupal.org/node/2892304 is in. It - // introduces a footer region to these forms which will allow for us to - // display a top border over the published checkbox by defining a - // media-edit-form.html.twig template the same way node does. - $form['#attached']['library'][] = 'seven/media-form'; - } + // @todo Revisit after https://www.drupal.org/node/2892304 is in. It + // introduces a footer region to these forms which will allow for us to + // display a top border over the published checkbox by defining a + // media-edit-form.html.twig template the same way node does. + $form['#attached']['library'][] = 'seven/media-form'; }