How can the WP function add_action
receive another function as its argument? I know this by itself is not possible in php (to have custom functions receive other functions as arguments). I deliberately broke some code and found that there is actually a native php function call_user_fun_array
beneath this (i think),
but how did they make it so that their own function can have a function as its argument?
There is a native PHP function call_user_func() Take a look on this pretty simple example.