Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added arguments to functions #136

Merged
merged 3 commits into from Nov 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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