public function addSort($field = 'time_created', $direction = 'DESC', $priority = 500) {

		if (!$field || !$direction) {
			return $this;
		}

		while (isset($this->sorts[$priority])) {
			$priority++;
		}

		$field = sanitize_string($field);
		$direction = strtoupper(sanitize_string($direction));

		if (!in_array($direction, array('ASC', 'DESC'))) {
			$direction = self::DEFAULT_SORT_DIRECTION;
		}

		$this->removeSort($field);

		$this->sorts[$priority] = [
			'field' => $field,
			'direction' => $direction,
		];

		ksort($this->sorts);

		return $this;
	}