[wp-trac] [WordPress Trac] #58887: Add a Pattern menu item to the "+ New" menu in the WP admin toolbar
WordPress Trac
noreply at wordpress.org
Thu Aug 17 23:11:01 UTC 2023
#58887: Add a Pattern menu item to the "+ New" menu in the WP admin toolbar
-------------------------------------------------+-------------------------
Reporter: poena | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.4
Component: Toolbar | Version:
Severity: normal | Resolution:
Keywords: has-patch has-testing-info has- | Focuses:
screenshots |
-------------------------------------------------+-------------------------
Comment (by sabernhardt):
I do not like tacking on another item that those plugins would need to
remove, but adding something like the following code to a plugin is
probably easier than the removal of some stylesheets or the duotone SVGs.
{{{
function wptrac_remove_toolbar_pattern_link_node( $wp_admin_bar ) {
$wp_admin_bar->remove_node( 'new-wp_block' );
}
function wptrac_revise_new_content_menu() {
add_action( 'admin_bar_menu',
'wptrac_remove_toolbar_pattern_link_node', 70 );
}
add_action( 'add_admin_bar_menus', 'wptrac_revise_new_content_menu' );
}}}
Then the first patch might be fine.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58887#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list