Make WordPress Core

Ticket #31675: 31675.2.diff

File 31675.2.diff, 548 bytes (added by valendesigns, 10 years ago)
  • src/wp-includes/widgets.php

    diff --git src/wp-includes/widgets.php src/wp-includes/widgets.php
    index 40bf54c..f89d8e8 100644
    function register_sidebar($args = array()) { 
    803803
    804804        $i = count($wp_registered_sidebars) + 1;
    805805
     806        // Ensure we have a valid ID.
     807        if ( empty( $args['id'] ) ) {
     808                _doing_it_wrong( __FUNCTION__, __( 'You should specify the sidebars id in the arguments array.' ), '4.2.0' );
     809        }
     810
    806811        $defaults = array(
    807812                'name' => sprintf(__('Sidebar %d'), $i ),
    808813                'id' => "sidebar-$i",