| 开发者 | mralaminahamed |
|---|---|
| 更新时间 | 2026年8月3日 18:21 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
swift-menu-duplicator directory to /wp-content/plugins/.No. Theme location assignments are site-specific and intentionally not copied, so the duplicate does not silently replace an active menu in any location.
All parent-child relationships are preserved exactly. The plugin uses a two-pass approach: items are cloned first, then parent ID references are re-mapped to the newly created item IDs.
Yes. A name field is shown in the duplicate modal. You can also change the default suffix globally by filtering swift_menu_duplicator_new_menu_name.
Yes. Translation and language meta keys are automatically stripped from duplicated items so the copy starts as a clean, language-neutral menu.
Yes. Block themes render Navigation blocks (wp_navigation posts) rather than classic menus, and the Menu Manager has a Navigation (Block) tab for exactly those: duplicate, export, import, bulk duplicate, and move to trash, with an Edit in Site Editor link on every row. Classic menus keep their own tab, so a site part-way through a theme migration can manage both.
The tab appears when the active theme is a block theme, or whenever the site already has block navigation menus — a classic theme can still have them left over from a previous theme.
Yes. The plugin only interacts with nav_menu_item posts and the nav_menu taxonomy. It has no dependency on WooCommerce or its High-Performance Order Storage.
Yes. All items are duplicated regardless of their post status.
Authenticate with a cookie session or an Application Password, then send:
POST /wp-json/swift-menu-duplicator/v1/menus/{menu_id}/duplicate
The response includes the new menu's id, name, and edit_url.
Export the source menu to JSON (admin UI or wp swift-menu-duplicator export), transfer the file, then import it on the target site. Use the find/replace fields to rewrite domain-specific URLs during import.
edit_theme_options for all duplication, snapshot, export, and import actions. Multisite copy-to-site additionally requires the network manage_network capability.
wp_navigation posts — the ones block themes actually render — can be duplicated, exported, and imported from a dedicated Menu Manager tab, WP-CLI, and REST.snapshot list|save|restore|delete and navigation list|duplicate|export|import.wp_update_nav_menu_item() instead of inserting posts and postmeta directly, so WPML, Polylang, caching, and mega-menu plugins finally see cloned items.cmd/v1 to swift-menu-duplicator/v1. Update any REST clients.wp swift-menu-duplicator, not wp menu-duplicator.wp menu-duplicator to wp swift-menu-duplicator for consistency with the plugin slug.composer.lock was excluded by .gitignore glob pattern causing the SVN deploy workflow to fail./wp-json/cmd/v1/ — duplicate menu, export menu, duplicate item.wp swift-menu-duplicator — duplicate, export, import, copy-to-site.