WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/28/2010 09:56:43 PM (9 years ago)
Author:
markjaquith
Message:

Expand submit_button() capabilities. Replace all (or almost all) manual HTML instances in WP. props sbressler. see #15064

File:
1 edited

Legend:

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

    r16008 r16061  
    307307
    308308    <div class="widget-control-actions">
    309 <?php   if ( isset($_GET['addnew']) ) { ?>
     309<?php
     310    if ( isset($_GET['addnew']) ) { ?>
    310311    <a href="widgets.php" class="button alignleft"><?php _e('Cancel'); ?></a>
    311 <?php   } else { ?>
    312     <input type="submit" name="removewidget" class="button alignleft" value="<?php esc_attr_e('Delete'); ?>" />
    313 <?php   } ?>
    314     <input type="submit" name="savewidget" class="button-primary alignright" value="<?php esc_attr_e('Save Widget'); ?>" />
     312<?php
     313    } else {
     314        submit_button( __( 'Delete' ), 'button alignleft', 'removewidget', false );
     315    }
     316    submit_button( __( 'Save Widget' ), 'button-primary alignright', 'savewidget', false ); ?>
    315317    <input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr($widget_id); ?>" />
    316318    <input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr($id_base); ?>" />
Note: See TracChangeset for help on using the changeset viewer.