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
774 B
34 lines
774 B
8 years ago
|
<?php
|
||
|
|
||
|
namespace App;
|
||
|
|
||
|
use Sober\Controller\Controller;
|
||
|
|
||
|
class App extends Controller
|
||
|
{
|
||
|
public function siteName()
|
||
|
{
|
||
|
return get_bloginfo('name');
|
||
|
}
|
||
7 years ago
|
|
||
|
public static function title()
|
||
|
{
|
||
|
if (is_home()) {
|
||
|
if ($home = get_option('page_for_posts', true)) {
|
||
|
return get_the_title($home);
|
||
|
}
|
||
|
return __('Latest Posts', 'pressbooks-aldine');
|
||
|
}
|
||
|
if (is_archive()) {
|
||
|
return get_the_archive_title();
|
||
|
}
|
||
|
if (is_search()) {
|
||
|
return sprintf(__('Search Results for %s', 'pressbooks-aldine'), get_search_query());
|
||
|
}
|
||
|
if (is_404()) {
|
||
|
return __('Not Found', 'pressbooks-aldine');
|
||
|
}
|
||
|
return get_the_title();
|
||
|
}
|
||
8 years ago
|
}
|