Filter is a type of Hook. WordPress provides so called Hooks to developers to access certain points of the program without actually editing the core code. You can “Hook” your own function to a filter. Your function will recieve a number of parameters (usually one), which are defined by the filter. You can do whatever you want to these parameters. After modifying the parameter you can return that value and the next hook to that filter will recieve it with your modification.
A good example is “the_content” filter, which passes one parameter: the content. It’s run on every post,page, custom post type content in WordPress. If you want to print something before/after the content then you should use the “the_content” filter.
- Ajax Search Pro for WordPress 4.15 to 4.16.2 developer notes - July 1, 2019
- 10 000 - October 30, 2018
- Ajax Search Pro for WordPress 4.13.2 to 4.14.1 developer notes - October 9, 2018