pressbooks aldine theme the theme used for the front page or default book
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
725 B

7 years ago
<?php
namespace Aldine;
7 years ago
use Sober\Controller\Controller;
class FrontPage extends Controller
7 years ago
{
public function blockCount()
{
7 years ago
global $_wp_sidebars_widgets;
if (!empty($_wp_sidebars_widgets['front-page-block'])) {
return count($_wp_sidebars_widgets['front-page-block']);
7 years ago
}
return 1;
}
public function latestBooksTitle()
{
$title = get_option('pb_front_page_catalog_title');
if ($title) {
return $title;
}
return __('Our Latest Titles', 'aldine');
}
public function catalogData()
{
$page = (get_query_var('page')) ? get_query_var('page') : 1;
return App::catalogData($page, 3);
}
7 years ago
}