Index: trunk/src/wp-includes/widgets.php
===================================================================
--- trunk/src/wp-includes/widgets.php (revision 31905)
+++ trunk/src/wp-includes/widgets.php (revision 32110)
@@ -804,8 +804,5 @@
$i = count($wp_registered_sidebars) + 1;
- if ( empty( $args['id'] ) ) {
- /* translators: %s: the id argument */
- _doing_it_wrong( __FUNCTION__, sprintf( __( 'You should set %s in the arguments array.' ), 'id
' ), '4.2.0' );
- }
+ $id_is_empty = empty( $args['id'] );
$defaults = array(
@@ -821,4 +818,9 @@
$sidebar = wp_parse_args( $args, $defaults );
+
+ if ( $id_is_empty ) {
+ /* translators: %1$s: the id argument */
+ _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.' ), 'id
', $sidebar['name'], $sidebar['id'] ), '4.2.0' );
+ }
$wp_registered_sidebars[$sidebar['id']] = $sidebar;