[wp-trac] [WordPress Trac] #42991: Customizer: Search Menu item not working on Custom Link

WordPress Trac noreply at wordpress.org
Mon Jan 22 22:48:30 UTC 2018


#42991: Customizer: Search Menu item not working on Custom Link
-------------------------------------+------------------------
 Reporter:  monikarao                |       Owner:  melchoyce
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  4.9.3
Component:  Customize                |     Version:  trunk
 Severity:  normal                   |  Resolution:
 Keywords:  needs-testing has-patch  |     Focuses:  ui
-------------------------------------+------------------------

Comment (by westonruter):

 @audrasjb I suggest removing some of the duplication, following something
 like this:

 {{{#!php
 <?php
 if ( isset( $args['s'] ) ) {
         $title = _x( 'Home', 'nav menu home label' );
         $matches = function_exists( 'mb_stripos' ) ? false !== mb_stripos(
 $title, $args['s'] ) : false !== stripos( $title, $args['s'] );
         if ( $matches ) {
                 $items[] = array(
                         // ...
                         'title'      => $title,
                         // ...
                 );
         }
 }
 }}}

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


More information about the wp-trac mailing list