Why, Where, and When to use reference pointers in filters/hooks?
The example you give is used when you’re building a plugin/theme using a class. In normal use, your functions.php file would just have: function my_function_to_filter( $args ) { // … function stuff here return $args; } add_filter(‘some_wp_filter’, ‘my_function_to_filter’); If you’re using a class, though, things would look different. You’d likely have a my-class.php file containing: … Read more