KupieTools Editor File Manager
WordPress plugin to add a popup menu with Create New, Rename, and Download file options to the files listed in the admin Plugin File Editor and Theme File Editor admin screens.
by Michael Kupietz · github.com/kupietools/ktwp-wp-plugin-editor-filemgr · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/kupietools/ktwp-wp-plugin-editor-filemgr/archive/refs/heads/main.zipDeclares an update source (https://michaelkupietz.com/my-plugin/kupietools-editor-filemgr/), so updates arrive through the plugin's own updater.
Readme
KupieTools Editor File Manager
A powerful enhancement for WordPress's built-in theme and plugin editors that adds essential file management capabilities directly within the editor interface.
Features
- Adds file operation buttons to both plugin and theme editor screens
- Create new files in any directory with a simple dialog
- Rename existing files easily without FTP or server access
- Download files directly from the editor interface
- Clean, unobtrusive UI that integrates with WordPress admin
- Security measures including nonce verification and proper file permission checks
- Support for appropriate file extensions based on context (plugin vs theme)
- Fully interactive file tree that updates dynamically
How It Works
The plugin enhances WordPress's built-in code editors by:
- Adding action buttons that appear when hovering over files in the editor sidebar
- Providing simple dialogs for file operations like renaming and creating files
- Handling file operations securely with proper permission checks
- Maintaining the state of the editor after operations
- Supporting direct file downloads with proper headers
Developer Benefits
- Streamline your workflow by eliminating the need to switch between WordPress and FTP
- Create new theme/plugin files on the fly as you work
- Organize your code better with easy file renaming
- Download files for backup or offline editing
- Work more efficiently with a complete file management solution
Security Features
- WordPress nonce verification for all operations
- Validation of file extensions to prevent security issues
- File permission checks before operations
- Proper sanitization of inputs
- Admin-only access controls
Installation
- Upload the plugin files to the
/wp-content/plugins/ktwp-editor-filemgrdirectory - Activate the plugin through the WordPress admin interface
- Navigate to Appearance > Theme Editor or Plugins > Plugin Editor to see the new file management options
Usage
- Hover over any file in the editor sidebar to reveal file operation buttons
- Click "New File" to create a file in the current directory
- Click "Rename" to change a file's name
- Click "Download" to download the file to your computer
- Complete the operation in the dialog that appears
Configuration
You can modify the plugin's behavior by editing the constant at the top of the plugin file:
- Set
FILEOPS_LOAD_NEW_FILEtotrueto automatically load a file after creating or renaming it - Set it to
falseto stay on the current file
License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.