Incorrect Parameter in wp_trash_post action hook #1626
Labels
Content Review
developer documentation (DevHub)
Improvements or additions to developer documentation
[Status] To do
Issue marked as Todo
Issue Description
For wp_trash_post action hook, the parameter is currently showing as two (post_id and previous_status) but in core it has only one (post_id)
URL of the Page with the Issue
[(https://developer.wordpress.org/reference/hooks/wp_trash_post/#source)]
Section of Page with the issue
Parameters
Why is this a problem?
There is only one parameter in the core file, but in documentation it is showing as two.
Suggested Fix
Remove the second parameter previous_status.
`
Current Documentation
do_action( ‘wp_trash_post’, int $post_id, string $previous_status )
Core Code
do_action( 'wp_trash_post', $post_id );
`
The text was updated successfully, but these errors were encountered: