Hook Visual Editor
Hook Visual Editor bridges the gap between developer tools and visual site builders, making WordPress hooks accessible to non-developers while providing powerful debugging tools for developers.
by Your Name · github.com/divangrastogi/hook-visual-editor · 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/divangrastogi/hook-visual-editor/archive/refs/heads/main.zipA professional WordPress plugin that provides a visual, live interface for editing and injecting content into WordPress hooks.
Description
Hook Visual Editor bridges the gap between developer tools and visual site builders, making WordPress hooks accessible to non-developers while providing powerful debugging tools for developers.
Features
- Visual Hook Editing: Live, visual interface for editing hook content
- Multiple Scopes: Global, post-type, and post-specific hook content
- Rich Text Editor: WYSIWYG editor with formatting options
- Shortcode Support: Full WordPress shortcode integration
- Live Preview: See changes instantly with real-time preview
- Hook Detection: Automatic detection of available hooks on any page
- Admin Integration: Seamless integration with WordPress admin
- Security: Proper sanitization, escaping, and capability checks
Installation
- Upload the
hook-visual-editorfolder to the/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Go to any page or post on your site
- Click the "Edit Hooks" link in the admin bar to open the visual editor
Usage
Basic Usage
- Navigate to any page or post on your WordPress site
- Click the "Edit Hooks" link in the WordPress admin bar
- Select a hook from the categorized list (Core, Theme, Plugins)
- Add your content using the visual, HTML, or shortcode editor
- Choose the scope (Global, Post Type, or Current Post)
- Set the priority if needed
- Save your changes
Scopes Explained
- Global: Content appears on all pages where the hook is fired
- Post Type: Content appears on all posts of a specific post type
- Current Post: Content appears only on the specific post being edited
Available Hooks
The plugin detects and allows editing of common WordPress hooks including:
WordPress Core Hooks
wp_head- Add content to the <head> sectionwp_footer- Add content before closing </body> tagthe_content- Modify post contentwp_body_open- Add content after opening <body> tag
Theme Hooks
genesis_before_header- Genesis frameworkastra_header_after- Astra theme- And many more depending on your theme
Plugin Hooks
woocommerce_before_main_content- WooCommercelearndash_before_main_content- LearnDash- And hooks from other active plugins
Settings
Access the settings page from the admin menu under "Hook Editor > Settings":
- Enable Editor: Toggle the visual editor functionality
- Enable Logging: Log all hook editing actions (for debugging)
Security
- All content is properly sanitized and escaped
- Only users with
manage_optionscapability can access the editor - Nonce verification on all AJAX requests
- Input validation and sanitization throughout
Frequently Asked Questions
Is this safe to use?
Yes, all content is properly sanitized and escaped. Only administrators can access the editor.
Can I use shortcodes?
Yes, shortcodes are fully supported and will be processed when the content is displayed.
What happens if I deactivate the plugin?
All hook content is safely stored and will be restored when you reactivate the plugin.
Can I edit theme hooks?
Yes, the plugin detects hooks from your active theme and allows editing them.
Is there a limit to content length?
No specific limit, but very large content may impact performance.
Screenshots
- Main Editor Interface - The visual hook editor panel
- Hook Selection - Browse and select from available hooks
- Content Editing - Rich text editor with multiple tabs
- Settings Page - Configure plugin options
Changelog
1.0.0
- Initial release
- Visual hook editing interface
- Multiple scope support
- Rich text editor integration
- AJAX-powered saving
- Live preview functionality
- Admin bar integration
Upgrade Notice
1.0.0
Initial release - no upgrade needed.
Support
For support, please use the WordPress support forums or create an issue on GitHub.
Contributing
Contributions are welcome! Please feel free to submit pull requests.
License
This plugin is licensed under the GPL v2 or later.
Credits
Developed by [Your Name]