Plugin Directory

Changeset 1054103


Ignore:
Timestamp:
12/25/2014 05:20:53 PM (11 years ago)
Author:
benohead
Message:

tagging version 0.3

Location:
wp-spam-fighter
Files:
1 added
8 edited
8 copied

Legend:

Unmodified
Added
Removed
  • wp-spam-fighter/tags/0.3/bootstrap.php

    r1054080 r1054103  
    44Plugin URI:  https://wordpress.org/plugins/wp-spam-fighter/
    55Description: Comment spam prevention without moderation, captchas or questions
    6 Version:     0.2.1
     6Version:     0.3
    77Author:      Henri Benoit
    88Author URI:  http://benohead.com
  • wp-spam-fighter/tags/0.3/classes/wp-spam-fighter.php

    r997386 r1054103  
    2828         * Plugin version number
    2929         */
    30         const VERSION = '0.2.1';
     30        const VERSION = '0.3';
    3131
    3232        /**
     
    218218            add_action('pre_comment_on_post', array($this, 'pre_comment_on_post'));
    219219            add_filter('pre_comment_approved', array($this, 'pre_comment_approved'), 10, 2);
     220            add_action('comment_post', array($this, 'comment_post'), 10, 2);
     221
    220222
    221223            add_action('register_form', array($this, 'register_form'));
     
    415417        }
    416418
     419        function comment_post( $comment_ID, $approved ) {
     420            if (isset($this->modules['WPSF_Settings']->settings['others']['delete']) && $this->modules['WPSF_Settings']->settings['others']['delete']) {
     421                if ($approved == 'spam') {
     422                    wp_trash_comment( $comment_ID );
     423                }
     424            }
     425        }
     426
    417427        /**
    418428         * Filter a comment’s approval status before it is set.
  • wp-spam-fighter/tags/0.3/classes/wpsf-settings.php

    r997386 r1054103  
    224224                "trackbacks" => false,
    225225                "registration" => true,
     226                "delete" => false,
    226227            );
    227228
     
    419420            $this->add_settings_field_others('wpsf_javascript', 'JavaScript human check');
    420421            $this->add_settings_field_others('wpsf_registration', 'Also protect from spammer registration');
     422            $this->add_settings_field_others('wpsf_delete', 'Move Spam to Trash');
    421423
    422424            // The settings container
     
    566568            $new_settings = $this->setting_default_if_not_set($new_settings, 'others', 'javascript', true);
    567569            $new_settings = $this->setting_default_if_not_set($new_settings, 'others', 'registration', true);
     570            $new_settings = $this->setting_default_if_not_set($new_settings, 'others', 'delete', false);
    568571
    569572            return $new_settings;
  • wp-spam-fighter/tags/0.3/readme.txt

    r1054080 r1054103  
    44Tags: anti spam plugin,anti spam protection,anti-spam,antispam,block,block spam,blog spam,bot,comment,comment spam,comment spam plugin,comment spam prevention,comments,comments spam,how to prevent spam,how to stop spam,mark as spam,plugin,plugin spam,plugins,plugins spam,prevent spam,security,spam,spam comment,spam comments,spam counter,spam filter,spam filter plugin,Spam Free,spam free wordpress,spam plugin,spam plugins,spam prevention,spam prevention wordpress,spam-bot,spam-bots,spambot,spamfree,spammer,spammers,spammy,stop spam,wordpress,wordpress spam block plugin
    55Requires at least: 3.5
    6 Tested up to: 4.0
    7 Stable tag: 0.2.1
     6Tested up to: 4.1
     7Stable tag: 0.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5050== Changelog ==
    5151
     52= 0.3 =
     53
     54* Added option to delete spam comments instead of just marking them as spam.
     55
    5256= 0.2.1 =
    5357
  • wp-spam-fighter/tags/0.3/views/wpsf-settings/page-settings-fields.php

    r984977 r1054103  
    7272           id="wpsf_settings[others][registration]"
    7373           value="1" <?php checked(1, $settings['others']['registration']) ?>>
     74<?php
     75elseif ('wpsf_delete' == $field['label_for']) : ?>
     76    <input type="checkbox" name="wpsf_settings[others][delete]"
     77           id="wpsf_settings[others][delete]"
     78           value="1" <?php if (isset($settings['others']['delete'])) checked(1, $settings['others']['delete']) ?>>
    7479<?php endif; ?>
  • wp-spam-fighter/trunk/bootstrap.php

    r997386 r1054103  
    44Plugin URI:  https://wordpress.org/plugins/wp-spam-fighter/
    55Description: Comment spam prevention without moderation, captchas or questions
    6 Version:     0.2.1
     6Version:     0.3
    77Author:      Henri Benoit
    88Author URI:  http://benohead.com
  • wp-spam-fighter/trunk/classes/wp-spam-fighter.php

    r997386 r1054103  
    2828         * Plugin version number
    2929         */
    30         const VERSION = '0.2.1';
     30        const VERSION = '0.3';
    3131
    3232        /**
     
    218218            add_action('pre_comment_on_post', array($this, 'pre_comment_on_post'));
    219219            add_filter('pre_comment_approved', array($this, 'pre_comment_approved'), 10, 2);
     220            add_action('comment_post', array($this, 'comment_post'), 10, 2);
     221
    220222
    221223            add_action('register_form', array($this, 'register_form'));
     
    415417        }
    416418
     419        function comment_post( $comment_ID, $approved ) {
     420            if (isset($this->modules['WPSF_Settings']->settings['others']['delete']) && $this->modules['WPSF_Settings']->settings['others']['delete']) {
     421                if ($approved == 'spam') {
     422                    wp_trash_comment( $comment_ID );
     423                }
     424            }
     425        }
     426
    417427        /**
    418428         * Filter a comment’s approval status before it is set.
  • wp-spam-fighter/trunk/classes/wpsf-settings.php

    r997386 r1054103  
    224224                "trackbacks" => false,
    225225                "registration" => true,
     226                "delete" => false,
    226227            );
    227228
     
    419420            $this->add_settings_field_others('wpsf_javascript', 'JavaScript human check');
    420421            $this->add_settings_field_others('wpsf_registration', 'Also protect from spammer registration');
     422            $this->add_settings_field_others('wpsf_delete', 'Move Spam to Trash');
    421423
    422424            // The settings container
     
    566568            $new_settings = $this->setting_default_if_not_set($new_settings, 'others', 'javascript', true);
    567569            $new_settings = $this->setting_default_if_not_set($new_settings, 'others', 'registration', true);
     570            $new_settings = $this->setting_default_if_not_set($new_settings, 'others', 'delete', false);
    568571
    569572            return $new_settings;
  • wp-spam-fighter/trunk/readme.txt

    r997386 r1054103  
    44Tags: anti spam plugin,anti spam protection,anti-spam,antispam,block,block spam,blog spam,bot,comment,comment spam,comment spam plugin,comment spam prevention,comments,comments spam,how to prevent spam,how to stop spam,mark as spam,plugin,plugin spam,plugins,plugins spam,prevent spam,security,spam,spam comment,spam comments,spam counter,spam filter,spam filter plugin,Spam Free,spam free wordpress,spam plugin,spam plugins,spam prevention,spam prevention wordpress,spam-bot,spam-bots,spambot,spamfree,spammer,spammers,spammy,stop spam,wordpress,wordpress spam block plugin
    55Requires at least: 3.5
    6 Tested up to: 4.0
    7 Stable tag: 0.2.1
     6Tested up to: 4.1
     7Stable tag: 0.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5050== Changelog ==
    5151
     52= 0.3 =
     53
     54* Added option to delete spam comments instead of just marking them as spam.
     55
    5256= 0.2.1 =
    5357
  • wp-spam-fighter/trunk/views/wpsf-settings/page-settings-fields.php

    r984977 r1054103  
    7272           id="wpsf_settings[others][registration]"
    7373           value="1" <?php checked(1, $settings['others']['registration']) ?>>
     74<?php
     75elseif ('wpsf_delete' == $field['label_for']) : ?>
     76    <input type="checkbox" name="wpsf_settings[others][delete]"
     77           id="wpsf_settings[others][delete]"
     78           value="1" <?php if (isset($settings['others']['delete'])) checked(1, $settings['others']['delete']) ?>>
    7479<?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.