Open kitchin opened 2 weeks ago
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/ .
https://developer.wordpress.org/apis/hooks/action-reference/
https://developer.wordpress.org/apis/hooks/action-reference/#actions-run-during-an-admin-page-request
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' );
do_action( 'admin_head' );
require ABSPATH . 'wp-admin/menu-header.php';
do_action( 'adminmenu' );
do_action( 'in_admin_header' );
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>
Heads up @WordPress/docs-issues-coordinators, we have a new issue open. Time to use 'em labels.
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:
suggested fix: