Skip to content

Commit a9af503

Browse files
committed
add addHeaderContent to Template.php
1 parent 77f9a7c commit a9af503

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Theme.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ function addFooterContent($input) {
3636
}, 101 );
3737
}
3838

39+
function addHeaderContent($input) {
40+
if(is_subclass_of($input, '\cw\php\js\expression\AbstractExpression'))
41+
$input = new \cw\php\js\expression\Wrapper($input);
42+
43+
add_action( 'wp_head', function() use($input){
44+
echo $input;
45+
}, 101 );
46+
}
47+
3948
public function pageTemplate(){
4049
return get_query_template('page');
4150
}

0 commit comments

Comments
 (0)