Documentation-Issue-Tracker icon indicating copy to clipboard operation
Documentation-Issue-Tracker copied to clipboard

[DevHub] Incorrect Parameter in wp_trash_post action hook

Open mavinothkumar opened this issue 1 year ago • 1 comments

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 ); `

mavinothkumar avatar Jul 05 '24 14:07 mavinothkumar

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

github-actions[bot] avatar Jul 05 '24 14:07 github-actions[bot]