bbp_transition_post_status( string $new_status = '', string $old_status = '', WP_Post $post = false )
Add the bbPress-specific post status transition action
Description Description
Parameters Parameters
- $new_status
-
(Optional) New post status
Default value: ''
- $old_status
-
(Optional) Old post status
Default value: ''
- $post
-
(Optional) Post object
Default value: false
Source Source
File: includes/core/sub-actions.php
function bbp_transition_post_status( $new_status = '', $old_status = '', $post = false ) { // Get bbPress post types $post_type = get_post_type( $post ); $types = bbp_get_post_types(); // Bail if post is not a bbPress post type if ( ! in_array( $post_type, $types, true ) ) { return; } // Do the action do_action( 'bbp_transition_post_status', $new_status, $old_status, $post ); }
Changelog Changelog
Version | Description |
---|---|
2.6.0 | Introduced. |