comment_approved) { setcookie( 'ta_comment_wait_approval', '1' ); } }, 10, 2 ); // "Comment has been sent" section : if a cookie is set, add a text saying it add_action('init', function() { if(isset($_COOKIE['ta_comment_wait_approval']) && $_COOKIE['ta_comment_wait_approval'] === '1' ) { setcookie( 'ta_comment_wait_approval', null, time() - 3600, '/' ); add_action( 'comment_form_before', function() { ?>

comment_approved) { $location = esc_url(get_permalink( $comment->comment_post_ID ).'#wait-approval'); } return $location; }, 10, 2 );