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

Incorrect Parameter in wp_trash_post action hook #1626

Open
mavinothkumar opened this issue Jul 5, 2024 · 1 comment
Open

Incorrect Parameter in wp_trash_post action hook #1626

mavinothkumar opened this issue Jul 5, 2024 · 1 comment
Labels
Content Review developer documentation (DevHub) Improvements or additions to developer documentation [Status] To do Issue marked as Todo

Comments

@mavinothkumar
Copy link

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 mavinothkumar added the [Status] To do Issue marked as Todo label Jul 5, 2024
Copy link

github-actions bot commented Jul 5, 2024

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

@Leonardus-Nugraha Leonardus-Nugraha added developer documentation (DevHub) Improvements or additions to developer documentation Content Review labels Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content Review developer documentation (DevHub) Improvements or additions to developer documentation [Status] To do Issue marked as Todo
2 participants