Skip to content

Incorrect Parameter in wp_trash_post action hook #1626

Open

Description

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions