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 1 commit
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
12 changes: 6 additions & 6 deletions Twig/Extension/ThemeExtension.php
Expand Up @@ -45,9 +45,9 @@ public function getFunctions()
/**
* Displays Wordpress theme header (and administration menu bar if available).
*/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, could you also update PHPdoc on methods your updated please? Just to add the new argument:

      * @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();
Expand All @@ -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);
}

/**
Expand Down