function announcements_feed_toolbar_alter

Same name and namespace in other branches
  1. 10 core/modules/announcements_feed/announcements_feed.module \announcements_feed_toolbar_alter()

Implements hook_toolbar_alter().


core/modules/announcements_feed/announcements_feed.module, line 74


function announcements_feed_toolbar_alter(&$items) {
    // As the "Announcements" link is shown already in the top toolbar bar, we
    // don't need it again in the administration menu tray, so hide it.
    if (!empty($items['administration']['tray'])) {
        $callable = function (array $element) {
            return $element;
        $items['administration']['tray']['toolbar_administration']['#pre_render'][] = $callable;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.