From 1d5196428e570856c26e0b8e7a75dee84f09f9cb Mon Sep 17 00:00:00 2001 From: Jess Snyder <19757-jesss@users.noreply.drupalcode.org> Date: Fri, 31 Jan 2025 19:36:40 +0000 Subject: [PATCH] Fix defaults for Display Title field in ManagedAdBlock. --- src/Plugin/Block/ManagedAdBlock.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Plugin/Block/ManagedAdBlock.php b/src/Plugin/Block/ManagedAdBlock.php index b042484..6c6a39a 100644 --- a/src/Plugin/Block/ManagedAdBlock.php +++ b/src/Plugin/Block/ManagedAdBlock.php @@ -65,6 +65,7 @@ class ManagedAdBlock extends BlockBase implements AdBlockInterface, ContainerFac */ public function defaultConfiguration() { return [ + 'label_display' => FALSE, 'ad_slot' => '', 'ad_format' => 'responsive', 'ad_width' => '', @@ -118,9 +119,7 @@ class ManagedAdBlock extends BlockBase implements AdBlockInterface, ContainerFac * {@inheritdoc} */ public function blockForm($form, FormStateInterface $form_state) { - // Hide block title by default. - $form['label_display']['#default_value'] = FALSE; - + $link = Link::fromTextAndUrl($this->t('Google AdSense account page'), Url::fromUri('https://www.google.com/adsense/app#main/myads-springboard'))->toString(); $ad_list = []; -- GitLab