Chapter 3 - Hooks within a class. add_action
Hi, I am new to all of this, but not new to coding or software engineering. I have to agree with the books opening comments - "It can be a challenge to find resources in a single place". Hence I am reading this book.
Background to my question:
On page 31 add_action is define as taking 4 parameters. The second parameter is "$function" - "The name of your function that wordpress calls".
My question: Using Hooks from within a class uses the following example:
add_action ( $tag ,$function_to_add );
So why is the example using the $function_to_add - this is core wordpress function and an alias for "add_filter()".
Is there something I do not understand, or was this just an accident that the example on page 51 calls core functionality when it should be referring to my own function that "I want to add"?