=== 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.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Duplicate posts, pages, and custom post types individually or in bulk with configurable titles, content copying, and redirects.

== Description ==

Meta Duplicate Post adds secure Duplicate actions to supported WordPress post lists and edit screens. Administrators can choose who may duplicate content, which data is copied, how duplicates are named, and where users go after creating a copy.

Key features:

* **One-click duplication:** Create a copy from a post list or use the Duplicate shortcut while editing in the Block or Classic Editor.
* **Bulk duplication:** Duplicate several posts, pages, or custom post type entries with one bulk action.
* **Complete content copying:** Preserve content, excerpts, featured images, custom fields, page hierarchy, menu order, and discussion settings.
* **Configurable copying:** Independently enable or disable taxonomy terms, metadata, and featured images.
* **Flexible naming:** Create a reusable title pattern with the `{title}` placeholder.
* **Workflow control:** Open each new copy for editing or return to its content list after one-click duplication.
* **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 custom post type with an admin interface. Attachments and WordPress system-managed post types are excluded.
* **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 status, author, date, naming, copied content, redirect behavior, and enabled post types.
5. Choose **Duplicate** beneath a title, use the shortcut while editing, or select several items and run the **Duplicate** bulk action.

== 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 custom 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 always copies the title, content, excerpt, hierarchy, menu order, password, and discussion settings. You can independently control whether taxonomy terms, metadata, and the featured image are copied. Temporary editor locks, trash bookkeeping, and old-slug metadata are intentionally omitted.

= Can I duplicate several items at once? =

Yes. Select items on any enabled post type list, choose **Duplicate** from Bulk actions, and apply it. Each item is checked against the current user's permissions before its copy is created.

= Can I change the duplicate title? =

Yes. Set a title pattern on the Defaults screen and include `{title}` where the original title should appear, such as `Copy of {title}`.

= 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. Copy-content and post type controls.
4. Duplicate row, editor, and bulk actions.

== Upgrade Notice ==

= 1.2.0 =

Adds bulk duplication, an editor shortcut, title patterns, selective content copying, and redirect preferences.

= 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.2.0 =

* Added bulk duplication for posts, pages, and enabled custom post types.
* Added a Duplicate shortcut to Block and Classic Editor admin toolbars.
* Added configurable duplicate title patterns using the `{title}` placeholder.
* Added independent controls for copying taxonomy terms, metadata, and featured images.
* Added a preference to edit the new copy or return to the content list after duplication.
* Centralized single and bulk operations in one reusable, permission-aware duplication service.
* Added item counts and partial-success feedback for bulk operations.

= 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.
