Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/dlinstedt/aplusplg-block-meta-toggle/archive/refs/heads/main.zipBlock Meta Toggle (aplusplg-block-meta-toggle)
A lightweight WordPress utility that adds a Toggle Meta Boxes button to the Block Editor toolbar. The button uses WordPress's existing meta-box collapse/expand control rather than imposing its own height rules. The native resize handle remains draggable, and WordPress retains the open panel height selected by the user.
The plugin does not relocate meta boxes, manipulate their visibility attributes, or intercept editor save behavior.
Screenshots
Figure 1: Double Vertical Arrows toggle injected into the top toolbar.
Figure 2: Expanded full-height meta box viewport.
Key Features
- Zero DOM Relocation: Keeps
#poststuffand all meta fields in their native DOM location. Fully preserves ACF repeater fields, Select2 dropdowns, color pickers, and third-party JS listeners. - 100% Core Save Compatible: No hijacked submission handlers or broken auto-save states. Standard WordPress Update/Publish buttons handle all data seamlessly.
- Native Resize Support: The WordPress drag handle and resize state remain fully under WordPress control.
- Two-State Toolbar Toggle: Collapses the meta-box panel or reopens it at the height managed by WordPress.
- Lightweight & Clean: Class-based Singleton architecture with zero database settings or admin clutter.
Installation
As a Standard Plugin
- Download or clone this repository.
- Upload the
aplusplg-block-meta-toggledirectory to your site's/wp-content/plugins/folder. - Activate Block Meta Toggle via Plugins > Installed Plugins in the WordPress admin dashboard.
As an MU-Plugin
Place the whole plugin directory in /wp-content/mu-plugins/ and load the main PHP file from a small root-level MU loader. Do not copy just the PHP file: it requires its bundled JavaScript and CSS.
How It Works
- The plugin waits for the Block Editor's native meta-box expand/collapse control to be mounted.
- It adds a Toggle Meta Boxes button to the editor toolbar.
- Clicking the button activates WordPress's native panel control. The panel closes to its native minimum or reopens using WordPress's preferred height.
- The native drag bar remains operable at all times. Dragging adjusts panel height without the plugin overriding that value.
- Where WordPress provides no native resizable meta-box panel, no toggle is inserted.
Requirements
- WordPress: 6.0+ (Tested up to 7.1)
- PHP: 7.4 or higher
- Compatible with Advanced Custom Fields (ACF), Rank Math, Yoast, and custom
add_meta_box()calls.
License
GPL-2.0-or-later — Free for personal and commercial use.