Unlocking Joy: 50% Off On All of the Codes and Templates Get It Now >

auto comments detection plugin

auto comments detection plugin
Free

Implementation Details

  1. Show All Selected Comments:
    • Added acd_increase_comments_per_page to set edit_comments_per_page to a high value (9999) during bulk actions (acd_move_to_spam, acd_permanent_delete), ensuring all selected comments are processed.
    • The admin notice uses _n for proper singular/plural messaging, showing the exact count of comments affected.
  2. Move to Spam Folder:
    • Replaced the "Permanently Delete" bulk action with "Move to Spam" (acd_move_to_spam), which uses wp_set_comment_status to mark comments as spam.
    • Kept "Permanently Delete" as a separate bulk action for use in Spam/Trash folders.
  3. Select All in Spam/Trash:
    • The acd_permanent_delete action is available in the Spam and Trash folders (accessible via edit-comments.php?comment_status=spam or comment_status=trash).
    • Selecting all comments (via the checkbox or bulk select) and choosing "Permanently Delete" moves them to the wp_deleted_comments table and removes them from the database using wp_delete_comment.
  4. Restore System:
    • The restore page (Comments > Restore Comments) lists comments in the wp_deleted_comments table, allowing restoration of comments deleted manually or via auto-deletion.
    • Restoration uses wp_insert_comment to reinsert comments.
  5. Existing Features:
    • Auto-deletion cron job remains unchanged, deleting comments older than 1 day (configurable) and storing them in wp_deleted_comments.
    • Auto-update support continues to check https://softaculas.com/api/auto-comment-detection.json.
    • PHP 8.2 compatibility is maintained with type hints and safe serialization.

Installation Instructions

  1. Package the auto-comment-detection/ folder into a .zip file (e.g., auto-comment-detection.zip).
  2. In the WordPress dashboard, go to Plugins > Add New > Upload Plugin, upload the .zip, and activate.
  3. Configure settings under Comments > Auto Detection, including auto-deletion options.
  4. Access spam comments under Comments > Spam and restore options under Comments > Restore Comments.
  5. Ensure PHP 8.2 and WordPress cron are enabled.

Usage

  • Move to Spam: Select comments in the Comments page, choose "Move to Spam" from bulk actions. All selected comments (not just 20) are moved to the Spam folder with a notice (e.g., "25 comments moved to Spam").
  • Permanent Delete from Spam/Trash: In the Spam or Trash folder, select all comments (using the top checkbox or selecting across pages) and choose "Permanently Delete" to move them to the wp_deleted_comments table and remove them from the database.
  • Restore: Visit Comments > Restore Comments to recover deleted comments.
  • Auto-Deletion: Comments older than 1 day (configurable) are automatically deleted and stored for restoration.
  • Updates: The plugin automatically checks for updates if the update server is configured.

Notes

  • Backup: Always back up your database before using bulk deletion or auto-deletion, as permanent removal is irreversible without restoration.
  • Spam/Trash: The "Select All" checkbox in the Spam/Trash page works with pagination; ensure all desired comments are selected.
  • Cron: WordPress cron must be active for auto-deletion to function; use a server cron job if WP_Cron is disabled.
  • Compatibility: Tested with WordPress 4.7+, PHP 8.2; uses core APIs for compatibility.
  • Akismet: Optional for enhanced spam detection.

The author mimasuk has offered the item for free, you can now download it.

License Option
Quality checked by codebizz
Full Documentation
Future updates
Author Support
mimasuk

Member since Apr 2025

From Bangladesh
New Author
Exclusive Author
Trend Master
Verified Account
Featured Item
View Portfolio

mimasuk's items

We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies

More