Changeset 10810 for trunk/wp-includes/widgets.php
- Timestamp:
- 03/18/2009 02:43:45 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/widgets.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/widgets.php
r10808 r10810 46 46 /** 47 47 * Singleton that registers and instantiates WP_Widget classes. 48 * 48 * 49 49 * @package WordPress 50 50 * @subpackage Widgets … … 71 71 * This class must be extended for each widget and WP_Widget::widget(), WP_Widget::update() 72 72 * and WP_Widget::form() need to be over-ridden. 73 * 73 * 74 74 * @package WordPress 75 75 * @subpackage Widgets … … 289 289 _register_widget_form_callback( $this->id, $this->name, $this->_get_form_callback(), $this->control_options, array( 'number' => $number ) ); 290 290 } 291 291 292 292 function save_settings($settings) { 293 293 $settings['_multiwidget'] = 1; … … 296 296 297 297 function get_settings() { 298 $settings = get_option($this->option_name); 298 $settings = get_option($this->option_name); 299 299 300 300 if ( !is_array($settings) ) … … 315 315 /** 316 316 * Register a widget 317 * 317 * 318 318 * Registers a WP_Widget widget 319 * 319 * 320 320 * @since 2.8.0 321 * 321 * 322 322 * @see WP_Widget 323 323 * @see WP_Widget_Factory 324 324 * @uses WP_Widget_Factory 325 * 325 * 326 326 * @param string $widget_class The name of a class that extends WP_Widget 327 327 */ … … 923 923 if ( $single ) { 924 924 $settings = array( 2 => $settings ); 925 925 926 926 $sidebars_widgets = get_option('sidebars_widgets'); 927 927 foreach ( (array) $sidebars_widgets as $index => $sidebar ) { … … 941 941 $settings['_multiwidget'] = 1; 942 942 update_option( $option_name, $settings ); 943 943 944 944 return $settings; 945 945 } … … 948 948 * Deprecated API 949 949 */ 950 950 951 951 /** 952 952 * Register widget for sidebar with backwards compatibility.
Note: See TracChangeset
for help on using the changeset viewer.