[wp-trac] [WordPress Trac] #52694: Twenty Twenty-One: Primary menu toggle filter adds toggles to third party menu locations

WordPress Trac noreply at wordpress.org
Wed Mar 3 04:57:40 UTC 2021


#52694: Twenty Twenty-One: Primary menu toggle filter adds toggles to third party
menu locations
---------------------------+------------------------------
 Reporter:  domainsupport  |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Bundled Theme  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------

Comment (by mukesh27):

 I like the approach of @domainsupport. We can marge theme location
 condition in if statement like below.


 {{{
 if ( isset( $args->theme_location ) && 'primary' === $args->theme_location
 && 0 === $depth && in_array( 'menu-item-has-children', $item->classes,
 true ) ) {
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52694#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list