Skip to content

MenuItem Copy & Paste v1.0.7

Choose a tag to compare

@sarap422 sarap422 released this 20 May 07:49
· 5 commits to main since this release

MenuItem Copy & Paste v1.0.7

WordPress Plugin Version
WordPress Plugin: Tested WP Version
WordPress Plugin Required PHP Version
WordPress Plugin Downloads
WordPress Plugin Rating
GitHub release (latest by date)
License: GPL v2
GitHub last commit

Easily copy, paste, clone, delete, and collapse menu items in the WordPress menu editor.

πŸ“₯ Download from WordPress.org | πŸ“– Documentation | πŸ› Report Issues


✨ Features

MenuItem Copy & Paste enhances the WordPress menu editing interface by adding six quick action buttons to each menu item, making menu management significantly more efficient.

  • βž• New: Instantly create a new custom link below the selected menu item
  • πŸ“’ Clone: Duplicate a menu item immediately below itself
  • πŸ”— Copy: Copy menu item data to clipboard with visual highlight
  • πŸ“‹ Paste: Paste copied items at the desired position
  • πŸ—‘οΈ Delete: Remove menu items without opening accordions
  • β–²β–Ό Collapse: Fold/unfold child menu items under a parent (state saved in localStorage)

Perfect For

  • Creating similar menu structures frequently
  • Managing large numbers of menu items efficiently
  • Quickly reorganizing menu layouts
  • Editing menus without accordion interactions
  • Reorganizing large menus with many child items (collapse parents to focus on structure and drag siblings easily)

Additional Features

  • Simple and intuitive UI
  • Delete items without page reload (with fade-out animation)
  • Support for all menu item types (pages, posts, custom links, taxonomies, etc.)
  • Accurate position calculation considering hierarchical structure
  • Preserves all metadata (URL, classes, attributes, etc.)
  • Uses WordPress standard Dashicons
  • Collapse state persisted per-menu in localStorage (restored on page reload)
  • Auto-expand parent before drag to keep child items moving together

πŸ“Έ Screenshots

Five buttons added to menu items
Five buttons added to the menu editing interface (New, Clone, Copy, Paste, Delete)

Visual highlight of copied items
Visual highlight of copied menu items

Confirmation dialog
Confirmation dialog when deleting


πŸ“₯ Installation

From WordPress.org (Recommended)

  1. Go to WordPress Admin β†’ Plugins β†’ Add New
  2. Search for "MenuItem Copy & Paste"
  3. Click "Install Now" and then "Activate"
  4. Go to Appearance β†’ Menus to start using the new buttons

Manual Installation

  1. Download the latest release from the releases page
  2. Upload the plugin files to /wp-content/plugins/menuitem-copy-paste/
  3. Activate the plugin through the 'Plugins' menu in WordPress
  4. Go to Appearance β†’ Menus to start using the new buttons

From GitHub

cd /path/to/wordpress/wp-content/plugins/
git clone https://github.com/sarap422/wp-plugin-menuitem-copy-paste.git menuitem-copy-paste

Then activate the plugin through the WordPress admin panel.


πŸ”§ Requirements

  • WordPress: 5.0 or higher
  • PHP: 7.4 or higher
  • Tested up to: WordPress 6.8

❓ Frequently Asked Questions

Which WordPress versions are supported?

WordPress 5.0 or higher. Tested up to the latest version (6.8).

Can deleted items be restored?

When you click the delete button, a confirmation dialog appears. Once deleted, items cannot be restored. However, if you don't click "Save Menu" in WordPress, you can reload the page to revert changes.

Can I paste copied items to different menus?

Yes. After copying a menu item, you can switch to a different menu and paste it there.

What are the default values for items created with the New button?

Title: "New Custom Link", URL: "/". You can edit these after creation by opening the accordion.

Can I copy child menu items?

The current version copies individual menu items only. The Clone button duplicates only the selected item, excluding child hierarchies.

What if the buttons don't appear?

Clear your browser cache. If they still don't appear, there may be a conflict with other plugins. Try temporarily disabling other plugins to identify the issue.

How does the Collapse feature work?

Parent menu items that contain child items get a β–²/β–Ό toggle button on the right end of the button group. Click it to fold or unfold all descendants. The collapsed state is saved per-menu in your browser's localStorage, so it persists across page reloads. Items without children do not show the toggle button.

Will collapsed items break drag & drop?

No. When you start dragging a collapsed parent, it auto-expands first so that its children move together with it. After the drag, the toggle button visibility is re-evaluated based on the new hierarchy.


πŸ“ Changelog

1.0.7 (2026-05-20)

  • β–²β–Ό Added Collapse feature: fold/unfold child menu items under any parent menu item
  • πŸ’Ύ Collapse state is persisted per-menu in localStorage and restored on page reload
  • 🧲 Auto-expansion before drag to safely move parents with their descendants
  • 🎯 Toggle button auto-shows/hides based on whether the item has children
  • πŸ“ Adjusted button container width to accommodate the 6th button

1.0.6 (2025-11-04)

  • βž• Added New feature: instantly create custom links below items
  • πŸ“’ Added Clone feature: duplicate menu items immediately below
  • πŸ—‘οΈ Added Delete feature: remove items without opening accordions
  • 🎨 Added visual highlight (blue background) for copied items
  • πŸ“‹ Improved button tooltips with detailed descriptions
  • πŸ”’ Enhanced security: strengthened $_POST variable validation
  • βœ… Improved code quality: compliance with WordPress Coding Standards

1.0.4

  • Added accurate position calculation considering hierarchical structure
  • Implemented recursive descendant retrieval

1.0.3

  • Initial release
  • Menu item copy & paste functionality

View full changelog β†’


🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the GPL v2 or later - see the LICENSE file for details.


πŸ”— Links


πŸ’– Support

If you find this plugin helpful, please:


Made with ❀️ by sarap422