Closed abid76 closed 11 months ago
Thank you for your effort!
Please make sure to work according to the contribution guidelines: https://github.com/epiphyt/embed-privacy/blob/main/CONTRIBUTING.md
It lacks documentation as well as code style.
Also, I don’t think that this is the right area to check for such a functionality, since $content
is hardly filterable at all. This would only work in a very limited case and thus is not the preferred way for implementation in a broader way.
Thanks for your comment. Surely I can add documentation and conform to code style.
But first, I'd like to clarify how to actually solve the problem.
My need is to omit embed privacy under certain circumstances (currently when an ajax request is processed).
The proposed solution is not optimal and doesn't seem to work in all cases. Possible alternatives:
get_output_template
which controls if the method should be processed.the_content
hook which parses the html and removes all embed privacy html code (quite hard to implement).May 1. be a proper proposal? Do you have any other idea?
This filter hook makes it possible to have more control about when to enable an embed type.
E.g. you can check the post's content and active an embed if certain conditions are met.