The question is: Is it possible to hook with apply_filters or
add_filters on their function, manipulate it adding HTML to that page?
apply_filters
and add_filter()
do two separate things. apply_filters
allows a value to be filtered by add_filter()
. This means that if the original code is 3rd-party, you can only use add_filter()
if that code already has apply_filters()
applied to it. If you’re extending another plugin, you will be using add_filter()
, not apply_filters()
.
So you need to check if the original checkAddons
function includes any filters for you to use, by seeing if it uses apply_filters()
anywhere. If it does, then you can filter the value passed to it with add_filter()
. If the filter is properly supported, then ideally the original developer has documented it somewhere.