File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,11 @@ function has_content($key) {
5
5
return isset ($ content [$ key ]);
6
6
}
7
7
8
- function yield ($ key , $ echo = true ) {
8
+ function yield ($ key = ' default ' , $ echo = true ) {
9
9
global $ content ;
10
-
10
+
11
11
$ out = has_content ($ key ) ? $ content [$ key ] : '' ;
12
-
12
+
13
13
if ($ echo ) {
14
14
echo $ out ;
15
15
} else {
@@ -20,7 +20,7 @@ function yield($key, $echo = true) {
20
20
function javascripts () {
21
21
global $ content ;
22
22
if (!isset ($ content ['javascripts ' ])) $ content ['javascripts ' ] = '' ;
23
-
23
+
24
24
$ args = func_get_args ();
25
25
foreach ($ args as $ script ) {
26
26
if (substr ($ script , 0 , 7 ) != 'http:// ' ) {
@@ -33,7 +33,7 @@ function javascripts() {
33
33
function stylesheets () {
34
34
global $ content ;
35
35
if (!isset ($ content ['stylesheets ' ])) $ content ['stylesheets ' ] = '' ;
36
-
36
+
37
37
$ args = func_get_args ();
38
38
foreach ($ args as $ style ) {
39
39
if (substr ($ style , 0 , 7 ) != 'http:// ' ) {
Original file line number Diff line number Diff line change 22
22
23
23
</header>
24
24
<div role="main">
25
-
25
+ <?php yield (); ?>
26
26
</div>
27
27
<footer>
28
28
You can’t perform that action at this time.
0 commit comments