=== NDT Duplicate === Contributors: nguyenduytan Tags: duplicate, clone, post, page, custom post type Requires at least: 4.9 Tested up to: 6.8.2 Stable tag: 1.0.2 Requires PHP: 7.0 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Plugin URI: https://nguyenduytan.com/1368-ndt-duplicate-wordpress-plugin/ NDT Duplicate allows you to easily duplicate (clone) WordPress posts, pages, or custom post types with customizable options. == Description == NDT Duplicate is a simple yet powerful plugin that enables administrators to clone posts, pages, reusable blocks, or custom post types with just one click. It adds a "Clone" (or custom text) link to the row actions in the WordPress admin, making content duplication fast and efficient. Key features include: - Adds a "Clone" link to row actions for selected post types. - Supports duplicating posts, pages, reusable blocks, and custom post types. - Administrators can enable/disable the plugin and configure settings. - Customizable "Allowed Types" (Page, Post, Blocks, Custom Type). - Restrict cloning to specific user roles (e.g., Administrators). - Option to set custom text for the clone link (default: "Clone"). - Choose whether cloned content is saved as a Draft or Published immediately. Developed and maintained by Tony Nguyễn, this plugin is designed to streamline content management workflows and will be supported as long as necessary. == Installation == 1. Upload the `ndt-duplicate` folder to the `/wp-content/plugins/` directory. 2. Activate the plugin through the 'Plugins' menu in WordPress. 3. Go to **NDT Solutions > NDT Duplicate** in the admin dashboard to configure settings. == Changelog == = 1.0.2 = - Fixed redirect issue where cloning redirected to incorrect URL (e.g., edit.php#038;action=edit) instead of edit page. - Added Elementor-specific cache clearing for cloned templates. - Excluded sensitive meta keys (_edit_lock, _edit_last) from duplication. - Added debug log for redirect URL to aid troubleshooting. = 1.0.1 = - Fixed clone link not appearing for non-public post types with UI, such as reusable blocks (wp_block). - Optimized post type detection to use 'show_ui' => true for broader compatibility with custom post types. - Ensured correct redirect for all supported post types after duplication. - Updated "Tested up to" to WordPress 6.8.2. = 1.0.0 = - Initial release with full functionality: - Enable/disable plugin toggle. - Configurable allowed post types and user roles. - Customizable clone link text and post status after cloning. - Added "Clone" link to row actions in post/page lists. - Standardized admin menu under NDT Solutions for ecosystem compatibility. - Removed external SweetAlert2 and Google Fonts to comply with WordPress.org guidelines. - Improved security with proper escaping and sanitization. - Added full translation support with .pot and Vietnamese .po files. - Fixed readme.txt header formatting to comply with WordPress.org requirements. == Frequently Asked Questions == = What does this plugin do? = NDT Duplicate adds a "Clone" link to the row actions in the WordPress admin, allowing you to duplicate posts, pages, or custom post types with customizable settings. = How do I configure the plugin? = After activation, go to **NDT Solutions > NDT Duplicate** in your WordPress admin dashboard. You can enable/disable the plugin, select allowed post types, restrict access to specific user roles, set the clone link text, and choose the status of cloned content. = Can I restrict who can use the clone feature? = Yes, in the settings under "Allowed Groups," you can select which user roles (e.g., Administrator, Editor) are permitted to see and use the "Clone" link. = What happens after I clone a post? = The cloned post will be saved as either a "Draft" or "Published" based on your selection in the "After Clone" setting. The title will have "(Clone)" appended, and all content, meta, and taxonomies will be copied. = Why don’t I see the "Clone" link? = Ensure the plugin is enabled and at least one "Allowed Type" is selected. Also, check if your user role is included in "Allowed Groups" in the settings. = Does it work with custom post types? = Yes, if you enable the "Custom Type" option in "Allowed Types," the plugin will add the "Clone" link to all custom post types except built-in ones like posts, pages, and reusable blocks. = How can I support the developer? = You can support the developer by donating via the PayPal.me link provided in the plugin's admin settings page under "About the Author". == Screenshots == 1. Admin settings page under **NDT Solutions > NDT Duplicate**. 2. "About the Author" section with donation button. 3. "Clone" link in row actions on the Posts or Pages screen. == Support == For support, please contact me via: - Email: admin@ndtan.net - Telegram: @nguyenduytan - Website: https://nguyenduytan.com == License == This plugin is licensed under GPLv2 or later.