protected function loadAdjacentPost($direction = null)
    {
        $loadPrev = $loadNext = false;
        switch ($direction) {
            case 'prev':
                $loadPrev = true;
                break;
            case 'next':
                $loadNext = true;
                break;
            default:
                $loadPrev = $loadNext = true;
                break;
        }
        if ($loadPrev && !$this->prevPost) {
            $this->prevPost = $this->getAdjacentPost('prev', $this->get('post_type'));
        }
        if ($loadNext && !$this->nextPost) {
            $this->nextPost = $this->getAdjacentPost('next', $this->get('post_type'));
        }
    }
protected function loadAdjacentPost($direction = null)
    {
        $loadPrev = $loadNext = false;
        switch ($direction) {
            case 'prev':
                $loadPrev = true;
                break;
            case 'next':
                $loadNext = true;
                break;
            default:
                $loadPrev = $loadNext = true;
                break;
        }
        if ($loadPrev && !$this->prevPost) {
            $this->prevPost = $this->getAdjacentPost('prev', $this->get('post_type'));
        }
        if ($loadNext && !$this->nextPost) {
            $this->nextPost = $this->getAdjacentPost('next', $this->get('post_type'));
        }
    }
protected function loadAdjacentPost ( $ direction = null ) { $ loadPrev = $ loadNext = false ; switch ( $ direction ) { case 'prev' : $ loadPrev = true ; break ; case 'next' : $ loadNext = true ; break ; default : $ loadPrev = $ loadNext = true ; break ; } if ( $ loadPrev && ! $ this -> prevPost ) { $ this -> prevPost = $ this -> getAdjacentPost ( 'prev' , $ this -> get ( 'post_type' ) ) ; } if ( $ loadNext && ! $ this -> nextPost ) { $ this -> nextPost = $ this -> getAdjacentPost ( 'next' , $ this -> get ( 'post_type' ) ) ; } }
Loads the adjacent posts

@access public
@param string $direction (default: null)
@return void
Loads the adjacent posts