bbp_unspam_topic_tags( int $topic_id )
Retrieve tags to a topic from post meta before it’s unmarked as spam so they.
Description Description
Usually you’ll want to do this before the topic itself is unmarked as spam.
Parameters Parameters
- $topic_id
-
(Required)
Source Source
File: includes/topics/functions.php
function bbp_unspam_topic_tags( $topic_id = 0 ) { // Validation $topic_id = bbp_get_topic_id( $topic_id ); // Get pre-spam topic tags $terms = get_post_meta( $topic_id, '_bbp_spam_topic_tags', true ); // Delete pre-spam topic tag meta if ( ! empty( $terms ) ) { delete_post_meta( $topic_id, '_bbp_spam_topic_tags' ); } return array( bbp_get_topic_tag_tax_id() => $terms ); }
Changelog Changelog
Version | Description |
---|---|
2.6.0 | Introduced. |