Ошибка при отправке комментария

Я пытаюсь применить этот учебник к своему блогу. Я использую тему Woothemes Bueno .

Я добавляю этот код в файл functions.php моей темы:

function ymc_add_meta_settings($comment_id) { add_comment_meta( $comment_id, 'mailchimp_subscribe', $_POST['mailchimp_subscribe'], true ); } add_action('comment_post', 'ymc_add_meta_settings', 1); function ymc_subscription_add( $cid, $comment ) { $cid = (int) $cid; if ( !is_object($comment) ) $comment = get_comment($cid); if ( $comment->comment_karma == 0 ) { $subscribe = get_comment_meta($cid, 'mailchimp_subscribe', true); if ( $subscribe == 'on' ) { update_comment_meta($cid, 'mailchimp_subscribe', 'off'); ///////////////////////////////////// ///////MailChimp//////////////////// /////////////////////////////////// $apikey = 'MYAPIKEY-us2'; $listid = 'MYLISTID'; $endpoint = 'http://us2.api.mailchimp.com/1.3/?output=php'; $request = array( 'apikey' => $apikey, 'id' => $listid, 'email_address' => strtolower( $comment->comment_author_email ), 'double_optin' => true, 'merge_vars' => array( ' <merge tag for name> ' => $comment->comment_author, 'OPTIN_IP' => $comment->comment_author_IP, ) ); $result = wp_remote_post( $endpoint.'&method=listSubscribe', array( 'body' => json_encode($request) ) ); ///////////////////////////////////// ///////MailChimp Ended//////////////////// /////////////////////////////////// } } } add_action('comment_approved_','ymc_subscription_add',10,1); add_action('comment_post', 'ymc_subscription_add', 60,1); 

Также этот код добавлен в файл комментариев.php темы (ниже </form> ):

 <input style="width: auto;" type="checkbox" name="mailchimp_subscribe" id="mailchimp_subscribe"/> <label for="mailchimp_subscribe"> Subscribe </label> </p> 

Но когда я пытаюсь отправить комментарий, я получаю эту ошибку:

 Warning: Missing argument 2 for ymc_subscription_add() in /home/content/blabla/themes/bueno/functions.php on line 36 Warning: Cannot modify header information - headers already sent by (output started at /home/content/blabla/themes/bueno/functions.php:36) in /home/blabla/html/wp-comments-post.php on line 95 Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/html/wp-content/themes/bueno/functions.php:36) in /home/content/blabla/wp-comments-post.php on line 96 Warning: Cannot modify header information - headers already sent by (output started at /home/blabla/html/wp-content/themes/bueno/functions.php:36) in /home/content/blabla/wp-comments-post.php on line 97 Warning: Cannot modify header information - headers already sent by (output started at /home/contentblabla/html/wp-content/themes/bueno/functions.php:36) in /home/content/blabla/wp-includes/pluggable.php on line 897 

Solutions Collecting From Web of "Ошибка при отправке комментария"