示例#1
0
/**
 * Retrieves the reports collection authored by a specific user
 *
 * @param int $user_id The reporter user ID
 * @param array	$args (optional) WP_Comment_Query args to be used to fetch the report collection
 *
 * @return object The user authored reports collection
 */
function appthemes_get_user_authored_reports($user_id, $args = array())
{
    $args = array('user_id' => $user_id, 'meta_key' => '', 'meta_value' => '');
    return APP_Report_Factory::get_user_reports($user_id, $args);
}
示例#2
0
 /**
  * Retrieve the post reports collection
  *
  * @param type $args (optional) WP_Query args to be used to fetch the report collection
  *
  * @return array The reports collection
  */
 protected function get_reports($args = array())
 {
     $defaults = array('post_id' => $this->post_id);
     $args = wp_parse_args($args, $defaults);
     return APP_Report_Factory::get_reports($args);
 }