=== Đăng ký TẤT CẢ thông báo bài viết mới  (Subcribe All Post type, Taxonomy, Single) ===
Contributors: ducmu
Tags: subscribe, email notification, custom post type, taxonomy, comments
Requires at least: 5.0
Tested up to: 6.9
Requires PHP: 7.0
Stable tag: 1.6.9
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sign up to receive email notifications for new posts of all custom post types, taxonomies (categories, tags, sets), and single posts.

== Description ==

/**

Plugin Name: Đăng ký TẤT CẢ thông báo bài viết mới  (Subcribe All Post type, Taxonomy, Single)

Plugin URI: https://wordpress.org/plugins/subcribe-all-post-type-taxonomy-single/

Description: Sign up to receive email notifications for new posts of all custom post types, taxonomies (categories, tags, sets), and single posts.

Version: 1.6.9

Author: Đức Mu

Author URI: https://techmu.net

Text Domain: subcribe-all-post-type-taxonomy-single

License: GPLv2 or later

License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

Subscribe ALL is a comprehensive solution that allows your website visitors to easily subscribe to email notifications for any content they are interested in. Instead of just general notifications, the plugin offers granular subscription levels, enhancing user experience and engagement rates.

Key Features:

Global Subscription: Receive emails for any new posts published across allowed Post Types.

Post Type Specific Subscription: Follow a specific type of content (e.g., only get notified for new Products or new Wiki entries).

Taxonomy Subscription: Subscribe to specific Categories, Tags, or Series.

Post Update Tracking: Get notified when an admin edits or updates a specific post.

Comment Tracking: Option to receive notifications when someone replies to your comment, or when any new comment is posted on an article.

Smart User Recognition: If users are logged in, the system automatically detects their email (hiding the email input field) so they only need to click the "Subscribe" button.

List Management & CSV Export: Email lists are neatly grouped. Supports exporting CSV files fully compatible with Microsoft Excel (no font errors, auto-column splitting).

Automated Cleanup System: Canceled subscriptions are kept in a separate tab and automatically deleted after 30 days to optimize database size.

Bilingual Support: Built-in support for English and Vietnamese, adapting to user settings.

== Installation ==

After activation, navigate to the "Subscribe ALL" menu in your WordPress Admin sidebar.

Go to the "Settings" tab to configure your Gmail SMTP using an App Password.

Select which Post Types and Taxonomies you want to allow for subscription.

Use the provided shortcodes or PHP functions to display the subscription forms anywhere on your site:

Shortcode (For Post Editor / Page / Widget)

You can copy the code below and paste it anywhere in WordPress that supports shortcodes.

CUSTOMIZE BUTTON APPEARANCE (Supports all Shortcodes): You can add width, height, color, and title parameters inside any shortcode to customize it:

- width="80%" or width="500px": Adjusts the width (the button will never exceed 100% of its containing element to avoid breaking the interface).

- height="50px": Adjusts the height.

- color="ff0000" or color="red": Changes the background color of the button (supports HEX code input without the # symbol).

- title="Custom Text": Changes the display label of the signup button for brevity.

- font_size="10px": Adjusts the font size on the button.

Subscribe to the entire website:

[subscribe_all] (Custom example: [subscribe_all color="green" title="Subscribe to newsletter"])

Subscribe to a specific Post Type:

[subscribe_post_type type="slug_of_post_type"] (Example: [subscribe_post_type type="manga" width="80%" height="50px" color="ff0000" title="Follow this manga"])

Subscribe to a specific Taxonomy (Category/Tag):

[subscribe_taxonomy id="ID_of_taxonomy"] (Custom example: [subscribe_taxonomy id="15" width="200px" font_size="10px" title="Follow category"])

Automatic Taxonomy/Post Type Detection: If you paste the shortcode [subscribe_taxonomy] (no need to fill in the ID) into the Category description page, it will automatically detect the Taxonomy/Post Type. Identify that category. Similarly for [subscribe_post_type] on the Archive page of the Post Type.

PHP Code (For Developers to include in Theme files)

If you want to hardcode the subscribe button into the theme (e.g., single.php, archive.php, category.php), use the following PHP code. You can pass a custom array with width, height, color, and title keys to adjust the CSS just like a shortcode.

Display the full-page subscribe button:

<?php // Default call
if(function_exists('sub_all_display_all_form')) sub_all_display_all_form();

// Call with custom CSS and Text
if(function_exists('sub_all_display_all_form')) {
sub_all_display_all_form(array(
'color' => 'blue',
        'title' => 'Subscribe to general notifications'
    ));
}
?>

Display the Post Type subscription button (automatically detected or specified):

// Automatically detects the Post Type being viewed
<?php if(function_exists('sub_all_display_post_type_form')) sub_all_display_post_type_form(); ?>

// Or specify the Post Type slug with CSS customizations:

<?php
if(function_exists('sub_all_display_post_type_form')) {
sub_all_display_post_type_form('manga', array(
'width' => '80%',
 'height' => '50px',
        'color'  => 'ff0000',
        'font_size'  => '10px',
        'title'  => 'Theo dõi truyện này'
    ));
}
?>

Display the Taxonomy subscription button (automatically detected or specified):

// Automatically detects the category/Taxonomy being viewed
<?php if(function_exists('sub_all_display_taxonomy_form')) sub_all_display_taxonomy_form(); ?>

// Or specify the Taxonomy ID (e.g., 15) and customize the display
<?php
if(function_exists('sub_all_display_taxonomy_form')) {
sub_all_display_taxonomy_form(15, array(
'width' => '100%',
 'title' => 'Receive this item'
    ));
}
?>

== Frequently Asked Questions ==

= How do I configure the Email (SMTP) settings? =
The plugin has a built-in SMTP configuration for Gmail in the "Settings" section. You just need to enter your Gmail address and an "App Password". There is a detailed guide link provided right inside the plugin settings.

= Can I disable subscriptions for a specific post? =
Yes! When editing a post, look for the "Subscribe ALL Settings" meta box on the right side. You can uncheck the options to disable post update tracking or comment tracking for that specific post.

= Can I hide the subscribe button for a specific Category? =
Yes. Go to the Category management page and edit that specific category. At the bottom, there is an option for "Subscribe ALL Settings" => Choose "Disable subscriptions". Any shortcode or PHP function calling this category will automatically hide the form.

= What happens when a user clicks "Unsubscribe"? =
Every notification email contains a secure, hashed unsubscribe link. When clicked, the system automatically cancels the exact subscription item the user wants to stop following. Admins can view canceled users in the "Unsubscribed (Kept 30 days)" tab.

== Screenshots ==

Manage subscribers list, showing neatly grouped subscriptions for each user.

Advanced settings to enable/disable forms per Post Type and Taxonomy.

Built-in Gmail SMTP configuration and bilingual language toggle.

== Changelog ==

= 1.6.9 =

Initial release on WordPress.org

Added Multi-language support (English & Vietnamese)

Added comprehensive granular tracking (Post Types, Taxonomies, Post Updates, Comment Replies)

Added optimized CSV export with specific delimiter fix for Excel