=== Meta Duplicate Post ===
Contributors: devthemenet, moduify
Donate link: https://buymeacoffee.com/devtheme
Tags: duplicate, post, pages, custom post types, duplication
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Duplicate posts, pages, and custom post types in one click while preserving content, metadata, and taxonomy terms.

== Description ==

Meta Duplicate Post adds a secure Duplicate action to supported WordPress post lists. Administrators can choose which user roles and post types may use it, as well as the default status, author, and date behavior for each new copy.

Key features:

* **One-click duplication:** Create a new editable copy directly from a post list.
* **Complete content copying:** Preserve content, excerpts, featured images, custom fields, page hierarchy, menu order, and discussion settings.
* **Taxonomy support:** Copy categories, tags, and custom taxonomy terms when the user has permission to assign them.
* **Role and capability checks:** Restrict the action by role while respecting the source post and post type capabilities registered in WordPress.
* **Custom post type support:** Enable any post type with an admin interface. Attachments are excluded because copying their database record would not copy the media file.
* **Safe defaults:** Create drafts by default, use the current user as author, and use the current date and time.
* **Developer hooks:** Customize available post types and statuses, duplicate post data, metadata handling, and post-duplication processing.
* **Translation ready:** All interface text can be localized through the `meta-duplicate-post` text domain.

== Installation ==

1. Upload the `meta-duplicate-post` folder to `/wp-content/plugins/`, or install the plugin from the WordPress Plugins screen.
2. Activate **Meta Duplicate Post**.
3. Open **Meta Duplicator > Permissions** and select the roles that may duplicate content.
4. Open **Meta Duplicator > Defaults** to configure the new post status, author, date behavior, and enabled post types.
5. Open a supported post list and choose **Duplicate** beneath a post title.

== Frequently Asked Questions ==

= How do I control who can duplicate posts? =

Use the Permissions screen to enable specific roles. A matching role is not enough by itself: the user must also be able to edit the source post and create posts of that type.

= Can I duplicate custom post types? =

Yes. Public and private post types with a WordPress admin interface appear on the Defaults screen. You can enable or disable each type.

= What data is copied? =

The plugin copies the title, content, excerpt, supported post properties, taxonomy terms, and metadata. Temporary editor locks, trash bookkeeping, and old-slug metadata are intentionally omitted.

= Why did my configured status or author fall back to the current user or Draft? =

The plugin never uses its settings to elevate a user's WordPress capabilities. Users who cannot publish receive a draft, and users who cannot edit other authors' posts become the author of their own duplicate.

= Does it duplicate media files? =

No. Featured image references are preserved, but the underlying files are not copied. Attachment posts are therefore excluded from the supported post types.

== Screenshots ==

1. Role-based duplication permissions.
2. Default status, author, and date behavior.
3. Post type controls and the Duplicate row action.

== Upgrade Notice ==

= 1.1.0 =

Adds taxonomy copying, stricter capability checks, validated settings, complete error handling, and a refreshed admin interface. Legacy fixed duplicate dates now use the current date and time.

== Changelog ==

= 1.1.0 =

* Added taxonomy term copying for categories, tags, and custom taxonomies.
* Added excerpt, hierarchy, menu order, password, discussion setting, and filtered-content copying.
* Added source-post edit and post-type creation capability checks.
* Added safe status and author fallbacks to prevent privilege escalation.
* Added validation against registered roles, post types, statuses, and users.
* Fixed fresh installs showing no Duplicate links before settings were saved.
* Replaced the fixed date field with current-date and original-date behaviors.
* Added insert failure handling, safe redirects, success and warning notices, and extension hooks.
* Added scoped, responsive settings styles and select/clear controls.
* Added a Settings shortcut on the Plugins screen.
* Updated compatibility metadata for WordPress 7.0 and PHP 7.4 or later.

= 1.0.0 =

* Initial release.

== License ==

Meta Duplicate Post is free software released under the GPLv2 or later license.
