1) ? get_query_var('page') - 1 : 0; } public function nextPage() { return (get_query_var('page', 1) < FrontPage::totalPages()) ? get_query_var('page', 1) + 1 : 0; } public function latestBooksTitle() { $title = get_option('pb_front_page_catalog_title'); if ($title) { return $title; } return __('Our Latest Titles', 'aldine'); } public static function latestBooks($page = 1, $per_page = 3) { $books = wp_remote_get(network_home_url("/wp-json/pressbooks/v2/books?per_page=$per_page&page=$page")); $books = json_decode($books['body'], true); return $books; } }