public function fetch()
    {
        $this->throwIfContextInvalid();

        $this->reloadQueryAdapter();
        $results = $this->activeQuery->fetch();

        $this->resetCurrentQuery();

        if (!is_array($results) && get_class($results) === "WP_Error") {
            throw new Exception(json_encode($results));
        }

        return $this->wrapInEntities($results);
    }
public function fetch()
    {
        $this->throwIfContextInvalid();

        $this->reloadQueryAdapter();
        $results = $this->activeQuery->fetch();

        $this->resetCurrentQuery();

        if (!is_array($results) && get_class($results) === "WP_Error") {
            throw new Exception(json_encode($results));
        }

        return $this->wrapInEntities($results);
    }
public function fetch ( ) { $ this -> throwIfContextInvalid ( ) ; $ this -> reloadQueryAdapter ( ) ; $ results = $ this -> activeQuery -> fetch ( ) ; $ this -> resetCurrentQuery ( ) ; if ( ! is_array ( $ results ) && get_class ( $ results ) === "WP_Error" ) { throw new Exception ( json_encode ( $ results ) ) ; } return $ this -> wrapInEntities ( $ results ) ; }
Executes the query and resets it anew.
@return array posts
Executes the query and resets it anew .