This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
BBP_Akismet::update_post_history( int $post_id, string $message = null, string $event = null )
Update a post’s Akismet history
Description
Parameters
- $post_id
-
(Required)
- $message
-
(Optional)
Default value: null
- $event
-
(Optional)
Default value: null
Source
File: bp-forums/extend/akismet.php
private function update_post_history( $post_id = 0, $message = null, $event = null ) { // Define local variable(s) $user = ''; // Get the current user $current_user = wp_get_current_user(); // Get the user's login name if possible if ( is_object( $current_user ) && isset( $current_user->user_login ) ) $user = $current_user->user_login; // Setup the event to be saved $event = array( 'time' => akismet_microtime(), 'message' => $message, 'event' => $event, 'user' => $user, ); // Save the event data add_post_meta( $post_id, '_bbp_akismet_history', $event ); }
Changelog
Version | Description |
---|---|
bbPress (r3308) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.