I’m looking for a filter that provides the full page generated in WordPress – including the head section with meta tags, body, styling and dynamic content. the_content() and the_excerpt() do work only for the dynamic part and the request filter seems to work only for SQL queries (or not)?
I would like to filter some data in the entire page in all links or buttons. How can I do this?
You can use output buffering to accomplish this.
Add a high priority hook directly before the template is rendered:
Add a shutdown hook with an extremely low priority.
Inside your callback, you manipulate the rendered HTML.
You may download this as a plugin here: http://3-3.me/B9lK
Slight change to @BrianFegter’s code so the output buffer is closed only if it was opened. This has the benefit of being able to conditionally decide whether to filter or not.
You can use HTTP API to get the content of the post URL.