Make WordPress Core

Changes between Initial Version and Version 15 of Ticket #19272


Ignore:
Timestamp:
06/08/2022 07:54:33 PM (3 years ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #19272

    • Property Keywords good-first-bug needs-docs dev-feedback needs-refresh added
    • Property Owner set to bhargavbhandari90
    • Property Status changed from new to assigned
    • Property Milestone changed from Awaiting Review to Future Release
  • Ticket #19272 – Description

    initial v15  
    1 Frameworks could use a filter here to customize the message: _n('Your theme supports %s menu. Select which menu you would like to use.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ). For example, it may be the child theme that doesn't support the menus. Also, if none are supported (say via add_theme_support), then when it's zero, it says: "Your theme supports 0 menus. Select which menu appears in each location." (which doesn't make much sense). So adding a filter can enable theme developers to further customize.
     1Frameworks could use a filter here to customize the message: `_n('Your theme supports %s menu. Select which menu you would like to use.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations )`. For example, it may be the child theme that doesn't support the menus. Also, if none are supported (say via add_theme_support), then when it's zero, it says: "Your theme supports 0 menus. Select which menu appears in each location." (which doesn't make much sense). So adding a filter can enable theme developers to further customize.
    22
    33An example use case:
     4{{{
    45add_filter( 'nav_menu_theme_support_text' , 'wps_nav_menu_theme_support_text' );
    56function wps_nav_menu_theme_support_text ( $num_locations ) {
     
    1011        return $text;
    1112}
     13}}}