_bbp_forum_query_usort_subforum_ids( int $a, int $b )
Callback to sort forum ID’s based on last active time
Description
Parameters
- $a
-
(Required) First forum ID to compare
- $b
-
(Required) Second forum ID to compare
Return
(Position) change based on sort
Source
File: bp-forums/forums/functions.php
function _bbp_forum_query_usort_subforum_ids( $a = 0, $b = 0 ) { $ta = get_post_meta( $a, '_bbp_last_active_time', true ); $tb = get_post_meta( $b, '_bbp_last_active_time', true ); return ( $ta < $tb ) ? -1 : 1; }
Changelog
Version | Description |
---|---|
bbPress (r3789) | 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.