Make WordPress Core

Changeset 31850


Ignore:
Timestamp:
03/20/2015 06:29:13 PM (10 years ago)
Author:
markjaquith
Message:

Trigger _doing_it_wrong() if register_sidebar() is not passed an id

  • If you don't pass an id, WP sets an auto-increment one for you.
  • But this depends on order of sidebar definition.
  • Change the order or remove a sidebar? They jumble.

fixes #31675
props tschutter, valendesigns

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets.php

    r31826 r31850  
    803803
    804804    $i = count($wp_registered_sidebars) + 1;
     805
     806    if ( empty( $args['id'] ) ) {
     807        _doing_it_wrong( __FUNCTION__, sprintf( __( 'You should set %s in the arguments array.' ), 'id' ), '4.2.0' );
     808    }
    805809
    806810    $defaults = array(
Note: See TracChangeset for help on using the changeset viewer.