[wp-trac] [WordPress Trac] #54684: Add ability to filter blocks in WP_Block_List
WordPress Trac
noreply at wordpress.org
Sat Dec 25 16:07:17 UTC 2021
#54684: Add ability to filter blocks in WP_Block_List
-------------------------+-----------------------------
Reporter: afragen | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 5.9
Component: Menus | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses: administration
-------------------------+-----------------------------
Changes (by afragen):
* keywords: has-patch dev-feedback => has-patch
Comment:
The filter is only designed to modify the array of `$blocks` that are
passed as a menu. It doesn't effect any visible component in the editor.
In addition to changing the passed array you can add to it. I have a small
plugin that adds a **Log in / Log out** item to any displayed menu or
navigation menu block.
https://github.com/afragen/login-logout-primary-menu-item
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54684#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list