Ticket #9651: remove-pass-by-reference.diff
File remove-pass-by-reference.diff, 2.3 KB (added by , 16 years ago) |
---|
-
widgets.php
167 167 if ( array_key_exists( $this->number, $settings ) ) { 168 168 $settings = $settings[$this->number]; 169 169 // filters the widget's settings, return false to stop displaying the widget 170 $settings = apply_filters('widget_display_callback', $settings, &$this);170 $settings = apply_filters('widget_display_callback', $settings, $this); 171 171 if ( false !== $settings ) 172 172 $this->widget($args, $settings); 173 173 } … … 228 228 $instance = $this->update($new_instance, array()); 229 229 230 230 // filters the widget's settings before saving, return false to cancel saving (keep the old settings if updating) 231 $instance = apply_filters('widget_update_callback', $instance, $new_instance, &$this);231 $instance = apply_filters('widget_update_callback', $instance, $new_instance, $this); 232 232 if ( false !== $instance ) 233 233 $all_instances[$number] = $instance; 234 234 } … … 258 258 } 259 259 260 260 // filters the widget admin form before displaying, return false to stop displaying it 261 $instance = apply_filters('widget_form_callback', $instance, &$this);261 $instance = apply_filters('widget_form_callback', $instance, $this); 262 262 if ( false !== $instance ) 263 263 $this->form($instance); 264 264 } … … 277 277 278 278 function get_settings() { 279 279 $settings = get_option($this->option_name); 280 280 281 281 if ( false === $settings && isset($this->alt_option_name) ) 282 282 $settings = get_option($this->alt_option_name); 283 283 … … 801 801 * in which the first instance of the widget with the given callback or $id_base is found. 802 802 * With the $widget_id parameter, returns the ID of the sidebar where 803 803 * the widget with that callback/$id_base AND that ID is found. 804 * 804 * 805 805 * NOTE: $widget_id and $id_base are the same for single widgets. To be effective 806 806 * this function has to run after widgets have initialized, at action 'init' or later. 807 807 * … … 1021 1021 $GLOBALS['_wp_sidebars_widgets'] = get_option('sidebars_widgets'); 1022 1022 $sidebars_widgets = &$GLOBALS['_wp_sidebars_widgets']; 1023 1023 } 1024 1024 1025 1025 foreach ( (array) $sidebars_widgets as $index => $sidebar ) { 1026 1026 if ( is_array($sidebar) ) { 1027 1027 foreach ( $sidebar as $i => $name ) {