Changeset 11095 for trunk/wp-includes/widgets.php
- Timestamp:
- 04/27/2009 10:56:29 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/widgets.php
r11090 r11095 165 165 $settings = $this->get_settings(); 166 166 167 if ( array_key_exists( $this->number, $settings ) ) 168 $this->widget($args, $settings[$this->number]); 167 if ( array_key_exists( $this->number, $settings ) ) { 168 $settings = $settings[$this->number]; 169 // filters the widget's settings, return false to stop displaying the widget 170 $settings = apply_filters('widget_display_callback', $settings, &$this); 171 if ( false !== $settings ) 172 $this->widget($args, $settings); 173 } 169 174 } 170 175 … … 223 228 $instance = $this->update($new_instance, array()); 224 229 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); 225 232 if ( false !== $instance ) 226 233 $all_instances[$number] = $instance; … … 251 258 } 252 259 253 return $this->form($instance); 260 // filters the widget admin form before displaying, return false to stop displaying it 261 $instance = apply_filters('widget_form_callback', $instance, &$this); 262 if ( false !== $instance ) 263 $this->form($instance); 254 264 } 255 265
Note: See TracChangeset
for help on using the changeset viewer.