Make WordPress Core

Ticket #31675: 31675.3.diff

File 31675.3.diff, 516 bytes (added by markjaquith, 10 years ago)
  • src/wp-includes/widgets.php

    diff --git src/wp-includes/widgets.php src/wp-includes/widgets.php
    index 40bf54c..7c282c5 100644
    function register_sidebar($args = array()) { 
    803803
    804804        $i = count($wp_registered_sidebars) + 1;
    805805
     806        if ( empty( $args['id'] ) ) {
     807                _doing_it_wrong( __FUNCTION__, sprintf( __( 'You should set %s in the arguments array.' ), 'id' ), '4.2.0' );
     808        }
     809
    806810        $defaults = array(
    807811                'name' => sprintf(__('Sidebar %d'), $i ),
    808812                'id' => "sidebar-$i",