🎯 Zero bloat, single purpose plugin - Automatically send beautiful email notifications when WordPress comments are approved.
Comment Approved Notifier Extended is a lightweight WordPress plugin designed with a single focus: notify comment authors instantly when their comments are approved. No bloat, no unnecessary features—just one thing done exceptionally well.
- 🎯 Single Purpose - Does ONE thing perfectly: sends approval notifications
- 🪶 Zero Bloat - No unnecessary features or performance overhead
- 🔒 Security First - Built following WordPress security best practices
- 📱 Responsive Emails - Beautiful HTML templates with dark mode support
- 🌍 Translation Ready - Fully internationalized with .pot file
- ⚡ Lightning Fast - Minimal database queries, optimized code
- 👨💻 Developer Friendly - Clean, well-documented code
- Automatic notifications when comments are approved
- Customizable subject and body with shortcodes
- Professional, responsive HTML email template
- Dark mode support for better user experience
- Email validation with
is_email() - Nonce verification for all form submissions
- Data sanitization (
sanitize_text_field(),wp_kses_post()) - Output escaping for XSS prevention
- ABSPATH security checks
- Error logging for debugging
- 6 available shortcodes for personalization
- HTML support in email body
- Easy-to-use admin interface
- Click-to-copy shortcode sidebar
- Loads admin assets only on settings page
- No frontend resources loaded
- Minimal database queries
- Efficient hook usage
- Go to Plugins > Add New
- Search for "Comment Approved Notifier Extended"
- Click Install Now, then Activate
- Navigate to Settings > Comment Approved Notifier
- Customize your email template
- Save and test!
# Download and extract
cd wp-content/plugins/
wget https://downloads.wordpress.org/plugin/comment-approved-notifier-extended.zip
unzip comment-approved-notifier-extended.zip
rm comment-approved-notifier-extended.zip
# Or clone from GitHub
git clone https://github.com/yourusername/comment-approved-notifier-extended.gitThen activate via WordPress admin.
Use these shortcodes in your email subject and body:
| Shortcode | Description | Example Output |
|---|---|---|
[commentauthor] |
Comment author's name | John Doe |
[commentedposttitle] |
Post title | "10 Best WordPress Plugins" |
[commentaddress] |
Direct link to comment | https://yoursite.com/post#comment-123 |
[commentcontent] |
Comment text | "Great article! Thanks for sharing..." |
[blogname] |
Your site name | My Awesome Blog |
[blogurl] |
Your site URL | https://yoursite.com |
Subject:
Your comment on [commentedposttitle] has been approved!
Body:
Dear [commentauthor],
Your comment has been approved for the following post:
[commentedposttitle]
You can view your comment at:
[commentaddress]
Your comment:
[commentcontent]
Thank you for contributing to our discussion!
Best regards,
[blogname]
[blogurl]
- Navigate to Settings > Comment Approved Notifier
- Customize the Email Subject using shortcodes
- Customize the Email Body (HTML supported)
- Click Save Changes
- Approve a test comment to verify!
For better email deliverability, use an SMTP plugin:
Enable WordPress debug logging to see error messages:
// In wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);Check logs at: wp-content/debug.log
- WordPress: 5.0 or higher
- PHP: 5.6 or higher (tested up to PHP 8.5)
- MySQL: 5.6 or higher
// When comment status changes from unapproved to approved
add_action('comment_unapproved_to_approved', 'cane_send_email');comment-approved-notifier-extended/
├── comment-approved-notifier-extended.php # Main plugin file
├── readme.txt # WordPress.org readme
├── README.md # GitHub readme
├── assets/
│ ├── css/
│ │ └── admin.css # Admin styles
│ └── js/
│ └── admin.js # Admin scripts
├── templates/
│ └── email-template-1.php # Email HTML template
└── lang/
└── comment-approved-notifier-extended.pot # Translation template
This plugin follows WordPress Coding Standards:
- ✅ Proper sanitization and validation
- ✅ Nonce verification
- ✅ Data escaping
- ✅ Internationalization
- ✅ Security best practices
- ✅ PHPDoc documentation
The plugin is fully translatable:
- Use the
.potfile in/lang/directory - Create translations with Poedit or Loco Translate
- Save as
comment-approved-notifier-extended-{locale}.po
Text Domain: comment-approved-notifier-extended
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Clone repository
git clone https://github.com/yourusername/comment-approved-notifier-extended.git
cd comment-approved-notifier-extended
# Install WordPress Coding Standards
composer install
# Check code standards
phpcs --standard=WordPress comment-approved-notifier-extended.php
# Fix code standards automatically
phpcbf --standard=WordPress comment-approved-notifier-extended.php- ✨ Enhanced code documentation with PHPDoc blocks
- ✨ Better error handling and logging
- ✨ Consistent escape function usage
- 🔒 Added capability checks in admin page
- 🔒 Improved nonce error messages
- 🎨 Better code formatting and WordPress standards compliance
- ⚡ More efficient array declarations
- 🔒 Fixed XSS vulnerability
- ✨ Added email validation
- ✨ Added error logging
- ✨ Settings link in plugin list
- 🎨 Modern card-based admin UI
- ⚡ Better template handling
- 🔒 Fixed XSS vulnerability
Does this work with all comment types?
No, it only sends notifications for actual comments. Trackbacks and pingbacks are excluded to prevent unnecessary emails.
Can I customize the email design?
Yes! The email body supports HTML. For advanced customization, modify templates/email-template-1.php.
Will this work with my SMTP plugin?
Absolutely! This plugin uses WordPress's native wp_mail() function, compatible with all SMTP plugins.
Does this slow down my site?
No. The plugin is extremely lightweight with zero bloat. It only loads when needed.
Is this GDPR compliant?
The plugin only uses email addresses already stored in WordPress comments. No additional data is collected.
This project is licensed under the GPL v2 or later - see the LICENSE file for details.
Copyright (C) 2024 UfukArt
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
- Original Author: yakuphan
- Current Maintainer: UfukArt
- Email Template: Based on responsive HTML email best practices
Need help? Have a feature request?
If you find this plugin useful, consider supporting development:
Made with ❤️ by UfukArt
⭐ If you find this plugin useful, please give it a star on GitHub! ⭐