Version Description
Download this release
Release Info
Developer | donncha |
Plugin | Cookies for Comments |
Version | 0.3 |
Comparing to | |
See all releases |
Code changes from version 0.2 to 0.3
- cookies-for-comments.php +2 -2
- readme.txt +1 -1
cookies-for-comments.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Cookies for Comments
|
4 |
Plugin URI: http://ocaoimh.ie/cookies-for-comments/
|
5 |
Description: Sets a cookie that must exist for a comment to be allowed through
|
6 |
-
Version: 0.
|
7 |
Author: Donncha O Caoimh
|
8 |
Author URI: http://ocaoimh.ie/
|
9 |
|
@@ -46,7 +46,7 @@ add_action( 'init', 'cfc_set_comment_style_cookie' );
|
|
46 |
function cfc_check_comment_style_cookie( $comment ) {
|
47 |
$cfc_key = get_option( 'cfc_key' );
|
48 |
if( !$cfc_key )
|
49 |
-
return;
|
50 |
|
51 |
if( $comment[ 'comment_type' ] != 'trackback' && $comment[ 'comment_type' ] != 'pingback' && !isset( $_COOKIE[ $cfc_key ] ) ) {
|
52 |
add_filter('pre_comment_approved', create_function('$a', 'return \'spam\';')); // thanks Akismet
|
3 |
Plugin Name: Cookies for Comments
|
4 |
Plugin URI: http://ocaoimh.ie/cookies-for-comments/
|
5 |
Description: Sets a cookie that must exist for a comment to be allowed through
|
6 |
+
Version: 0.3
|
7 |
Author: Donncha O Caoimh
|
8 |
Author URI: http://ocaoimh.ie/
|
9 |
|
46 |
function cfc_check_comment_style_cookie( $comment ) {
|
47 |
$cfc_key = get_option( 'cfc_key' );
|
48 |
if( !$cfc_key )
|
49 |
+
return $comment;
|
50 |
|
51 |
if( $comment[ 'comment_type' ] != 'trackback' && $comment[ 'comment_type' ] != 'pingback' && !isset( $_COOKIE[ $cfc_key ] ) ) {
|
52 |
add_filter('pre_comment_approved', create_function('$a', 'return \'spam\';')); // thanks Akismet
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: donncha
|
3 |
Tags: cookies, comments, spam
|
4 |
Tested up to: 2.5.1
|
5 |
-
Stable tag: 0.
|
6 |
|
7 |
Sets a cookie on a random URL that is then checked when a comment is posted. If the cookie is missing the comment is marked as spam.
|
8 |
|
2 |
Contributors: donncha
|
3 |
Tags: cookies, comments, spam
|
4 |
Tested up to: 2.5.1
|
5 |
+
Stable tag: 0.3
|
6 |
|
7 |
Sets a cookie on a random URL that is then checked when a comment is posted. If the cookie is missing the comment is marked as spam.
|
8 |
|