Loading src/Plugin/Block/AddToAnyBlock.php +8 −3 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ use Drupal\Core\Block\BlockBase; use Drupal\Core\Form\FormStateInterface; use Drupal\node\Entity\Node; use Drupal\node\NodeInterface; use Drupal\Core\Cache\Cache; /** * Provides an 'AddToAny share' block. Loading Loading @@ -54,9 +55,6 @@ class AddToAnyBlock extends BlockBase { '#universal_button_placement' => $data['universal_button_placement'], '#buttons_size' => $block_options['buttons_size'], '#theme' => 'addtoany_standard', '#cache' => [ 'contexts' => ['url'], ], ]; if ($is_node) { Loading Loading @@ -154,4 +152,11 @@ class AddToAnyBlock extends BlockBase { } } /** * {@inheritdoc} */ public function getCacheContexts() { return Cache::mergeContexts(parent::getCacheContexts(), ['url']); } } Loading
src/Plugin/Block/AddToAnyBlock.php +8 −3 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ use Drupal\Core\Block\BlockBase; use Drupal\Core\Form\FormStateInterface; use Drupal\node\Entity\Node; use Drupal\node\NodeInterface; use Drupal\Core\Cache\Cache; /** * Provides an 'AddToAny share' block. Loading Loading @@ -54,9 +55,6 @@ class AddToAnyBlock extends BlockBase { '#universal_button_placement' => $data['universal_button_placement'], '#buttons_size' => $block_options['buttons_size'], '#theme' => 'addtoany_standard', '#cache' => [ 'contexts' => ['url'], ], ]; if ($is_node) { Loading Loading @@ -154,4 +152,11 @@ class AddToAnyBlock extends BlockBase { } } /** * {@inheritdoc} */ public function getCacheContexts() { return Cache::mergeContexts(parent::getCacheContexts(), ['url']); } }