WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/02/2009 12:21:16 AM (11 years ago)
Author:
azaozz
Message:

Add action "in_widget_form" allowing plugins to add extra fields, don't show "Save" button if a widget doesn't have settings form, fixes #9651

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/widgets.php

    r11041 r11155  
    167167
    168168    $widget_title = wp_specialchars( strip_tags( $sidebar_args['widget_name'] ) );
    169     $has_form = 0;
     169    $has_form = 'noform';
    170170
    171171    echo $sidebar_args['before_widget']; ?>
     
    196196    <div class="widget-control-actions">
    197197        <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 ) { ?>
    199199        <input type="submit" name="savewidget" class="button-primary widget-control-save alignright" value="<?php _e('Save'); ?>" />
    200200<?php       } ?>
Note: See TracChangeset for help on using the changeset viewer.