wp_set_comment_status
Runs when the status of a comment changes. Action function arguments: comment ID, status string indicating the new status (“delete”, “approve”, “spam”, “hold”).
But when I try
add_action('wp_set_comment_status', 'toto' );
function toto($comment_ID, $status) {
//stuff
}
I get the error : Warning: Missing argument 2 for toto()
And of course no error when just declaring toto() with only one argument.
So ? do you know how to use both of the two arguments for wp_set_comment_status action ?
(@fay-1)
14 years, 8 months ago
Hello world
We can read in codex :
But when I try
I get the error :
Warning: Missing argument 2 for toto()
And of course no error when just declaring toto() with only one argument.
So ? do you know how to use both of the two arguments for wp_set_comment_status action ?
Thanks in advance