Menu system docs section gives wrong alter hook

Created on 17 July 2024, 3 months ago
Updated 20 August 2024, about 2 months ago

Problem/Motivation

In core/lib/Drupal/Core/Menu/menu.api.php:

 * Local tasks from other modules can be altered using
 * hook_menu_local_tasks_alter().

This is wrong. hook_menu_local_tasks_alter() is for altering tasks pre-render. It's called at display time, not during discovery.

The discovery alter hook is hook_local_tasks_alter().

Steps to reproduce

Proposed resolution

Fix the docs.

Add a mention of hook_menu_local_tasks_alter(), to say this alters local tasks displayed on the page before they are rendered.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

๐Ÿ› Bug report
Status

Fixed

Version

10.4 โœจ

Component
Documentationย  โ†’

Last updated about 14 hours ago

No maintainer
Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom joachim

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024