Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/mgiannopoulos24/navsweeper/releases/download/v1.1.0/navsweeper.zipA WordPress plugin that expands your menu capabilities. Bulk select, delete, move, and edit navigation menu items easily.
Description
NavSweeper provides powerful bulk operations for WordPress navigation menus, making it easy to manage large menus efficiently. Instead of editing menu items one by one, you can select multiple items and perform bulk actions.
Features
- Bulk Delete: Select and delete multiple menu items at once
- Bulk Move: Move multiple menu items to different menus or reset their hierarchy
- Bulk Edit: Update label, URL, CSS classes, link target, and description for multiple items simultaneously
- Add Menu Items: Quickly add new custom menu items with full control over positioning
- Easy Selection: Intuitive checkbox interface for selecting menu items
- Menu Support: Ensures menu support is enabled even for block themes
Installation
WordPress Installation
- Download the plugin zip file or clone this repository
- Upload the
navsweeperfolder to the/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Navigate to Appearance → NavSweeper to start managing your menus
Development Setup
This project uses Bun as the package manager and @wordpress/env for local WordPress development.
Prerequisites
- Bun installed on your system
- Docker and Docker Compose (required for wp-env)
Setup Steps
-
Clone the repository
git clone https://github.com/mgiannopoulos24/navsweeper.git cd navsweeper -
Install dependencies
bun install -
Start the local WordPress environment
bun run startThis will start a WordPress instance at
http://localhost:8888 -
Setup test menus (optional)
bun run seedThis creates sample menus for testing purposes.
Available Scripts
Development Scripts
bun run start- Start the local WordPress environment using wp-envbun run seed- Run the setup script to create test menusbun run stop- Stop the WordPress environmentbun run destroy- Destroy the WordPress environment (removes all data)bun run shell- Open a bash shell in the WordPress CLI container
Build Scripts
bun run bundle- Create a distribution zip file (navsweeper.zip) containing the plugin filesbun run lint:php- Run PHP linting on all PHP files in the project
Usage
- Navigate to Appearance → NavSweeper in your WordPress admin
- Select a menu from the dropdown
- Use the checkboxes to select menu items you want to modify
- Choose an action:
- Delete: Remove selected items from the menu
- Move: Move selected items to another menu or reset their hierarchy
- Edit: Bulk edit properties like label, URL, CSS classes, etc.
- Add Item: Add a new custom menu item with positioning options
Project Structure
navsweeper/
├── assets/ # CSS and JavaScript files
│ ├── css/ # Stylesheets
│ └── js/ # JavaScript files
├── includes/ # PHP class files
│ └── class-navsweeper-plugin.php
├── views/ # Admin view templates
│ └── admin-view.php
├── scripts/ # Setup and utility scripts
│ └── setup-menus.php
├── navsweeper.php # Main plugin file
├── package.json # Dependencies and scripts
└── .wp-env.json # WordPress environment configuration
Requirements
- WordPress 5.0 or higher
- PHP 8.3 or higher (for development)
- Bun (for development)
Development
The plugin uses WordPress's standard plugin structure and follows WordPress coding standards. The local development environment is configured to use:
- WordPress latest version
- PHP 8.3
- Twenty Twenty-Five theme
- Debug mode enabled
License
This plugin is licensed under the GPL v3 license.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Releases
2 releases. Each count is every asset in that release; expand a row for the breakdown.