johnbillion/extended-cpts

Use add_action for action hooks, not add_filter

GaryJones opened this issue · 1 comments

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.

Thanks for the report. Related: WordPress/WordPress-Coding-Standards#713