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 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.