Skip to content

Commit fdfb391

Browse files
committed
Views component: Annotations for new methods
1 parent 4b373ed commit fdfb391

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

framework/Theme.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ public function remove_assets_query_string( $src ) {
188188
return $src;
189189
}
190190

191+
/**
192+
* Init new Template Hierarchy based on "views" folder and load Views engine.
193+
*/
191194
public function init_views_templates() {
192195
Template_Hierarchy::instance();
193196
View::instance();

framework/Web/View.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ class View {
1111
use Singleton;
1212

1313
/**
14-
* Layouts call chain
14+
* Layouts call chain.
1515
*
1616
* @var array
1717
*/
1818
private $extends = array();
1919

2020
/**
21-
* Current page wordpress template
21+
* Theme template path to be loaded.
2222
*
2323
* @var string
2424
*/
@@ -31,7 +31,7 @@ class View {
3131
* Override WordPress's default template behavior.
3232
*/
3333
protected function __construct() {
34-
add_filter('template_include', array($this, 'init_template'), 999999);
34+
add_filter( 'template_include', array( $this, 'init_template' ), 999999 );
3535
}
3636

3737
/**
@@ -62,7 +62,7 @@ public function __toString() {
6262
}
6363

6464
/**
65-
* Start loading WordPress templates.
65+
* Start loading theme template.
6666
*/
6767
public function include_template() {
6868
// add alias.

0 commit comments

Comments
 (0)