bmd / navigation-block-enhancements
Enhance the core navigation block for vertical dropdown support
Package info
github.com/bob-moore/Navigation-Block-Enhancements
pkg:composer/bmd/navigation-block-enhancements
0.1.4
2026-04-23 13:40 UTC
Requires (Dev)
- phpcsstandards/phpcsutils: ^1.0
- phpstan/phpstan: ^1.10
- squizlabs/php_codesniffer: ^3.7
- symfony/var-dumper: *
- szepeviktor/phpstan-wordpress: ^1.3
- wp-coding-standards/wpcs: ^3.0
README
Navigation Block Enhancements is a WordPress plugin and Composer library that modifies rendered output for the core Navigation block and enqueues shared navigation styles.
What It Does
- Hooks into
render_block_core/navigationand processes navigation markup withWP_HTML_Tag_Processor. - For vertical navigation output, removes
data-wp-on--focusouthandlers in the menu subtree. - Registers block-scoped styles for
core/navigationfrom this package'sbuild/style-index.css. - Supports explicit plugin URI/path configuration via constructor arguments and setters.
- Exposes a
BasicPlugininterface so consuming packages can type against a shared plugin contract.
Requirements
- WordPress 6.7+
- PHP 8.2+
Installation
Use as a standard plugin
- Build assets:
npm run build
- Package:
npm run plugin-zip
- Upload and activate in wp-admin: Plugins > Add New Plugin > Upload Plugin.
Use via Composer in your own plugin or theme
This package is published as a Composer library in composer.json:
{
"name": "bmd/navigation-block-enhancements",
"type": "library"
}
- Require it in your consuming project:
composer require bmd/navigation-block-enhancements
- Load Composer autoloading in your bootstrap (if not already loaded):
require_once __DIR__ . '/vendor/autoload.php';
- Instantiate and register hooks where appropriate:
use Bmd\NavBlockEnhancements; $enhancements = new NavBlockEnhancements(); $enhancements->mount();
Changelog
0.1.4
- Added the
BasicPlugininterface and updatedNavBlockEnhancementsto implement it. - Bumped release metadata to
0.1.4. - Updated documentation for interface-based integration in consuming packages.
0.1.3
- Bumped plugin and Composer package versions to
0.1.3. - Updated package docs and release metadata for the current API.
- Clarified explicit URI/path configuration for package asset loading.
0.1.1
- Added
mount()method toNavBlockEnhancementsthat registers all WordPress hooks in one call (enqueue_block_assetsandrender_block_core/navigation). - Simplified plugin bootstrap: replaced individual
add_action/add_filtercalls with$plugin->mount(). - When using the library via Composer, call
$enhancements->mount()after instantiation instead of wiring hooks manually.
0.1.0
- Initial release.
- Added vertical navigation output processing.
- Added shared navigation stylesheet enqueue for core/navigation.
License
GPL-2.0-or-later. See https://www.gnu.org/licenses/gpl-2.0.html.