Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Add hooks to inject own code by using a childtheme or a plugin #31

Closed
PixelbarEupen opened this issue Apr 16, 2014 · 6 comments
Closed

Comments

@PixelbarEupen
Copy link
Contributor

First of all: great work! its a very nice and clean theme that fits almost all my needs.

I have just a little suggestion:
I am writing a complete childtheme and several plugins to use them with foundationpress. It would be great to add several hooks (do_action) to some places (at the beginning and the end of the main layout, before and after opening/closing tags in the template files etc.)

With the hooks, it would be possible to inject own code without "hacking into" your theme and losing the ability to upgrade it.

If you need some helping hands, let me know :-)

Thanks for your reply

Adrian

@olefredrik
Copy link
Owner

Hello Adrian.

Thank you for the nice words! It sounds like a good idea to add more hooks, if it makes things easier for child-theme users. Are there any negative side effects by adding more hooks in the template files? If you have the time and opportunity to do something about this, feel free to open a pull request. I'll definitely look into it. :-)

Cheers!
Ole Fredrik

@PixelbarEupen
Copy link
Contributor Author

Hello Ole,

nice! I can't see any disadvantages or negative side effects of using own hooks. They just make the theme plugin and childtheme friendly :-)
I will definitely do something about this.

Adrian

@manwithacat
Copy link
Contributor

I was about to start adding in some custom theme functions [and it's great that there are already loads of do_action() statements available] when I noticed this plugin:

Easy Foundation Shortcodes

It works really well with FoundationPress [disable the plugin JS/CSS and use the theme versions].

@PixelbarEupen
Copy link
Contributor Author

It seems that there are only do_action hook statements coming from the Wordpress Core. I just grepped for do_action in this foundationpress theme and just found one in the comments.php

It might be right that your easy foundation shortcodes plugin works as it should but I try to avoid using 3th-party plugins.

@olefredrik
Copy link
Owner

e0e9f8a

@violacase
Copy link
Contributor

I'd like to see a webpage with an overview of the actual hooks implemented in FP. I'm scanning php files now to get an idea. Not so user friendly.

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

No branches or pull requests

4 participants