-
Notifications
You must be signed in to change notification settings - Fork 140
/
index.php
37 lines (32 loc) · 978 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
namespace Tonik\Theme\Index;
/*
|------------------------------------------------------------------
| Index Controller
|------------------------------------------------------------------
|
| Think about theme template files as some sort of controllers
| from MVC design pattern. They should link application
| logic with your theme view templates files.
|
*/
use function Tonik\Theme\App\template;
/**
* Renders index page header.
*
* @see resources/templates/index.tpl.php
*/
function render_header()
{
template('partials/header', [
'title' => __('Tonik — WordPress Starter Theme'),
'lead' => __('Tonik is a WordPress Starter Theme which aims to modernize, organize and enhance some aspects of WordPress theme development. Take a look at what is waiting for you.'),
]);
}
add_action('theme/index/header', 'Tonik\Theme\Index\render_header');
/**
* Renders index page.
*
* @see resources/templates/index.tpl.php
*/
template('index');