A question about add_action()
The emailer::send is the function callback for a publish_post action hook. This action hook accepts only one parameter which is the post ID and it is passed by WordPress. When you define an action hook, you set what parameters are passed to the callback functions. For example: $arg_1 = “The aregument value”; do_action( ‘my_custom_action’, $arg_1 … Read more