Skip to content

Prevents comments containing specific stopwords from being posted in any blog of a multisite WordPress installation

Notifications You must be signed in to change notification settings

lenasterg/ls-comment-stopwords-checker-ms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LS Comment Stopword Checker for Multisite

Contributors: lenasterg
Tags: comments, stopwords, multisite, spam
Requires at least: 5.0
Tested up to: 6.3
Requires PHP: 7.0
Stable tag: 1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

LS Comment Stopword Checker is a WordPress multisite plugin that prevents users from posting comments containing predefined stopwords based on the WordPress Comment Blacklist. It allows network admins to configure a stopword list that blocks specific terms from appearing in comments across all subsites. It's aim is to be as light as it gets, so it doesn't log and doesn't queries the WordPress database. But you can activate the send mail functionality to get mail every time it blocks a comment, so you can verify it works

Description

LS Comment Stopword Checker is a WordPress plugin specifically designed for multisite networks to prevent users from posting comments containing stopwords. The plugin helps network administrators manage and block comments with predefined prohibited words from being posted across all subsites.

Features:

  • Supports multisite WordPress networks.
  • Blocks comments containing prohibited words (defined in stopwords.txt).
  • Uses a stopword list based on the WordPress Comment Blacklist from GitHub.
  • Can send an email notification to the super admin when a comment is blocked. If you want to activate it, change const SENT_EMAIL to TRUE;
  • Provides a network admin settings page to manage stopwords.
  • Displays a notice to subsite admins about the stopword configuration.

Installation

  1. Upload the ls-comment-stopword-checker folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. Create or edit the stopwords.txt file in the plugin directory to define the prohibited words. By default, this file uses the stopword list from the WordPress Comment Blacklist.

Configuration:

  • NONE.
  • If you want you can add more stopwords in the stopwords.txt file (one word per line).
  • If you want to receive mail every time to plugin stops a comment, change const SENT_EMAIL to TRUE
  • If you want to change the get emails in a different email address than the email address of the Super Admin you can define it in the LS_SUPER_ADMIN_EMAIL constant in the ls-comment-stopword-checker.php file.
  • A settings page is available under Network Admin > Stopword Checker to view stopwords.

Frequently Asked Questions

How do I add or edit stopwords?

To add or edit stopwords, open the stopwords.txt file located in the plugin folder. Add one stopword per line. Each word in this list will prevent the posting of any comment containing that word.

Does the plugin come with a predefined stopword list?

Yes, the plugin uses a predefined stopword list based on the WordPress Comment Blacklist from GitHub. You can customize this list by adding or removing words in the stopwords.txt file.

Can I block specific URLs or email addresses in the comments?

Yes, you can add specific URLs or email addresses to the stopwords.txt file, and any comment containing those URLs or emails will be blocked.

Will subsite admins be notified about blocked comments?

No, only the super admin (as defined in the plugin) will receive email notifications about blocked comments.

Screenshots

  1. Settings Page: The Stopword Checker settings page in the network admin dashboard.
  2. Stopword Notice: A notice informing subsite admins about the stopword configuration on their discussion settings page.

Changelog

2.0

  • Addedn const SENT_EMAIL = FALSE, so the plugin don't send email for every comment it blocks

1.0

  • Initial release of LS Comment Stopword Checker.

License

This plugin is licensed under the GPLv2 or later. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation.

For more details, see GPL-2.0 License.

About

Prevents comments containing specific stopwords from being posted in any blog of a multisite WordPress installation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages