[wp-trac] [WordPress Trac] #19272: Add Filter to Nav Menu Support Themes Text

WordPress Trac noreply at wordpress.org
Mon Sep 21 10:11:13 UTC 2015


#19272: Add Filter to Nav Menu Support Themes Text
-------------------------------------------------+-------------------------
 Reporter:  wpsmith                              |       Owner:
     Type:  enhancement                          |  DrewAPicture
 Priority:  normal                               |      Status:  assigned
Component:  Menus                                |   Milestone:  4.4
 Severity:  trivial                              |     Version:
 Keywords:  good-first-bug has-patch needs-docs  |  Resolution:
  dev-feedback                                   |     Focuses:
-------------------------------------------------+-------------------------
Changes (by DrewAPicture):

 * keywords:  good-first-bug good-first-patch has-patch needs-docs => good-
     first-bug has-patch needs-docs dev-feedback


Comment:

 As of [31951] we're using the decoupled strings from the Customizer here,
 which actually means we're using one of two different strings.
 @SergeyBiryukov: What would be your best suggestion if we wanted to make
 this text filterable? My first thought was to package them into an array
 and make ''that'' filterable, but I'm not sure I like that.

 Currently:
 {{{
 #!php
 if ( 1 == $num_locations ) {
         echo '<p>' . __( 'Your theme supports one menu. Select which menu
 you would like to use.' ) . '</p>';
 } else {
         echo '<p>' .  sprintf( _n( 'Your theme supports %s menu. Select
 which menu appears in each location.', 'Your theme supports %s menus.
 Select which menu appears in each location.', $num_locations ),
 number_format_i18n( $num_locations ) ) . '</p>';
 }
 }}}

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


More information about the wp-trac mailing list