-
Notifications
You must be signed in to change notification settings - Fork 5
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
Automate Locating Hooks #24
Comments
re Header Right, of there's no widget, then the hook does not fire, so it doesn't make sense to show it artificially. The same would likely apply if there are no footer widgets too. There are some filters that are not prefixed with
There are two action hooks which are not prefixed with
|
I'm of two minds regarding displaying hooks where nothing is to be displayed (e.g.
Currently PR #25, duplicates the current behavior of always showing the
This issue and PR focus on actions, see #27 for more discussion on filters. |
But, unless one either actually adds a widget, or makes use of the action hook in some other way (therefore, one already knows about it), one can't make use of it. |
The scenario I'm imagining is.
While this may be a small benefit, I don't see a downside to displaying it. @GaryJones, are you concerned displaying that area may throw off the layout of some sites? |
👍 |
This is a great conversation, and a great idea. Also, though the lost of the description is lost, this could easily be added back through js references to each the hooks generated. I also do agree with the header right hook. Going to play with this idea this weekend, with auto generated, and hooks that are conditionally shown as per some requirement. Thanks for all this! |
It appears Genesis has code to skip the genesis_header_right action if no widgets appear in this widget area. In which case, the hook does not display. To avoid this problem, we are hooking into genesis_header_right and displaying nothing (i.e. an empty string ''). Even though we're displaying an empty string, this is enough to allow the genesis_header_right action to occur. I've not spotted any other actions that behave in this manner but if there are, we'll need to add them manually, as well. Specifically, neither the Primary nor Secondary sidebar show this behavior. See #25 See #24
This is now merged into the develop branch. Going to be doing some testing and readying a release with this, so again thank you very much. |
In the Genesis slack genesiswp.slack.com there was a recent discussion about how awesome this plugin is.
It was however pointed out that some of the newer hooks are not included (e.g. #19).
During this conversation, @GaryJones pointed out
Thinking this was a good idea, we came up with a proof of concept
It is worth noting this technique does drop the hook description currently included in the
title
attribute, however I'd like to vote that this tradeoff is worthwhile.The text was updated successfully, but these errors were encountered: