public static function count_by_author($id = 0, $status = 'approved') { $params = array('post_author' => $id, 'count' => 'id'); if (false !== $status) { $params['status'] = $status; } return self::get($params); }