/** * Returns the title and the titlelink of the next or previous article in single news article pagination as an array * Returns false if there is none (or option is empty) * * NOTE: This is not available if using the CombiNews feature * * @param string $option "prev" or "next" * * @return mixed */ function getNextPrevNews($option = '') { global $_zp_zenpage, $_zp_current_zenpage_news; if (func_num_args() != 1) { Zenpage_internal_deprecations::getNextPrevNews(); } if (!empty($option)) { switch ($option) { case "prev": $article = $_zp_current_zenpage_news->getPrevArticle(); if (!$article) { return false; } return array("link" => $article->getLink(), "title" => $article->getTitle()); case "next": $article = $_zp_current_zenpage_news->getNextArticle(); if (!$article) { return false; } return array("link" => $article->getLink(), "title" => $article->getTitle()); } } return false; }