Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kitchin opened this issue Nov 4, 2024 · 1 comment
Labels
[Status] To do Issue marked as Todo

Comments

@kitchin
Copy link

kitchin commented Nov 4, 2024

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>
@kitchin kitchin added the [Status] To do Issue marked as Todo label Nov 4, 2024
Copy link

github-actions bot commented Nov 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] To do Issue marked as Todo
Projects
None yet
Development

No branches or pull requests

1 participant