Using weeblrAMP actions and filters
Over the course of generating each AMP pages, weeblrAMP offers many "hooks", actions and filters, that you can use to alter its operation. This lets you customize many parts of either internal data used, or generated output.
How to setup your filters and actions handlers
Hooks handler are usually enabled in two ways:
- using or inside a plugin
- in a
functions.php
file located at the root of your current theme
You should put your weeblrAMP filters and actions handlers in AMP-specific files. weeblrAMP will load them, only on AMP pages. Those files are loaded on ALL pages, both on frontend and admin. More specifically:
* {yourtheme}/weeblramp/functions.php is loaded first, and always
* {yourtheme}/weeblramp/functions_admin.php is loaded after functions.php, and only when in the admin
Filters and actions currently available in weeblrAMP are listed on this page.
Examples
We have gathered a few real-life filters examples, to get you started. Please find them on this page.