bbp_get_stickies( int $forum_id )
Return sticky topics of a forum
Description
Parameters
- $forum_id
-
(Optional) If not passed, super stickies are returned.
Return
(array) IDs of sticky topics of a forum or super stickies
Source
File: bp-forums/topics/functions.php
function bbp_get_stickies( $forum_id = 0 ) { $stickies = empty( $forum_id ) ? bbp_get_super_stickies() : get_post_meta( $forum_id, '_bbp_sticky_topics', true ); $stickies = ( empty( $stickies ) || !is_array( $stickies ) ) ? array() : $stickies; return apply_filters( 'bbp_get_stickies', $stickies, (int) $forum_id ); }
Changelog
Version | Description |
---|---|
bbPress (r2592) | 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.