Skip to content

eightam/eightam-duplicator

Repository files navigation

8am Duplicator

Duplicate posts and pages as drafts with a single click — and get a gentle nudge to clean up the permalink before you publish.

  • Author: 8am GmbH
  • License: GPL-2.0-or-later
  • Requires: WordPress 6.0+, PHP 7.4+

Features

  • "Duplicate" row action on every post, page, and custom post type list table.
  • Copies title, content, excerpt, taxonomies, post meta, parent, and order.
  • Marks the new draft with a -copy slug suffix so it's easy to spot.
  • Block editor pre-publish panel that detects copy/duplicate slugs and offers a one-click "Regenerate from title" button.
  • Classic editor publish-time prompt with the same logic.
  • Self-update from this GitHub repository — no marketplace required.
  • Fully translatable (German de_DE and Swiss German de_CH shipped).

Installation

  1. Download the latest release ZIP from GitHub releases, or clone this repository into wp-content/plugins/eightam-duplicator.
  2. Activate 8am Duplicator under Plugins in the WordPress admin.

Usage

  • Go to Posts or Pages, hover any row, and click Duplicate.
  • The new draft opens in the editor with a -copy slug.
  • Before publishing, the editor shows a permalink check — click Regenerate from title to get a clean slug.

Updates

The plugin checks https://github.com/eightam/eightam-duplicator for new releases roughly every 12 hours and shows updates on the standard Plugins → Updates screen, just like plugins from wordpress.org.

A new release is detected when a GitHub release is published whose tag is greater than the version in the plugin header (semantic version compare). The release ZIP attached to the release is used as the update package; if no ZIP is attached, the auto-generated source archive is used.

To force a check, visit Dashboard → Updates and click Check again.

Development

git clone git@github.com:eightam/eightam-duplicator.git
cd eightam-duplicator

The plugin is plain PHP + a small vanilla JS file — no build step.

Translations

  • .pot template lives in languages/eightam-duplicator.pot.
  • German (de_DE) and Swiss German (de_CH) .po/.mo files are shipped.
  • JS strings are loaded via wp_set_script_translations().

Releasing

  1. Bump Version: in eightam-duplicator.php and the fallback version in eightam_dup_enqueue_slug_check().
  2. Commit and tag: git tag v1.4.0 && git push origin main --tags.
  3. The Build & attach plugin ZIP GitHub Action runs on the tag, builds eightam-duplicator-<version>.zip, creates a GitHub release for the tag (with auto-generated notes), and attaches the ZIP. The updater picks it up on the next plugin update check.

The workflow refuses to build if the tag version doesn't match the Version: in the plugin header, so they can't drift. You can also run the workflow manually from the Actions tab to produce a build artifact without releasing.

Changelog

1.4.0

  • Add lightweight GitHub-based self-updater. Shows updates from eightam/eightam-duplicator releases under Plugins → Updates. Caches the latest release lookup for 12 hours.

1.3.1

  • Fix: "Regenerate from title" button no longer crashes the block editor with Cannot read properties of undefined (reading 'length'). The pre-publish panel now keeps Notice content to a single string and renders the rest as siblings, which avoids a Gutenberg Notice a11y effect crash.
  • Show success message after regeneration (was masked by an early return).
  • Disable the regenerate button when the title is empty.

1.3.0

  • Initial public release.

About

Duplicate posts and pages as drafts with a single click.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors