comment_approved ) ) { $original_redirect = preg_replace('|#.*?$|', '', $original_redirect); // strip the #anchor $caught_as = ( '0' == $comment->comment_approved ) ? 'moderation' : 'spam'; return add_query_arg( 'caught_as', $caught_as, add_query_arg( 'cws_acc', time(), $original_redirect ) ) . '#comment-caught'; } return remove_query_arg( 'caught_as', remove_query_arg( 'cws_acc', $original_redirect ) ); } function cws_acc_is_catchable_type( $type ) { switch ( get_option( 'cws_acc_comment_status' ) ) { case 'moderated' : if ( $type == '0' ) return true; break; case 'spam' : if ( $type == 'spam' ) return true; break; case 'both' : default : if ( $type == '0' || $type == 'spam' ) return true; break; } return false; } function cws_acc_comment_was_caught() { return isset( $_GET['caught_as'] ); } function cws_acc_get_caught_message() { if ( !cws_acc_comment_was_caught() ) return false; elseif ( 'moderation' == $_GET['caught_as'] ) return __( 'Your comment was placed in the moderation queue and the site administrator has been notified. Your comment will not appear on the site until the administrator has approved it.', 'antispam-collateral-condolences' ); elseif ( 'spam' == $_GET['caught_as'] ) return __( "Your comment was caught by this site's anti-spam defenses. Please notify the site administrator so your comment can be rescued.", 'antispam-collateral-condolences' ); else return false; } function cws_acc_alert_user_js() { if ( !cws_acc_comment_was_caught() ) return; $caught_message = cws_acc_get_caught_message(); echo ""; } function cws_acc_alert_user_comment_form() { if ( !cws_acc_comment_was_caught() ) return; $caught_message = cws_acc_get_caught_message(); echo '

' . esc_html( $caught_message ) . '

'; } function cws_acc_options_page() { ?>

Antispam Collateral Condolences

Which comment statuses should receive notification?




What notification style should be used?