Skip to content

Instantly share code, notes, and snippets.

@billerickson
Last active December 22, 2015 22:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save billerickson/6542831 to your computer and use it in GitHub Desktop.
Save billerickson/6542831 to your computer and use it in GitHub Desktop.
<?php
// Grab Authorized Users
$admins = new WP_User_Query( array( 'role' => 'bbp_keymaster', 'fields' => 'ID' ) );
$moderators = new WP_User_Query( array( 'role' => 'bbp_moderator', 'fields' => 'ID' ) );
$users = array_merge( $admins->results, $moderators->results );
// Build the bbPress query
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment