Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #136 from dmtrpro/patch-1
Browse files Browse the repository at this point in the history
Added arguments to functions
  • Loading branch information
eko committed Nov 6, 2017
2 parents 4bd4d4f + 9d178df commit 4e5b1dd
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions Twig/Extension/ThemeExtension.php
Expand Up @@ -44,33 +44,42 @@ public function getFunctions()

/**
* Displays Wordpress theme header (and administration menu bar if available).
*
* @param string|null $name
*/
public function getHeader()
public function getHeader($name = null)
{
\get_header();
\get_header($name);

\_wp_admin_bar_init();
\wp_admin_bar_render();
}

/**
* Displays Wordpress theme sidebar.
*
* @param string|null $name
*/
public function getSidebar()
public function getSidebar($name = null)
{
\get_sidebar();
\get_sidebar($name);
}

/**
* Displays Wordpress theme footer.
*
* @param string|null $name
*/
public function getFooter()
public function getFooter($name = null)
{
\get_footer();
\get_footer($name);
}

/**
* Displays a Wordpress theme template part.
*
* @param string $slug
* @param string|null $name
*/
public function getTemplatePart($slug, $name = null)
{
Expand Down

0 comments on commit 4e5b1dd

Please sign in to comment.