WordPress / Documentation-Issue-Tracker

Issue Tracker for the WordPress Documentation team.
https://make.wordpress.org/docs/
Other
84 stars 41 forks source link

Common APIs Handbook / Hooks / Action Reference: second 'admin_menu' should be 'adminmenu' #1796

Open kitchin opened 2 weeks ago

kitchin commented 2 weeks ago

Issue Description

The hook 'admin_menu' is listed twice. The first instance is correct, while the second should be 'adminmenu'.

Luckily 'adminmenu' already has a page, https://developer.wordpress.org/reference/hooks/adminmenu/ .

URL of the Page with the Issue

https://developer.wordpress.org/apis/hooks/action-reference/

Section of Page with the issue

https://developer.wordpress.org/apis/hooks/action-reference/#actions-run-during-an-admin-page-request

Why is this a problem?

Here is the WP code flow: wp-admin/admin-header.php : do_action( 'admin_head' ); wp-admin/admin-header .php : require ABSPATH . 'wp-admin/menu-header.php'; wp-admin/menu-header.php : do_action( 'adminmenu' ); wp-admin/admin-header.php : do_action( 'in_admin_header' );

Suggested Fix

current:

<tr><td><a href="https://developer.wordpress.org/reference/hooks/admin_head/">admin_head</a></td><td></td></tr>
<tr><td><a href="https://developer.wordpress.org/reference/hooks/admin_menu/">admin_menu</a></td><td></td></tr>
<tr><td><a href="https://developer.wordpress.org/reference/hooks/in_admin_header/">in_admin_header</a></td><td></td></tr>

suggested fix:

<tr><td><a href="https://developer.wordpress.org/reference/hooks/admin_head/">admin_head</a></td><td></td></tr>
<tr><td><a href="https://developer.wordpress.org/reference/hooks/adminmenu/">adminmenu</a></td><td></td></tr>
<tr><td><a href="https://developer.wordpress.org/reference/hooks/in_admin_header/">in_admin_header</a></td><td></td></tr>
github-actions[bot] commented 2 weeks ago

Heads up @WordPress/docs-issues-coordinators, we have a new issue open. Time to use 'em labels.