Use add_action for action hooks, not add_filter
GaryJones opened this issue · 1 comments
GaryJones commented
extended-cpts/src/class-extended-cpt.php
Line 202 in 3289303
These two lines have got add_filter( 'pre_get_posts', ... );
instead of add_action()
.
While at the PHP level it makes no difference, we have a VIPCS sniff that specifically looks for filter hook callbacks to ensure that they have a returned value, and the incorrect function call is causing false positives.
There may be others as well, but these are two that stood out immediately.
johnbillion commented
Thanks for the report. Related: WordPress/WordPress-Coding-Standards#713