Make WordPress Core

Changeset 16061 for trunk/wp-admin


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

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

Location:
trunk/wp-admin
Files:
48 edited

Legend:

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

    r15674 r16061  
    181181<tr>
    182182<td><a class="button" href="<?php echo admin_url('edit-comments.php'); ?>"><?php esc_attr_e('No'); ?></a></td>
    183 <td class="textright"><input type='submit' class="button" value='<?php echo esc_attr($button); ?>' /></td>
     183<td class="textright"><?php submit_button( $button, 'button' ); ?></td>
    184184</tr>
    185185</table>
  • trunk/wp-admin/custom-background.php

    r15830 r16061  
    211211<form method="post" action="">
    212212<?php wp_nonce_field('custom-background-remove', '_wpnonce-custom-background-remove'); ?>
    213 <input type="submit" class="button" name="remove-background" value="<?php esc_attr_e('Remove Background Image'); ?>" /><br/>
     213<?php submit_button( __( 'Remove Background Image' ), 'button', 'remove-background', false ); ?><br/>
    214214<?php _e('This will remove the background image. You will not be able to restore any customizations.') ?>
    215215</form>
     
    224224<form method="post" action="">
    225225<?php wp_nonce_field('custom-background-reset', '_wpnonce-custom-background-reset'); ?>
    226 <input type="submit" class="button" name="reset-background" value="<?php esc_attr_e('Restore Original Image'); ?>" /><br/>
     226<?php submit_button( __( 'Restore Original Image' ), 'button', 'reset-background', false ); ?><br/>
    227227<?php _e('This will restore the original background image. You will not be able to restore any customizations.') ?>
    228228</form>
     
    237237<input type="hidden" name="action" value="save" />
    238238<?php wp_nonce_field('custom-background-upload', '_wpnonce-custom-background-upload') ?>
    239 <input type="submit" class="button" value="<?php esc_attr_e('Upload'); ?>" />
     239<?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?>
    240240</p>
    241241</form>
  • trunk/wp-admin/custom-header.php

    r15843 r16061  
    469469        <input type="hidden" name="action" value="save" />
    470470        <?php wp_nonce_field( 'custom-header-upload', '_wpnonce-custom-header-upload' ) ?>
    471         <input type="submit" class="button" value="<?php esc_attr_e( 'Upload' ); ?>" />
     471        <?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?>
    472472    </p>
    473473    </form>
     
    502502<td>
    503503    <p><?php _e( 'This will remove the header image. You will not be able to restore any customizations.' ) ?></p>
    504     <input type="submit" class="button" name="removeheader" value="<?php esc_attr_e( 'Remove Header Image' ); ?>" />
     504    <?php submit_button( __( 'Remove Header Image' ), 'button', 'removeheader', false ); ?>
    505505</td>
    506506</tr>
     
    512512<td>
    513513    <p><?php _e( 'This will restore the original header image. You will not be able to restore any customizations.' ) ?></p>
    514     <input type="submit" class="button" name="resetheader" value="<?php esc_attr_e( 'Restore Original Header Image' ); ?>" />
     514    <?php submit_button( __( 'Restore Original Header Image' ), 'button', 'resetheader', false ); ?>
    515515</td>
    516516</tr>
     
    551551<td>
    552552    <p><?php _e( 'This will restore the original header text. You will not be able to restore any customizations.' ) ?></p>
    553     <input type="submit" class="button" name="resettext" value="<?php esc_attr_e( 'Restore Original Header Text' ); ?>" />
     553    <?php submit_button( __( 'Restore Original Header Text' ), 'button', 'resettext', false ); ?>
    554554</td>
    555555</tr>
     
    564564wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
    565565
    566 <?php submit_button(); ?>
     566<?php submit_button( null, 'primary', 'save-header-options' ); ?>
    567567</form>
    568568</div>
  • trunk/wp-admin/edit-comments.php

    r15956 r16061  
    203203    <label class="screen-reader-text" for="comment-search-input"><?php _e( 'Search Comments' ); ?>:</label>
    204204    <input type="text" id="comment-search-input" name="s" value="<?php _admin_search_query(); ?>" />
    205     <input type="submit" value="<?php esc_attr_e( 'Search Comments' ); ?>" class="button" />
     205    <?php submit_button( __( 'Search Comments' ), 'button', 'submit', false ); ?>
    206206</p>
    207207
  • trunk/wp-admin/edit-form-comment.php

    r14647 r16061  
    7272</div>
    7373<div id="publishing-action">
    74 <input type="submit" name="save" value="<?php esc_attr_e('Update Comment'); ?>" tabindex="4" class="button-primary" />
     74<?php submit_button( __( 'Update Comment' ), 'primary', 'save', true, array( 'tabindex' => '4' ) ); ?>
    7575</div>
    7676<div class="clear"></div>
  • trunk/wp-admin/edit-tags.php

    r16032 r16061  
    226226    <label class="screen-reader-text" for="tag-search-input"><?php echo $tax->labels->search_items; ?>:</label>
    227227    <input type="text" id="tag-search-input" name="s" value="<?php _admin_search_query(); ?>" />
    228     <input type="submit" value="<?php echo esc_attr( $tax->labels->search_items );  ?>" class="button" />
     228    <?php submit_button( $tax->labels->search_items, 'button', 'submit', false ); ?>
    229229</p>
    230230</form>
     
    335335    do_action('add_tag_form_fields', $taxonomy);
    336336do_action($taxonomy . '_add_form_fields', $taxonomy);
    337 ?>
    338 <p class="submit"><input type="submit" class="button" name="submit" id="submit" value="<?php echo esc_attr( $tax->labels->add_new_item ); ?>" /></p>
    339 <?php
     337
     338submit_button( $tax->labels->add_new_item );
     339
    340340// Back compat hooks. Deprecated in preference to {$taxonomy}_add_form
    341341if ( 'category' == $taxonomy )
  • trunk/wp-admin/edit.php

    r15956 r16061  
    224224    <label class="screen-reader-text" for="post-search-input"><?php echo $post_type_object->labels->search_items; ?>:</label>
    225225    <input type="text" id="post-search-input" name="s" value="<?php the_search_query(); ?>" />
    226     <input type="submit" value="<?php echo esc_attr( $post_type_object->labels->search_items  ); ?>" class="button" />
     226    <?php submit_button( $post_type_object->labels->search_items, 'button', 'submit', false ); ?>
    227227</p>
    228228
  • trunk/wp-admin/export.php

    r15961 r16061  
    5454<p><?php _e('Once you&#8217;ve saved the download file, you can use the Import function on another WordPress site to import this site.'); ?></p>
    5555<form action="" method="get">
    56 <?php submit_button( __('Download Export File'), 'secondary' ); ?>
     56<?php submit_button( __('Download Export File'), 'button' ); ?>
    5757<input type="hidden" name="download" value="true" />
    5858</p>
  • trunk/wp-admin/includes/class-wp-list-table.php

    r15958 r16061  
    254254        echo "</select>\n";
    255255
    256         echo "<input type='submit' value='" . esc_attr__( 'Apply' ) . "' name='doaction$two' id='doaction$two' class='button-secondary action' />\n";
     256        submit_button( __( 'Apply' ), 'button-secondary action', "doaction$two", false );
     257        echo "\n";
    257258    }
    258259
  • trunk/wp-admin/includes/dashboard.php

    r15902 r16061  
    480480            <input type="hidden" name="post_type" value="post" />
    481481            <?php wp_nonce_field('add-post'); ?>
    482             <input type="submit" name="save" id="save-post" class="button" tabindex="4" value="<?php esc_attr_e('Save Draft'); ?>" />
     482            <?php submit_button( __( 'Save Draft' ), 'button', 'save', false, array( 'id' => 'save-post', 'tabindex'=> 4 ) ); ?>
    483483            <input type="reset" value="<?php esc_attr_e( 'Reset' ); ?>" class="button" />
    484484            <span id="publishing-action">
  • trunk/wp-admin/includes/file.php

    r16024 r16061  
    10671067        echo '<input type="hidden" name="' . esc_attr( $field ) . '" value="' . esc_attr( stripslashes( $_POST[ $field ] ) ) . '" />';
    10681068}
     1069submit_button( __( 'Proceed' ), 'button', 'upgrade' );
    10691070?>
    1070 <p class="submit">
    1071 <input id="upgrade" name="upgrade" type="submit" class="button" value="<?php esc_attr_e('Proceed'); ?>" />
    1072 </p>
    10731071</div>
    10741072</form>
  • trunk/wp-admin/includes/list-table-comments.php

    r15969 r16061  
    202202            ?>
    203203            </select>
    204             <input type="submit" id="post-query-submit" value="<?php esc_attr_e( 'Filter' ); ?>" class="button-secondary" />
    205204<?php
     205            submit_button( __( 'Filter' ), 'secondary', 'post-query-submit', false );
    206206        }
    207207
     
    209209            wp_nonce_field( 'bulk-destroy', '_destroy_nonce' );
    210210            $title = ( 'spam' == $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' );
    211 ?>
    212             <input type="submit" name="delete_all" id="delete_all" value="<?php echo $title ?>" class="button-secondary apply" />
    213 <?php
    214         }
    215 ?>
    216 <?php
     211            submit_button( $title, 'button-secondary apply', 'delete_all', false );
     212        }
    217213        do_action( 'manage_comments_nav', $comment_status );
    218214        echo '</div>';
  • trunk/wp-admin/includes/list-table-links.php

    r15985 r16061  
    7070            );
    7171            wp_dropdown_categories( $dropdown_options );
     72            submit_button( __( 'Filter' ), 'secondary', 'post-query-submit', false );
    7273?>
    73             <input type="submit" id="post-query-submit" value="<?php esc_attr_e( 'Filter' ); ?>" class="button-secondary" />
    7474        </div>
    7575<?php
  • trunk/wp-admin/includes/list-table-media.php

    r16004 r16061  
    9999
    100100            do_action( 'restrict_manage_posts' );
    101 ?>
    102             <input type="submit" id="post-query-submit" value="<?php esc_attr_e( 'Filter' ); ?>" class="button-secondary" />
    103 <?php
    104         }
    105 
    106         if ( $detached ) { ?>
    107             <input type="submit" id="find_detached" name="find_detached" value="<?php esc_attr_e( 'Scan for lost attachments' ); ?>" class="button-secondary" />
    108         <?php } elseif ( $this->is_trash && current_user_can( $post_type_obj->cap->edit_others_posts ) ) { ?>
    109             <input type="submit" id="delete_all" name="delete_all" value="<?php esc_attr_e( 'Empty Trash' ); ?>" class="button-secondary apply" />
    110         <?php } ?>
     101            submit_button( __( 'Filter' ), 'secondary', 'post-query-submit', false );
     102        }
     103
     104        if ( $detached ) {
     105            submit_button( __( 'Scan for lost attachments' ), 'secondary', 'find_detached', false );
     106        } elseif ( $this->is_trash && current_user_can( 'edit_others_posts' ) ) {
     107            submit_button( __( 'Empty Trash' ), 'button-secondary apply', 'delete_all', false );
     108        } ?>
    111109        </div>
    112110<?php
  • trunk/wp-admin/includes/list-table-plugins.php

    r16036 r16061  
    288288        if ( 'recently_activated' == $status ) { ?>
    289289            <div class="alignleft actions">
    290                 <input type="submit" name="clear-recent-list" value="<?php esc_attr_e( 'Clear List' ) ?>" class="button-secondary" />
     290                <?php submit_button( __( 'Clear List' ), 'secondary', 'clear-recent-list', false ); ?>
    291291            </div>
    292292        <?php }
  • trunk/wp-admin/includes/list-table-posts.php

    r16003 r16061  
    224224            }
    225225            do_action( 'restrict_manage_posts' );
     226            submit_button( __( 'Filter' ), 'secondary', 'post-query-submit', false );
    226227?>
    227             <input type="submit" id="post-query-submit" value="<?php esc_attr_e( 'Filter' ); ?>" class="button-secondary" />
    228228        </div>
    229229<?php
     
    231231
    232232        if ( $this->is_trash && current_user_can( $post_type_object->cap->edit_others_posts ) ) {
    233 ?>
    234         <input type="submit" name="delete_all" id="delete_all" value="<?php esc_attr_e( 'Empty Trash' ); ?>" class="button-secondary apply" />
    235 <?php
     233            submit_button( __( 'Empty Trash' ), 'button-secondary apply', 'delete_all', false );
    236234        }
    237235    }
     
    986984                <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
    987985            <?php } else {
    988                 $update_text = __( 'Update' );
    989             ?>
    990                 <input accesskey="s" class="button-primary alignright" type="submit" name="bulk_edit" value="<?php echo esc_attr( $update_text ); ?>" />
    991             <?php } ?>
     986                submit_button( __( 'Update' ), 'button-primary alignright', 'bulk_edit', false, array( 'accesskey' => 's' ) );
     987            } ?>
    992988            <input type="hidden" name="post_view" value="<?php echo esc_attr( $m ); ?>" />
    993989            <input type="hidden" name="screen" value="<?php echo esc_attr( $screen->id ); ?>" />
  • trunk/wp-admin/includes/list-table-users.php

    r15958 r16061  
    113113            <?php wp_dropdown_roles(); ?>
    114114        </select>
    115         <input type="submit" value="<?php esc_attr_e( 'Change' ); ?>" name="changeit" class="button-secondary" />
     115        <?php submit_button( __( 'Change' ), 'secondary', 'changeit', false ); ?>
    116116    </div>
    117117<?php
  • trunk/wp-admin/includes/media.php

    r16057 r16061  
    12191219
    12201220    if ( $send )
    1221         $send = "<input type='submit' class='button' name='send[$attachment_id]' value='" . esc_attr__( 'Insert into Post' ) . "' />";
     1221        $send = get_submit_button( __( 'Insert into Post' ), 'button', "send[$attachment_id]", false );
    12221222    if ( $delete && current_user_can( 'delete_post', $attachment_id ) ) {
    12231223        if ( !EMPTY_TRASH_DAYS ) {
     
    14601460<?php do_action('pre-html-upload-ui'); ?>
    14611461    <p id="async-upload-wrap">
    1462     <label class="screen-reader-text" for="async-upload"><?php _e('Upload'); ?></label>
    1463     <input type="file" name="async-upload" id="async-upload" /> <input type="submit" class="button" name="html-upload" value="<?php esc_attr_e('Upload'); ?>" /> <a href="#" onclick="try{top.tb_remove();}catch(e){}; return false;"><?php _e('Cancel'); ?></a>
     1462        <label class="screen-reader-text" for="async-upload"><?php _e('Upload'); ?></label>
     1463        <input type="file" name="async-upload" id="async-upload" />
     1464        <?php submit_button( __( 'Upload' ), 'button', 'html-upload', false ); ?>
     1465        <a href="#" onclick="try{top.tb_remove();}catch(e){}; return false;"><?php _e('Cancel'); ?></a>
    14641466    </p>
    14651467    <div class="clear"></div>
     
    14931495
    14941496<form enctype="multipart/form-data" method="post" action="<?php echo esc_attr($form_action_url); ?>" class="media-upload-form type-form validate" id="<?php echo $type; ?>-form">
    1495 <input type="submit" class="hidden" name="save" value="" />
     1497<?php submit_button( '', 'hidden', 'save', false ); ?>
    14961498<input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
    14971499<?php wp_nonce_field('media-form'); ?>
     
    15261528</div>
    15271529<p class="savebutton ml-submit">
    1528 <input type="submit" class="button" name="save" value="<?php esc_attr_e( 'Save all changes' ); ?>" />
     1530<?php submit_button( __( 'Save all changes' ), 'button', 'save', false ); ?>
    15291531</p>
    15301532</form>
     
    17061708
    17071709<p class="ml-submit">
    1708 <input type="submit" class="button savebutton" style="display:none;" name="save" id="save-all" value="<?php esc_attr_e( 'Save all changes' ); ?>" />
     1710<?php submit_button( __( 'Save all changes' ), 'button savebutton', 'save', false, array( 'id' => 'save-all', 'style' => 'display: none;' ) ); ?>
    17091711<input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
    17101712<input type="hidden" name="type" value="<?php echo esc_attr( $GLOBALS['type'] ); ?>" />
     
    18291831    <label class="screen-reader-text" for="media-search-input"><?php _e('Search Media');?>:</label>
    18301832    <input type="text" id="media-search-input" name="s" value="<?php the_search_query(); ?>" />
    1831     <input type="submit" value="<?php esc_attr_e( 'Search Media' ); ?>" class="button" />
     1833    <?php submit_button( __( 'Search Media' ), 'button', '', false ); ?>
    18321834</p>
    18331835
     
    19161918<?php } ?>
    19171919
    1918 <input type="submit" id="post-query-submit" value="<?php echo esc_attr( __( 'Filter &#187;' ) ); ?>" class="button-secondary" />
     1920<?php submit_button( __( 'Filter &#187;' ), 'secondary', 'post-query-submit', false ); ?>
    19191921
    19201922</div>
     
    19461948</div>
    19471949<p class="ml-submit">
    1948 <input type="submit" class="button savebutton" name="save" value="<?php esc_attr_e( 'Save all changes' ); ?>" />
     1950<?php submit_button( __( 'Save all changes' ), 'button savebutton', 'save', false ); ?>
    19491951<input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
    19501952</p>
     
    21442146            <td></td>
    21452147            <td>
    2146                 <input type="submit" class="button" name="insertonlybutton" value="' . esc_attr__('Insert into Post') . '" />
     2148                ' . get_submit_button( __( 'Insert into Post' ), 'button', 'insertonlybutton', false ) . '
    21472149            </td>
    21482150        </tr>
  • trunk/wp-admin/includes/meta-boxes.php

    r15955 r16061  
    2323<?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
    2424<div style="display:none;">
    25 <input type="submit" name="save" value="<?php esc_attr_e('Save'); ?>" />
     25<?php submit_button( __( 'Save' ), 'button', 'save' ); ?>
    2626</div>
    2727
     
    212212        if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?>
    213213        <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Schedule') ?>" />
    214         <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php esc_attr_e('Schedule') ?>" />
     214        <?php submit_button( __( 'Schedule' ), 'primary', 'publish', false, array( 'tabindex' => '5', 'accesskey' => 'p' ) ); ?>
    215215<?php   else : ?>
    216216        <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Publish') ?>" />
    217         <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php esc_attr_e('Publish') ?>" />
     217        <?php submit_button( __( 'Publish' ), 'primary', 'publish', false, array( 'tabindex' => '5', 'accesskey' => 'p' ) ); ?>
    218218<?php   endif;
    219219    else : ?>
    220220        <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Submit for Review') ?>" />
    221         <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php esc_attr_e('Submit for Review') ?>" />
     221        <?php submit_button( __( 'Submit for Review' ), 'primary', 'publish', false, array( 'tabindex' => '5', 'accesskey' => 'p' ) ); ?>
    222222<?php
    223223    endif;
     
    583583<?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
    584584<div style="display:none;">
    585 <input type="submit" name="save" value="<?php esc_attr_e('Save'); ?>" />
     585<?php submit_button( __( 'Save' ), 'button', 'save', false ); ?>
    586586</div>
    587587
  • trunk/wp-admin/includes/nav-menu.php

    r15815 r16061  
    496496    <p class="button-controls">
    497497        <img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
    498         <input type="submit"<?php disabled( $nav_menu_selected_id, 0 ); ?> class="button-primary" name="nav-menu-locations" value="<?php esc_attr_e( 'Save' ); ?>" />
     498        <?php submit_button( __( 'Save' ), 'primary', 'nav-menu-locations', false, disabled( $nav_menu_selected_id, 0, false ) ); ?>
    499499    </p>
    500500    <?php
     
    672672                <input type="text" class="quick-search regular-text input-with-default-title" title="<?php esc_attr_e('Search'); ?>" value="<?php echo $searched; ?>" name="quick-search-posttype-<?php echo $post_type_name; ?>" />
    673673                <img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
    674                 <input type="submit" class="quick-search-submit button-secondary hide-if-js" value="<?php esc_attr_e('Search'); ?>" />
     674                <?php submit_button( __( 'Search' ), 'quick-search-submit button-secondary hide-if-js', 'submit', false ); ?>
    675675            </p>
    676676
     
    899899                <input type="text" class="quick-search regular-text input-with-default-title" title="<?php esc_attr_e('Search'); ?>" value="<?php echo $searched; ?>" name="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" />
    900900                <img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
    901                 <input type="submit" class="quick-search-submit button-secondary hide-if-js" value="<?php esc_attr_e('Search'); ?>" />
     901                <?php submit_button( __( 'Search' ), 'quick-search-submit button-secondary hide-if-js', 'submit', false ); ?>
    902902            </p>
    903903
  • trunk/wp-admin/includes/plugin-install.php

    r15867 r16061  
    130130        <input type="text" name="s" value="<?php echo esc_attr($term) ?>" />
    131131        <label class="screen-reader-text" for="plugin-search-input"><?php _e('Search Plugins'); ?></label>
    132         <input type="submit" id="plugin-search-input" value="<?php esc_attr_e('Search Plugins'); ?>" class="button" />
     132        <?php submit_button( __( 'Search Plugins' ), 'button', 'plugin-search-input', false ); ?>
    133133    </form><?php
    134134}
  • trunk/wp-admin/includes/template.php

    r15976 r16061  
    496496    $r .= "\n\t\t<td class='left'><label class='screen-reader-text' for='meta[{$entry['meta_id']}][key]'>" . __( 'Key' ) . "</label><input name='meta[{$entry['meta_id']}][key]' id='meta[{$entry['meta_id']}][key]' tabindex='6' type='text' size='20' value='{$entry['meta_key']}' />";
    497497
    498     $r .= "\n\t\t<div class='submit'><input name='deletemeta[{$entry['meta_id']}]' type='submit' ";
    499     $r .= "class='delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce deletemeta' tabindex='6' value='". esc_attr__( 'Delete' ) ."' />";
    500     $r .= "\n\t\t<input name='updatemeta' type='submit' tabindex='6' value='". esc_attr__( 'Update' ) ."' class='add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce updatemeta' /></div>";
     498    $r .= "\n\t\t<div class='submit'>";
     499    $r .= get_submit_button( __( 'Delete' ), "delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce deletemeta", "deletemeta[{$entry['meta_id']}]", false, array( 'tabindex' => '6' ) );
     500    $r .= "\n\t\t";
     501    $r .= get_submit_button( __( 'Update' ), "add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce updatemeta" , 'updatemeta', false, array( 'tabindex' => '6' ) );
     502    $r .= "</div>";
    501503    $r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false );
    502504    $r .= "</td>";
     
    558560
    559561<tr><td colspan="2" class="submit">
    560 <input type="submit" id="addmetasub" name="addmeta" class="add:the-list:newmeta" tabindex="9" value="<?php esc_attr_e( 'Add Custom Field' ) ?>" />
     562<?php submit_button( __( 'Add Custom Field' ), 'add:the-list:newmeta', 'addmeta', false, array( 'id' => 'addmetasub', 'tabindex' => '9' ) ); ?>
    561563<?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?>
    562564</td></tr>
     
    844846<input type="hidden" name="max_file_size" value="<?php echo $bytes; ?>" />
    845847</p>
    846 <?php submit_button( __('Upload file and import'), 'secondary' ); ?>
     848<?php submit_button( __('Upload file and import'), 'button' ); ?>
    847849</form>
    848850<?php
     
    13581360        <div class="find-box-buttons">
    13591361            <input id="find-posts-close" type="button" class="button alignleft" value="<?php esc_attr_e('Close'); ?>" />
    1360             <input id="find-posts-submit" type="submit" class="button-primary alignright" value="<?php esc_attr_e('Select'); ?>" />
     1362            <?php submit_button( __( 'Select' ), 'button-primary alignright', 'find-posts-submit', false ); ?>
    13611363        </div>
    13621364    </div>
     
    18901892    if ( !empty($per_page_label) )
    18911893        $return .= "<input type='text' class='screen-per-page' name='wp_screen_options[value]' id='$option' maxlength='3' value='$per_page' /> <label for='$option'>$per_page_label</label>\n";
    1892     $return .= "<input type='submit' class='button' value='" . esc_attr__('Apply') . "' />";
     1894    $return .= get_submit_button( __( 'Apply' ), 'button', '', false );
    18931895    $return .= "<input type='hidden' name='wp_screen_options[option]' value='" . esc_attr($option) . "' />";
    18941896    $return .= "</div>\n";
     
    20872089
    20882090/**
    2089  * Echos a paragraph-wrapped submit button, with provided text and appropriate class
     2091 * Echos a submit button, with provided text and appropriate class
    20902092 *
    20912093 * @since 3.1.0
     
    20932095 * @param string $text The text of the button (defaults to 'Save Changes')
    20942096 * @param string $type The type of button. One of: primary, secondary, delete
    2095  * @param string $name The HTML name of the submit button. Defaults to "submit"
    2096  */
    2097 function submit_button( $text = NULL, $type = 'primary', $name = 'submit' ) {
    2098     echo get_submit_button( $text, $type, $name );
    2099 }
    2100 
    2101 /**
    2102  * Returns a paragraph-wrapped submit button, with provided text and appropriate class
     2097 * @param string $name The HTML name of the submit button. Defaults to "submit". If no id attribute
     2098 *               is given in $other_attributes below, $name will be used as the button's id.
     2099 * @param bool $wrap True if the output button should be wrapped in a paragraph tag,
     2100 *             false otherwise. Defaults to true
     2101 * @param array|string $other_attributes Other attributes that should be output with the button,
     2102 *                     mapping attributes to their values, such as array( 'tabindex' => '1' ).
     2103 *                     These attributes will be ouput as attribute="value", such as tabindex="1".
     2104 *                     Defaults to no other attributes. Other attributes can also be provided as a
     2105 *                     string such as 'tabindex="1"', though the array format is typically cleaner.
     2106 */
     2107function submit_button( $text = NULL, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = NULL ) {
     2108    echo get_submit_button( $text, $type, $name, $wrap, $other_attributes );
     2109}
     2110
     2111/**
     2112 * Returns a submit button, with provided text and appropriate class
    21032113 *
    21042114 * @since 3.1.0
     
    21062116 * @param string $text The text of the button (defaults to 'Save Changes')
    21072117 * @param string $type The type of button. One of: primary, secondary, delete
    2108  * @param string $name The HTML name of the submit button. Defaults to "submit"
    2109  */
    2110 function get_submit_button( $text = NULL, $type = 'primary', $name = 'submit' ) {
     2118 * @param string $name The HTML name of the submit button. Defaults to "submit". If no id attribute
     2119 *               is given in $other_attributes below, $name will be used as the button's id.
     2120 * @param bool $wrap True if the output button should be wrapped in a paragraph tag,
     2121 *             false otherwise. Defaults to true
     2122 * @param array|string $other_attributes Other attributes that should be output with the button,
     2123 *                     mapping attributes to their values, such as array( 'tabindex' => '1' ).
     2124 *                     These attributes will be ouput as attribute="value", such as tabindex="1".
     2125 *                     Defaults to no other attributes. Other attributes can also be provided as a
     2126 *                     string such as 'tabindex="1"', though the array format is typically cleaner.
     2127 */
     2128function get_submit_button( $text = NULL, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = NULL ) {
    21112129    switch ( $type ) :
    21122130        case 'primary' :
     
    21212139    endswitch;
    21222140    $text = ( NULL == $text ) ? __( 'Save Changes' ) : $text;
    2123     return '<p class="submit"><input type="submit" name="' . esc_attr( $name ) . '" class="' . esc_attr( $class ) . '" value="' . esc_attr( $text ) . '" /></p>';
    2124 }
    2125 
     2141   
     2142    $attributes = '';
     2143    if ( is_array( $other_attributes ) ) {
     2144        foreach ( $other_attributes as $attribute => $value ) {
     2145            $attributes .= $attribute . '="' . esc_attr( $value ) . '" '; // Trailing space is important
     2146        }
     2147    } else if ( !empty( $other_attributes ) ) { // Attributes provided as a string
     2148        $attributes = $other_attributes;
     2149    }
     2150   
     2151    // Default the id attribute to $name unless an id was specifically provided in $other_attributes
     2152    $id = 'id="' . esc_attr( $name ) . '" ';
     2153    if ( is_array( $other_attributes ) && array_key_exists( 'id', $other_attributes ) ) {
     2154        $id = 'id="' . esc_attr( $other_attributes['id'] ) . '" ';
     2155    }
     2156   
     2157    $button = '<input type="submit" name="' . esc_attr( $name ) . '" id="' . $id . '" class="' . esc_attr( $class );
     2158    $button .= '" value="' . esc_attr( $text ) . '" ' . $attributes . ' />';
     2159   
     2160    if ( $wrap ) {
     2161        $button = '<p class="submit">' . $button . '</p>';
     2162    }
     2163   
     2164    return $button;
     2165}
     2166
  • trunk/wp-admin/includes/theme-install.php

    r15898 r16061  
    6464    </select>
    6565    <input type="text" name="s" size="30" value="<?php echo esc_attr($term) ?>" />
    66     <input type="submit" name="search" value="<?php esc_attr_e('Search'); ?>" class="button" />
     66    <?php submit_button( __( 'Search' ), 'button', 'search', false ); ?>
    6767</form>
    6868<?php
     
    107107</div>
    108108<br class="clear" />
    109 <p><input type="submit" name="search" value="<?php esc_attr_e('Find Themes'); ?>" class="button" /></p>
     109<?php submit_button( __( 'Find Themes' ), 'button', 'search' ); ?>
    110110</form>
    111111<?php
     
    120120    <?php wp_nonce_field( 'theme-upload') ?>
    121121    <input type="file" name="themezip" />
    122     <input type="submit"
    123     class="button" value="<?php esc_attr_e('Install Now') ?>" />
     122    <?php submit_button( __( 'Install Now' ), 'button', '', false ); ?>
    124123</form>
    125124    <?php
  • trunk/wp-admin/includes/widgets.php

    r14374 r16061  
    204204        <div class="alignright<?php if ( 'noform' === $has_form ) echo ' widget-control-noform'; ?>">
    205205        <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-feedback " title="" alt="" />
    206         <input type="submit" name="savewidget" class="button-primary widget-control-save" value="<?php esc_attr_e('Save'); ?>" />
     206        <?php submit_button( __( 'Save' ), 'button-primary widget-control-save', 'savewidget', false ); ?>
    207207        </div>
    208208        <br class="clear" />
  • trunk/wp-admin/install.php

    r15998 r16061  
    134134        </tr>
    135135    </table>
    136     <p class="step"><input type="submit" name="Submit" value="<?php esc_attr_e( 'Install WordPress' ); ?>" class="button" /></p>
     136    <p class="step"><?php submit_button( __( 'Install WordPress' ), 'button', 'Submit', false ); ?></p>
    137137</form>
    138138<?php
  • trunk/wp-admin/link-manager.php

    r15956 r16061  
    7777    <label class="screen-reader-text" for="link-search-input"><?php _e( 'Search Links' ); ?>:</label>
    7878    <input type="text" id="link-search-input" name="s" value="<?php _admin_search_query(); ?>" />
    79     <input type="submit" value="<?php esc_attr_e( 'Search Links' ); ?>" class="button" />
     79    <?php submit_button( __( 'Search Links' ), 'button', '', false ); ?>
    8080</p>
    8181</form>
  • trunk/wp-admin/media-upload.php

    r15834 r16061  
    9191    <?php wp_nonce_field('media-form'); ?>
    9292    <div id="media-items" class="hide-if-no-js"> </div>
    93     <p>
    94     <input type="submit" class="button savebutton hide-if-no-js" name="save" value="<?php esc_attr_e( 'Save all changes' ); ?>" />
    95     </p>
     93    <?php submit_button( __( 'Save all changes' ), 'button savebutton hide-if-no-js', 'save' ); ?>
    9694    </form>
    9795    </div>
  • trunk/wp-admin/media.php

    r16008 r16061  
    9292<form method="post" action="" class="media-upload-form" id="media-single-form">
    9393<p class="submit" style="padding-bottom: 0;">
    94 <input type="submit" class="button-primary" name="save" value="<?php esc_attr_e('Update Media'); ?>" />
     94<?php submit_button( __( 'Update Media' ), 'primary', 'save', false ); ?>
    9595</p>
    9696
     
    101101</div>
    102102
    103 <?php submit_button( __('Update Media') ); ?>
     103<?php submit_button( __( 'Update Media' ), 'primary', 'save' ); ?>
    104104<input type="hidden" name="post_id" id="post_id" value="<?php echo isset($post_id) ? esc_attr($post_id) : ''; ?>" />
    105105<input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr($att_id); ?>" />
  • trunk/wp-admin/ms-delete-site.php

    r15245 r16061  
    7171        <input type="hidden" name="action" value="deleteblog" />
    7272        <p><input id="confirmdelete" type="checkbox" name="confirmdelete" value="1" /> <label for="confirmdelete"><strong><?php printf( __( "I'm sure I want to permanently disable my site, and I am aware I can never get it back or use %s again." ), is_subdomain_install() ? $current_blog->domain : $current_blog->domain . $current_blog->path ); ?></strong></label></p>
    73         <p class="submit"><input type="submit" value="<?php esc_attr_e( 'Delete My Site Permanently' ) ?>" /></p>
     73        <?php submit_button( __( 'Delete My Site Permanently' ) ); ?>
    7474    </form>
    7575    <?php
  • trunk/wp-admin/my-sites.php

    r15132 r16061  
    103103    <input type="hidden" name="action" value="updateblogsettings" />
    104104    <?php wp_nonce_field( 'update-my-sites' ); ?>
    105     <p>
    106      <input type="submit" class="button-primary" value="<?php _e( 'Save Changes' ) ?>" />
    107     </p>
     105    <?php submit_button(); ?>
    108106    </form>
    109107    </div>
  • trunk/wp-admin/nav-menus.php

    r15588 r16061  
    495495                    </select>
    496496                    <input type="hidden" name="action" value="edit" />
    497                     <input class="button-secondary" name="select_menu" type="submit" value="<?php esc_attr_e('Select'); ?>" />
     497                    <?php submit_button( __( 'Select' ), 'secondary', 'select_menu', false ); ?>
    498498                </form>
    499499            </div>
     
    557557                                <br class="clear" />
    558558                                <div class="publishing-action">
    559                                     <input class="button-primary menu-save" name="save_menu" type="submit" value="<?php empty($nav_menu_selected_id) ? esc_attr_e('Create Menu') : esc_attr_e('Save Menu'); ?>" />
     559                                    <?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'button-primary menu-save', 'save_menu', false ); ?>
    560560                                </div><!-- END .publishing-action -->
    561561
     
    594594                        <div class="major-publishing-actions">
    595595                        <div class="publishing-action">
    596                             <input class="button-primary menu-save" name="save_menu" type="submit" value="<?php empty($nav_menu_selected_id) ? esc_attr_e('Create Menu') : esc_attr_e('Save Menu'); ?>" />
     596                            <?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'button-primary menu-save', 'save_menu', false ); ?>
    597597                        </div>
    598598                        </div>
  • trunk/wp-admin/network.php

    r15965 r16061  
    276276            </tr>
    277277        </table>
    278         <p class='submit'><input class="button-primary" name='submit' type='submit' value='<?php esc_attr_e( 'Install' ); ?>' /></p>
     278        <?php submit_button( __( 'Install' ), 'primary', 'submit' ); ?>
    279279    </form>
    280         <?php
     280    <?php
    281281}
    282282
  • trunk/wp-admin/network/edit.php

    r15905 r16061  
    348348                    <?php wp_nonce_field( $_GET['action2'], '_wpnonce', false ); ?>
    349349                    <p><?php echo esc_html( stripslashes( $_GET['msg'] ) ); ?></p>
    350                     <?php submit_button( __('Confirm'), 'secondary' ); ?>
     350                    <?php submit_button( __('Confirm'), 'button' ); ?>
    351351                </form>
    352352            </body>
  • trunk/wp-admin/network/sites.php

    r16014 r16061  
    100100<input type="hidden" name="action" value="blogs" />
    101101<input type="text" name="s" value="<?php echo esc_attr( $s ); ?>" />
    102 <input type="submit" class="button" value="<?php esc_attr_e( 'Search Site by' ) ?>" />
     102<?php submit_button( __( 'Search Site by' ), 'button', 'submit', false ); ?>
    103103<select name="searchaction">
    104104    <option value="name" selected="selected"><?php _e( 'Name' ); ?></option>
  • trunk/wp-admin/network/themes.php

    r15481 r16061  
    4141        <h2><?php _e( 'Network Themes' ) ?></h2>
    4242        <p><?php _e( 'Themes must be enabled for your network before they will be available to individual sites.' ) ?></p>
    43         <p class="submit">
    44             <input type="submit" value="<?php _e( 'Apply Changes' ) ?>" /></p>
     43        <?php submit_button( __( 'Apply Changes' ), '', '' ); ?>
    4544        <table class="widefat">
    4645            <thead>
     
    8483            </tbody>
    8584        </table>
    86 
    87         <p class="submit">
    88             <input type="submit" value="<?php _e( 'Apply Changes' ) ?>" /></p>
     85       
     86        <?php submit_button( __( 'Apply Changes' ), '', '' ); ?>
    8987    </form>
    9088
  • trunk/wp-admin/network/users.php

    r15956 r16061  
    7474        <p class="search-box">
    7575        <input type="text" name="s" value="<?php echo esc_attr( $usersearch ); ?>" class="search-input" id="user-search-input" />
    76         <input type="submit" id="post-query-submit" value="<?php esc_attr_e( 'Search Users' ) ?>" class="button" />
     76        <?php submit_button( __( 'Search Users' ), 'button', 'post-query-submit', false ); ?>
    7777        </p>
    7878    </form>
  • trunk/wp-admin/options.php

    r15830 r16061  
    213213<input type="hidden" name="page_options" value="<?php echo esc_attr( implode( ',', $options_to_update ) ); ?>" />
    214214
    215 <?php submit_button( __('Save Changes') ); ?>
     215<?php submit_button( __( 'Save Changes' ), 'primary', 'Update' ); ?>
    216216
    217217  </form>
  • trunk/wp-admin/plugin-editor.php

    r16015 r16061  
    186186?>
    187187        </select>
    188         <input type="submit" name="Submit" value="<?php esc_attr_e('Select') ?>" class="button" />
     188        <?php submit_button( __( 'Select' ), 'button', 'Submit', false ); ?>
    189189    </form>
    190190</div>
     
    230230    <p class="submit">
    231231    <?php
    232         if ( isset($_GET['phperror']) )
    233             echo "<input type='hidden' name='phperror' value='1' /><input type='submit' name='submit' class='button-primary' value='" . esc_attr__('Update File and Attempt to Reactivate') . "' tabindex='2' />";
    234         else
    235             echo "<input type='submit' name='submit' class='button-primary' value='" . esc_attr__('Update File') . "' tabindex='2' />";
     232        if ( isset($_GET['phperror']) ) {
     233            echo "<input type='hidden' name='phperror' value='1' />";
     234            submit_button( __( 'Update File and Attempt to Reactivate' ), 'primary', 'submit', false, array( 'tabindex' => '2' ) );
     235        } else {
     236            submit_button( __( 'Update File' ), 'primary', 'submit', false, array( 'tabindex' => '2' ) );
     237        }
    236238    ?>
    237239    </p>
  • trunk/wp-admin/plugins.php

    r16026 r16061  
    254254                    ?>
    255255                    <?php wp_nonce_field('bulk-plugins') ?>
    256                     <input type="submit" name="submit" value="<?php $data_to_delete ? esc_attr_e('Yes, Delete these files and data') : esc_attr_e('Yes, Delete these files') ?>" class="button" />
     256                    <?php submit_button( $data_to_delete ? __( 'Yes, Delete these files and data' ) : __( 'Yes, Delete these files' ), 'button', 'submit', false ); ?>
    257257                </form>
    258258                <form method="post" action="<?php echo esc_url(wp_get_referer()); ?>" style="display:inline;">
    259                     <input type="submit" name="submit" value="<?php esc_attr_e('No, Return me to the plugin list') ?>" class="button" />
     259                    <?php submit_button( __( 'No, Return me to the plugin list' ), 'button', 'submit', false ); ?>
    260260                </form>
    261261
     
    358358    <label class="screen-reader-text" for="plugin-search-input"><?php _e( 'Search Plugins' ); ?>:</label>
    359359    <input type="text" id="plugin-search-input" name="s" value="<?php _admin_search_query(); ?>" />
    360     <input type="submit" value="<?php esc_attr_e( 'Search Installed Plugins' ); ?>" class="button" />
     360    <?php submit_button( __( 'Search Installed Plugins' ), 'button', '', false ); ?>
    361361</p>
    362362</form>
  • trunk/wp-admin/press-this.php

    r15834 r16061  
    473473                <div class="inside">
    474474                    <p>
    475                         <input class="button" type="submit" name="draft" value="<?php esc_attr_e('Save Draft') ?>" id="save" />
    476                         <?php if ( current_user_can('publish_posts') ) { ?>
    477                             <input class="button-primary" type="submit" name="publish" value="<?php esc_attr_e('Publish') ?>" id="publish" />
    478                         <?php } else { ?>
    479                             <br /><br /><input class="button-primary" type="submit" name="review" value="<?php esc_attr_e('Submit for Review') ?>" id="review" />
    480                         <?php } ?>
     475                    <?php
     476                        submit_button( __( 'Save Draft' ), 'button', 'draft', false, array( 'id' => 'save' ) );
     477                        if ( current_user_can('publish_posts') ) {
     478                            submit_button( __( 'Publish' ), 'primary', 'publish', false );
     479                        } else {
     480                            echo '<br /><br />';
     481                            submit_button( __( 'Submit for Review' ), 'primary', 'review', false );
     482                        } ?>
    481483                        <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" id="saving" style="display:none;" />
    482484                    </p>
  • trunk/wp-admin/setup-config.php

    r14404 r16061  
    147147    </table>
    148148    <?php if ( isset( $_GET['noapi'] ) ) { ?><input name="noapi" type="hidden" value="true" /><?php } ?>
    149     <p class="step"><input name="submit" type="submit" value="Submit" class="button" /></p>
     149    <p class="step"><?php submit_button( __( 'Submit' ), 'button', 'submit', false ); ?></p>
    150150</form>
    151151<?php
  • trunk/wp-admin/theme-editor.php

    r15853 r16061  
    150150?>
    151151        </select>
    152         <input type="submit" name="Submit" value="<?php esc_attr_e('Select') ?>" class="button" />
     152        <?php submit_button( __( 'Select' ), 'button', 'Submit', false ); ?>
    153153    </form>
    154154</div>
     
    225225
    226226        <div>
    227 <?php if ( is_writeable($file) ) : ?>
    228             <p class="submit">
    229 <?php
    230     echo "<input type='submit' name='submit' class='button-primary' value='" . esc_attr__('Update File') . "' tabindex='2' />";
    231 ?>
    232 </p>
    233 <?php else : ?>
     227<?php
     228    if ( is_writeable($file) ) :
     229        submit_button( __( 'Update File' ), 'primary', 'submit', true, array( 'tabindex' => '2' ) );
     230    else : ?>
    234231<p><em><?php _e('You need to make this file writable before you can save your changes. See <a href="http://codex.wordpress.org/Changing_File_Permissions">the Codex</a> for more information.'); ?></em></p>
    235232<?php endif; ?>
  • trunk/wp-admin/themes.php

    r16008 r16061  
    134134    <label class="screen-reader-text" for="theme-search-input"><?php _e('Search Themes'); ?>:</label>
    135135    <input type="text" id="theme-search-input" name="s" value="<?php _admin_search_query(); ?>" />
    136     <input type="submit" value="<?php esc_attr_e('Search Themes'); ?>" class="button" />
     136    <?php submit_button( __( 'Search Themes' ), 'button', 'submit', false ); ?>
    137137    <a id="filter-click" href="?filter=1"><?php _e( 'Feature Filter' ); ?></a>
    138138</p>
     
    167167
    168168    <div class="feature-container">
    169         <input style="margin-left: 120px" type="submit" class="button-secondary submitter" value="<?php esc_attr_e( 'Apply Filters' ); ?>" />
     169        <?php submit_button( __( 'Apply Filters' ), 'button-secondary submitter', 'submit', false, array( 'style' => 'margin-left: 120px' ) ); ?>
    170170        &nbsp;
    171171        <small><a id="mini-filter-click" href="<?php echo admin_url( 'themes.php' ); ?>"><?php _e( 'Close filters' )?></a></small>
  • trunk/wp-admin/update-core.php

    r16008 r16061  
    5959    echo '<input name="locale" value="'. esc_attr($update->locale) .'" type="hidden"/>';
    6060    if ( $show_buttons ) {
    61         echo '<input id="upgrade" class="button" type="submit" value="' . esc_attr($submit) . '" name="upgrade" />&nbsp;';
    62         echo '<a href="' . esc_url($update->package) . '" class="button">' . $download . '</a>&nbsp;';
     61        submit_button( $submit, 'button', 'upgrade', false );
     62        echo '&nbsp;<a href="' . esc_url($update->package) . '" class="button">' . $download . '</a>&nbsp;';
    6363    }
    6464    if ( 'en_US' != $update->locale )
    6565        if ( !isset( $update->dismissed ) || !$update->dismissed )
    66             echo '<input id="dismiss" class="button" type="submit" value="' . esc_attr__('Hide this update') . '" name="dismiss" />';
     66            submit_button( __('Hide this update'), 'button', 'dismiss', false );
    6767        else
    68             echo '<input id="undismiss" class="button" type="submit" value="' . esc_attr__('Bring back this update') . '" name="undismiss" />';
     68            submit_button( __('Bring back this update'), 'button', 'undismiss', false );
    6969    echo '</p>';
    7070    if ( 'en_US' != $update->locale && ( !isset($wp_local_package) || $wp_local_package != $update->locale ) )
  • trunk/wp-admin/upload.php

    r15956 r16061  
    207207    <label class="screen-reader-text" for="media-search-input"><?php _e( 'Search Media' ); ?>:</label>
    208208    <input type="text" id="media-search-input" name="s" value="<?php the_search_query(); ?>" />
    209     <input type="submit" value="<?php esc_attr_e( 'Search Media' ); ?>" class="button" />
     209    <?php submit_button( __( 'Search Media' ), 'button', 'submit', false ); ?>
    210210</p>
    211211</form>
  • trunk/wp-admin/user-new.php

    r16009 r16061  
    263263    <?php } ?>
    264264</table>
    265 
    266 <?php submit_button( __('Add User'), 'primary', 'adduser' ); ?>
     265<p class="submit">
     266    <input name="adduser" type="submit" id="addusersub" class="button-primary" value="<?php esc_attr_e('Add User') ?>" />
     267</p>
    267268</form>
    268269
  • trunk/wp-admin/users.php

    r16009 r16061  
    358358    <label class="screen-reader-text" for="user-search-input"><?php _e( 'Search Users' ); ?>:</label>
    359359    <input type="text" id="user-search-input" name="usersearch" value="<?php echo esc_attr($usersearch); ?>" />
    360     <input type="submit" value="<?php esc_attr_e( 'Search Users' ); ?>" class="button" />
     360    <?php submit_button( __( 'Search Users' ), 'submit', 'submit', false ); ?>
    361361</p>
    362362</form>
  • 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.