From 5850e2d6fc5aa4057775a65536a0c9248a8d2574 Mon Sep 17 00:00:00 2001 From: dmtrpro <32617371+dmtrpro@users.noreply.github.com> Date: Mon, 9 Oct 2017 13:31:38 +0300 Subject: [PATCH] Added arguments to functions Added functionality to get custom headers, footers and sidebars. --- Twig/Extension/ThemeExtension.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Twig/Extension/ThemeExtension.php b/Twig/Extension/ThemeExtension.php index f246ea1..70f8c7d 100644 --- a/Twig/Extension/ThemeExtension.php +++ b/Twig/Extension/ThemeExtension.php @@ -45,9 +45,9 @@ public function getFunctions() /** * Displays Wordpress theme header (and administration menu bar if available). */ - public function getHeader() + public function getHeader($name = null) { - \get_header(); + \get_header($name); \_wp_admin_bar_init(); \wp_admin_bar_render(); @@ -56,17 +56,17 @@ public function getHeader() /** * Displays Wordpress theme sidebar. */ - public function getSidebar() + public function getSidebar($name = null) { - \get_sidebar(); + \get_sidebar($name); } /** * Displays Wordpress theme footer. */ - public function getFooter() + public function getFooter($name = null) { - \get_footer(); + \get_footer($name); } /**