Change default Controller path to app/controllers

This commit is contained in:
Darren Jacoby
2017-08-20 19:14:46 +02:00
parent 499f809c6e
commit dcbd5a7366
3 changed files with 0 additions and 0 deletions

10
app/controllers/About.php Normal file
View File

@@ -0,0 +1,10 @@
<?php
namespace App;
use Sober\Controller\Controller;
class About extends Controller
{
}

33
app/controllers/App.php Normal file
View File

@@ -0,0 +1,33 @@
<?php
namespace App;
use Sober\Controller\Controller;
class App extends Controller
{
public function siteName()
{
return get_bloginfo('name');
}
public static function title()
{
if (is_home()) {
if ($home = get_option('page_for_posts', true)) {
return get_the_title($home);
}
return __('Latest Posts', 'sage');
}
if (is_archive()) {
return get_the_archive_title();
}
if (is_search()) {
return sprintf(__('Search Results for %s', 'sage'), get_search_query());
}
if (is_404()) {
return __('Not Found', 'sage');
}
return get_the_title();
}
}

10
app/controllers/Home.php Normal file
View File

@@ -0,0 +1,10 @@
<?php
namespace App;
use Sober\Controller\Controller;
class Home extends Controller
{
}