edit_post_status
Filters the value of a specific post field to edit.
- edit_post_author
- edit_post_date
- edit_post_date_gmt
- edit_post_content
- edit_post_title
- edit_post_excerpt
- edit_post_status
- edit_post_password
- edit_post_name
- edit_post_modified
- edit_post_modified_gmt
- edit_post_content_filtered
- edit_post_parent
- edit_post_type
- edit_post_mime_type
This is one of the variants of the dynamic hook edit_(field)
Usage
add_filter( 'edit_post_status', 'wp_kama_edit_post_status_filter', 10, 2 ); /** * Function for `edit_post_status` filter-hook. * * @param mixed $value Value of the post field. * @param int $post_id Post ID. * * @return mixed */ function wp_kama_edit_post_status_filter( $value, $post_id ){ // filter... return $value; }
- $value(mixed)
- Value of the post field.
- $post_id(int)
- Post ID.
Changelog
Since 2.3.0 | Introduced. |
Where the hook is called
edit_post_status
wp-includes/post.php 2924
$value = apply_filters( "edit_{$field}", $value, $post_id );