Incorrect Code Example in admin_action_{action} Hook Documentation #1802
Labels
developer documentation (DevHub)
Improvements or additions to developer documentation
[Status] To do
Issue marked as Todo
Issue Description
The code example provided in the
admin_action_{action}
hook documentation does not match the actual implementation found in the WordPress core files.URL of the Page with the Issue
https://developer.wordpress.org/reference/hooks/admin_action__requestaction
Section of Page with the issue
https://developer.wordpress.org/reference/hooks/admin_action__requestaction/#source
Why is this a problem?
The inaccurate code example can mislead developers into implementing the hook incorrectly, potentially causing issues in their WordPress sites or plugins. Clear and accurate examples are essential for helping developers understand how to use hooks properly.
Suggested Fix
Replace the current code example with the accurate implementation as found in
wp-admin/admin.php
between lines 408-420. Below is the correct code:The text was updated successfully, but these errors were encountered: