Skip to content

Commit ecf5027

Browse files
committed
remove types from addMacro, registerCustomTemplate fix
1 parent 9e4357d commit ecf5027

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/NetteLatteEngine.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public static function addFilter(string $tag, callable $callback): void
103103
/**
104104
* Adds macro to Latte
105105
*/
106-
public static function addMacro(string $tag, string $start, string $end = null): void
106+
public static function addMacro($tag, $start, $end = null): void
107107
{
108108
self::getInstance()->set->addMacro($tag, $start, $end);
109109
}
@@ -143,6 +143,10 @@ public function registerCustomTemplates(array $page_templates, \WP_Theme $theme,
143143
'postType' => 'Template Post Type',
144144
]);
145145

146+
if (!$headers) {
147+
continue;
148+
}
149+
146150
if (!$headers['templateName']) {
147151
continue;
148152
}

0 commit comments

Comments
 (0)