Changeset 45926 for trunk/src/wp-includes/widgets.php
- Timestamp:
- 09/01/2019 05:12:43 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets.php
r45798 r45926 176 176 177 177 if ( $number > 1 ) { 178 $_args['name'] = isset( $args['name'] ) ? sprintf( $args['name'], $i ) : sprintf( __( 'Sidebar %d' ), $i ); 178 if ( isset( $args['name'] ) ) { 179 $_args['name'] = sprintf( $args['name'], $i ); 180 } else { 181 /* translators: %d: Sidebar number */ 182 $_args['name'] = sprintf( __( 'Sidebar %d' ), $i ); 183 } 179 184 } else { 180 185 $_args['name'] = isset( $args['name'] ) ? $args['name'] : __( 'Sidebar' ); … … 248 253 249 254 $defaults = array( 255 /* translators: %d: Sidebar number */ 250 256 'name' => sprintf( __( 'Sidebar %d' ), $i ), 251 257 'id' => "sidebar-$i", … … 261 267 262 268 if ( $id_is_empty ) { 263 /* translators: 1: the id argument, 2: sidebar name, 3: recommended id value */ 264 _doing_it_wrong( __FUNCTION__, sprintf( __( 'No %1$s was set in the arguments array for the "%2$s" sidebar. Defaulting to "%3$s". Manually set the %1$s to "%3$s" to silence this notice and keep existing sidebar content.' ), '<code>id</code>', $sidebar['name'], $sidebar['id'] ), '4.2.0' ); 269 _doing_it_wrong( 270 __FUNCTION__, 271 sprintf( 272 /* translators: 1: the id argument, 2: sidebar name, 3: recommended id value */ 273 __( 'No %1$s was set in the arguments array for the "%2$s" sidebar. Defaulting to "%3$s". Manually set the %1$s to "%3$s" to silence this notice and keep existing sidebar content.' ), 274 '<code>id</code>', 275 $sidebar['name'], 276 $sidebar['id'] 277 ), 278 '4.2.0' 279 ); 265 280 } 266 281 … … 1105 1120 1106 1121 if ( ! isset( $wp_widget_factory->widgets[ $widget ] ) ) { 1107 /* translators: %s: register_widget() */ 1108 _doing_it_wrong( __FUNCTION__, sprintf( __( 'Widgets need to be registered using %s, before they can be displayed.' ), '<code>register_widget()</code>' ), '4.9.0' ); 1122 _doing_it_wrong( 1123 __FUNCTION__, 1124 sprintf( 1125 /* translators: %s: register_widget() */ 1126 __( 'Widgets need to be registered using %s, before they can be displayed.' ), 1127 '<code>register_widget()</code>' 1128 ), 1129 '4.9.0' 1130 ); 1109 1131 return; 1110 1132 }
Note: See TracChangeset
for help on using the changeset viewer.