Changeset 11155
- Timestamp:
- 05/02/2009 12:21:16 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/widgets.php
r11041 r11155 167 167 168 168 $widget_title = wp_specialchars( strip_tags( $sidebar_args['widget_name'] ) ); 169 $has_form = 0;169 $has_form = 'noform'; 170 170 171 171 echo $sidebar_args['before_widget']; ?> … … 196 196 <div class="widget-control-actions"> 197 197 <a class="button widget-control-remove alignleft" href="<?php echo $edit ? clean_url( add_query_arg( array( 'remove' => $id_format, 'key' => $key, '_wpnonce' => $nonce ) ) ) : '#remove'; ?>"><?php _e('Remove'); ?></a> 198 <?php if ( false!== $has_form ) { ?>198 <?php if ( 'noform' !== $has_form ) { ?> 199 199 <input type="submit" name="savewidget" class="button-primary widget-control-save alignright" value="<?php _e('Save'); ?>" /> 200 200 <?php } ?> -
trunk/wp-includes/widgets.php
r11134 r11155 66 66 function form($instance) { 67 67 echo '<p>' . __('There are no options for this widget.') . '</p>'; 68 return false;68 return 'noform'; 69 69 } 70 70 … … 260 260 // filters the widget admin form before displaying, return false to stop displaying it 261 261 $instance = apply_filters('widget_form_callback', $instance, $this); 262 if ( false !== $instance ) 263 $this->form($instance); 262 263 $return = null; 264 if ( false !== $instance ) { 265 $return = $this->form($instance); 266 if ( 'noform' !== $return ) 267 do_action_ref_array( 'in_widget_form', array(&$this) ); // add extra fields in the widget form 268 } 269 return $return; 264 270 } 265 271
Note: See TracChangeset
for help on using the changeset viewer.