Changeset 6607 for trunk/src/includes/forums/capabilities.php
- Timestamp:
- 07/02/2017 04:39:49 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/forums/capabilities.php
r6573 r6607 219 219 220 220 /** 221 * Get array of forum IDs that a user can moderate222 *223 * @since 2.6.0 bbPress (r5834)224 *225 * @param int $user_id User id.226 *227 * @return boolean|array Return false on error or empty, or array of forum ids228 */229 function bbp_get_moderator_forum_ids( $user_id = 0 ) {230 $user_id = bbp_get_user_id( $user_id );231 $forums = new WP_Query( array(232 'fields' => 'ids',233 'post_type' => bbp_get_forum_post_type(),234 'nopaging' => true,235 'no_found_rows' => true,236 'meta_query' => array( array(237 'key' => '_bbp_moderator_id',238 'value' => $user_id,239 'compare' => 'NUMERIC'240 ) )241 ) );242 243 // Filter & return244 return (array) apply_filters( 'bbp_get_moderator_forum_ids', $forums->posts, $user_id, $forums );245 }246 247 /**248 221 * Can a user moderate a forum? 249 222 *
Note: See TracChangeset
for help on using the changeset viewer.