Title: id_base in $control_ops (widget developement)
Last modified: August 19, 2016

---

# id_base in $control_ops (widget developement)

 *  Resolved [Nordvind](https://wordpress.org/support/users/nordvind/)
 * (@nordvind)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/id_base-in-control_ops-widget-developement/)
 * 2.8+ widget class constructor looks like this (brought to me by some tutorials):
 *     ```
       function simple_weather() {
       		/* Widget settings. */
       		$widget_ops = array( 'classname' => 'weather-wdg', 'description' => 'Weather widget.' );
   
       		/* Widget control settings. */
       		$control_ops = array( 'width' => 200, 'height' => 300, 'id_base' => 'simple_weather' );
   
       		/* Create the widget. */
       		$this->WP_Widget( 'simple_weather', 'Simple weather', $widget_ops, $control_ops );
       	}
       ```
   
 * I don’t see that ‘id_base’ to be used anywhere further in widget. In [Codex](http://codex.wordpress.org/Widgets_API)
   sample constructor is completely different, though. And as I see, it does not
   respecify parent’s (WP_Widget’s) ‘id_base’. So can someone enlighten me, what
   is it for?
 * **P.S** Sorry for that question, didn’t expect widgets.php to be so well documented
   🙂 I got all info I needed, please close this topic. Thanks.

The topic ‘id_base in $control_ops (widget developement)’ is closed to new replies.

## Tags

 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * 0 replies
 * 1 participant
 * Last reply from: [Nordvind](https://wordpress.org/support/users/nordvind/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/id_base-in-control_ops-widget-developement/)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
