-
Notifications
You must be signed in to change notification settings - Fork 44
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 new entry content and while hooks #41
Conversation
Wouldn't |
Filtering the content comes with its own set of issues because it's used by plugins to do all kinds of things. It's also a little weird to isolate I'm not opposed to an endwhile before hook, but if we go that route it might make more sense to change it from |
I think having a Can you not check things like |
The primary use case for having a content hook would be hooking and unhooking the entire content area conditionally. Basically you'd hook any markup for I suppose technically can do this by filtering I'm kind of thinking out loud here, so if any of this sounds ridiculous or you have an idea of how to do it without filter gymnastics I'd love to hear it. |
If you wanted to conditionally remove the content or override it with another value based on its location, you could do that with the filter by conditionally returning the content or an empty string. In terms of where you hook in, that would likely just require some testing on what to set the filter priority on the content filter, right? You could hook into the new I just noticed that if you're hooking Perhaps I'm missing something, which is entirely possible - let me know if I'm just not seeing it. |
In the example it would cause a double entry if the content were hooked, but I wasn't sure how to handle that since probably not all theme authors would want to hook Once that was in place, it should be safe to then hook |
Awesome! Yea, I think the |
One last thing... what do you think we should do about the before/after I think after |
Yea, I would just use the |
Also updated after endwhile to after while to remain consistent
I like this approach. |
Added new entry content and while hooks
🎉 |
This fixes #40