Changeset 7055 for sites/trunk/wp15.wordpress.net/public_html/content/themes/twentyseventeen-wp15/functions.php
- Timestamp:
- 04/06/2018 08:34:50 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wp15.wordpress.net/public_html/content/themes/twentyseventeen-wp15/functions.php
r7031 r7055 9 9 add_filter( 'get_custom_logo', __NAMESPACE__ . '\set_custom_logo' ); 10 10 add_filter( 'body_class', __NAMESPACE__ . '\add_body_classes' ); 11 add_filter( 'wp_get_nav_menu_items', __NAMESPACE__ . '\internationalize_menu_items' ); 11 12 12 13 … … 103 104 104 105 /** 106 * Internationalize the menu item titles. 107 * 108 * @param array $items 109 * 110 * @return array 111 */ 112 function internationalize_menu_items( $items ) { 113 foreach ( $items as $item ) { 114 switch ( $item->title ) { 115 case 'About': 116 // translators: The name of the page that describes the WP15 celebrations. 117 $item->title = esc_html__( 'About', 'wp15' ); 118 break; 119 120 case 'Live': 121 // translators: The name of the page that displays the #wp15 social media posts in real time. 122 $item->title = esc_html_x( 'Live', 'verb', 'wp15' ); 123 break; 124 125 case 'Swag': 126 // translators: "Swag" is a term for promotional items. This is the title of the page. 127 $item->title = esc_html__( 'Swag', 'wp15' ); 128 break; 129 } 130 } 131 132 return $items; 133 } 134 135 /** 105 136 * Data for the Swag page download items. 106 137 *
Note: See TracChangeset
for help on using the changeset viewer.