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

Parent theme's action_template_header doesn't run when child is active #460

Closed
michaeltwofish opened this issue Feb 10, 2013 · 6 comments
Closed
Milestone

Comments

@michaeltwofish
Copy link
Contributor

Create a child theme with Wazi as the parent and no other files. When the child theme is active Wazi's action_template_header() should run the same as if Wazi was active but it does not. Other templates are included correctly.

@michaeltwofish
Copy link
Contributor Author

Looking at Plugins::register(), the template_header hook is never registered when the child theme is active.

@michaeltwofish
Copy link
Contributor Author

I suspect we need a Pluggable::load_hooks($parent_theme_class) or something similar around https://github.com/habari/system/blob/master/classes/themes.php#L339

@michaeltwofish
Copy link
Contributor Author

Or we just instantiate the parent, and the constructor will handle loading the hooks.

@michaeltwofish
Copy link
Contributor Author

Not a bug, it just didn't work how I expected it to work. Extending the parent theme in theme.php instead of Habari's Theme class causes the hooks to be registered.

@Konzertheld
Copy link
Member

I don't see how this is fixed or not a bug? The parent theme.php should run when there is no child theme.php, it does not, at least not action_template_header(). So a child theme.php is always required.

@Konzertheld Konzertheld reopened this Mar 28, 2014
@miklb
Copy link
Member

miklb commented Apr 27, 2014

The wiki clearly is documented as saying a parent theme's theme.php would run if none is present in the child theme. Definitely seems what the intended behavior was, so I'd say it's a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants