Ticket #15064: 15064.2.diff
| File 15064.2.diff, 66.1 KB (added by , 15 years ago) |
|---|
-
wp-admin/comment.php
180 180 <table width="100%"> 181 181 <tr> 182 182 <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> 184 184 </tr> 185 185 </table> 186 186 -
wp-admin/custom-background.php
210 210 <td> 211 211 <form method="post" action=""> 212 212 <?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/> 214 214 <?php _e('This will remove the background image. You will not be able to restore any customizations.') ?> 215 215 </form> 216 216 </td> … … 223 223 <td> 224 224 <form method="post" action=""> 225 225 <?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/> 227 227 <?php _e('This will restore the original background image. You will not be able to restore any customizations.') ?> 228 228 </form> 229 229 </td> … … 236 236 <label for="upload"><?php _e('Choose an image from your computer:'); ?></label><br /><input type="file" id="upload" name="import" /> 237 237 <input type="hidden" name="action" value="save" /> 238 238 <?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 ); ?> 240 240 </p> 241 241 </form> 242 242 </td> -
wp-admin/custom-header.php
468 468 <input type="file" id="upload" name="import" /> 469 469 <input type="hidden" name="action" value="save" /> 470 470 <?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 ); ?> 472 472 </p> 473 473 </form> 474 474 </td> … … 501 501 <th scope="row"><?php _e( 'Remove Image' ); ?></th> 502 502 <td> 503 503 <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 ); ?> 505 505 </td> 506 506 </tr> 507 507 <?php endif; … … 511 511 <th scope="row"><?php _e( 'Reset Image' ); ?></th> 512 512 <td> 513 513 <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 ); ?> 515 515 </td> 516 516 </tr> 517 517 <?php endif; ?> … … 550 550 <th scope="row"><?php _e('Reset Text Color'); ?></th> 551 551 <td> 552 552 <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 ); ?> 554 554 </td> 555 555 </tr> 556 556 <?php } ?> … … 563 563 564 564 wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> 565 565 566 <?php submit_button( ); ?>566 <?php submit_button( null, 'primary', 'save-header-options' ); ?> 567 567 </form> 568 568 </div> 569 569 -
wp-admin/edit-comments.php
202 202 <p class="search-box"> 203 203 <label class="screen-reader-text" for="comment-search-input"><?php _e( 'Search Comments' ); ?>:</label> 204 204 <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 ); ?> 206 206 </p> 207 207 208 208 <input type="hidden" name="mode" value="<?php echo esc_attr($mode); ?>" /> -
wp-admin/edit-form-comment.php
71 71 <?php echo "<a class='submitdelete deletion' href='" . wp_nonce_url("comment.php?action=" . ( !EMPTY_TRASH_DAYS ? 'deletecomment' : 'trashcomment' ) . "&c=$comment->comment_ID&_wp_original_http_referer=" . urlencode(wp_get_referer()), 'delete-comment_' . $comment->comment_ID) . "'>" . ( !EMPTY_TRASH_DAYS ? __('Delete Permanently') : __('Move to Trash') ) . "</a>\n"; ?> 72 72 </div> 73 73 <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' ) ); ?> 75 75 </div> 76 76 <div class="clear"></div> 77 77 </div> -
wp-admin/edit-tags.php
225 225 <p class="search-box"> 226 226 <label class="screen-reader-text" for="tag-search-input"><?php echo $tax->labels->search_items; ?>:</label> 227 227 <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 ); ?> 229 229 </p> 230 230 </form> 231 231 <br class="clear" /> … … 334 334 if ( ! is_taxonomy_hierarchical($taxonomy) ) 335 335 do_action('add_tag_form_fields', $taxonomy); 336 336 do_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 338 submit_button( $tax->labels->add_new_item ); 339 340 340 // Back compat hooks. Deprecated in preference to {$taxonomy}_add_form 341 341 if ( 'category' == $taxonomy ) 342 342 do_action('edit_category_form', (object)array('parent' => 0) ); -
wp-admin/edit.php
223 223 <p class="search-box"> 224 224 <label class="screen-reader-text" for="post-search-input"><?php echo $post_type_object->labels->search_items; ?>:</label> 225 225 <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 ); ?> 227 227 </p> 228 228 229 229 <input type="hidden" name="post_status" class="post_status_page" value="<?php echo !empty($_REQUEST['post_status']) ? esc_attr($_REQUEST['post_status']) : 'all'; ?>" /> -
wp-admin/export.php
53 53 <p><?php _e('This format, which we call WordPress eXtended RSS or WXR, will contain your posts, pages, comments, custom fields, categories, and tags.'); ?></p> 54 54 <p><?php _e('Once you’ve saved the download file, you can use the Import function on another WordPress site to import this site.'); ?></p> 55 55 <form action="" method="get"> 56 <?php submit_button( __('Download Export File'), ' secondary' ); ?>56 <?php submit_button( __('Download Export File'), 'button' ); ?> 57 57 <input type="hidden" name="download" value="true" /> 58 58 </p> 59 59 </form> -
wp-admin/includes/class-wp-list-table.php
253 253 echo "\t<option value='$name'>$title</option>\n"; 254 254 echo "</select>\n"; 255 255 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"; 257 258 } 258 259 259 260 /** -
wp-admin/includes/dashboard.php
479 479 <input type="hidden" name="quickpress_post_ID" value="<?php echo $post_ID; ?>" /> 480 480 <input type="hidden" name="post_type" value="post" /> 481 481 <?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 ) ); ?> 483 483 <input type="reset" value="<?php esc_attr_e( 'Reset' ); ?>" class="button" /> 484 484 <span id="publishing-action"> 485 485 <input type="submit" name="publish" id="publish" accesskey="p" tabindex="5" class="button-primary" value="<?php current_user_can('publish_posts') ? esc_attr_e('Publish') : esc_attr_e('Submit for Review'); ?>" /> -
wp-admin/includes/file.php
1037 1037 if ( isset( $_POST[ $field ] ) ) 1038 1038 echo '<input type="hidden" name="' . esc_attr( $field ) . '" value="' . esc_attr( stripslashes( $_POST[ $field ] ) ) . '" />'; 1039 1039 } 1040 submit_button( __( 'Proceed' ), 'button', 'upgrade' ); 1040 1041 ?> 1041 <p class="submit">1042 <input id="upgrade" name="upgrade" type="submit" class="button" value="<?php esc_attr_e('Proceed'); ?>" />1043 </p>1044 1042 </div> 1045 1043 </form> 1046 1044 <?php -
wp-admin/includes/list-table-comments.php
201 201 echo "\t<option value='" . esc_attr( $type ) . "'" . selected( $comment_type, $type, false ) . ">$label</option>\n"; 202 202 ?> 203 203 </select> 204 <input type="submit" id="post-query-submit" value="<?php esc_attr_e( 'Filter' ); ?>" class="button-secondary" />205 204 <?php 205 submit_button( __( 'Filter' ), 'secondary', 'post-query-submit', false ); 206 206 } 207 207 208 208 if ( ( 'spam' == $comment_status || 'trash' == $comment_status ) && current_user_can( 'moderate_comments' ) ) { 209 209 wp_nonce_field( 'bulk-destroy', '_destroy_nonce' ); 210 210 $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 211 submit_button( $title, 'button-secondary apply', 'delete_all', false ); 214 212 } 215 ?>216 <?php217 213 do_action( 'manage_comments_nav', $comment_status ); 218 214 echo '</div>'; 219 215 } -
wp-admin/includes/list-table-links.php
69 69 'orderby' => 'name', 70 70 ); 71 71 wp_dropdown_categories( $dropdown_options ); 72 submit_button( __( 'Filter' ), 'secondary', 'post-query-submit', false ); 72 73 ?> 73 <input type="submit" id="post-query-submit" value="<?php esc_attr_e( 'Filter' ); ?>" class="button-secondary" />74 74 </div> 75 75 <?php 76 76 } -
wp-admin/includes/list-table-media.php
97 97 $this->months_dropdown( $post_type ); 98 98 99 99 do_action( 'restrict_manage_posts' ); 100 ?> 101 <input type="submit" id="post-query-submit" value="<?php esc_attr_e( 'Filter' ); ?>" class="button-secondary" /> 102 <?php 100 submit_button( __( 'Filter' ), 'secondary', 'post-query-submit', false ); 103 101 } 104 102 105 if ( $detached ) { ?>106 <input type="submit" id="find_detached" name="find_detached" value="<?php esc_attr_e( 'Scan for lost attachments' ); ?>" class="button-secondary" />107 <?php } elseif ( $this->is_trash && current_user_can( 'edit_others_posts' ) ) { ?>108 <input type="submit" id="delete_all" name="delete_all" value="<?php esc_attr_e( 'Empty Trash' ); ?>" class="button-secondary apply" />109 <?php} ?>103 if ( $detached ) { 104 submit_button( __( 'Scan for lost attachments' ), 'secondary', 'find_detached', false ); 105 } elseif ( $this->is_trash && current_user_can( 'edit_others_posts' ) ) { 106 submit_button( __( 'Empty Trash' ), 'button-secondary apply', 'delete_all', false ); 107 } ?> 110 108 </div> 111 109 <?php 112 110 } -
wp-admin/includes/list-table-plugins.php
282 282 283 283 if ( 'recently_activated' == $status ) { ?> 284 284 <div class="alignleft actions"> 285 < input type="submit" name="clear-recent-list" value="<?php esc_attr_e( 'Clear List' ) ?>" class="button-secondary" />285 <?php submit_button( __( 'Clear List' ), 'secondary', 'clear-recent-list', false ); ?> 286 286 </div> 287 287 <?php } 288 288 } -
wp-admin/includes/list-table-posts.php
199 199 wp_dropdown_categories( $dropdown_options ); 200 200 } 201 201 do_action( 'restrict_manage_posts' ); 202 submit_button( __( 'Filter' ), 'secondary', 'post-query-submit', false ); 202 203 ?> 203 <input type="submit" id="post-query-submit" value="<?php esc_attr_e( 'Filter' ); ?>" class="button-secondary" />204 204 </div> 205 205 <?php 206 206 } 207 207 208 208 if ( $this->is_trash && current_user_can( $post_type_object->cap->edit_others_posts ) ) { 209 ?> 210 <input type="submit" name="delete_all" id="delete_all" value="<?php esc_attr_e( 'Empty Trash' ); ?>" class="button-secondary apply" /> 211 <?php 209 submit_button( __( 'Empty Trash' ), 'button-secondary apply', 'delete_all', false ); 212 210 } 213 211 } 214 212 … … 961 959 <a accesskey="s" href="#inline-edit" title="<?php _e( 'Update' ); ?>" class="button-primary save alignright"><?php echo esc_attr( $update_text ); ?></a> 962 960 <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" /> 963 961 <?php } else { 964 $update_text = __( 'Update' ); 965 ?> 966 <input accesskey="s" class="button-primary alignright" type="submit" name="bulk_edit" value="<?php echo esc_attr( $update_text ); ?>" /> 967 <?php } ?> 962 submit_button( __( 'Update' ), 'button-primary alignright', 'bulk_edit', false, array( 'accesskey' => 's' ) ); 963 } ?> 968 964 <input type="hidden" name="post_view" value="<?php echo esc_attr( $m ); ?>" /> 969 965 <input type="hidden" name="screen" value="<?php echo esc_attr( $screen->id ); ?>" /> 970 966 <br class="clear" /> -
wp-admin/includes/list-table-users.php
112 112 <option value=''><?php _e( 'Change role to…' ) ?></option> 113 113 <?php wp_dropdown_roles(); ?> 114 114 </select> 115 < input type="submit" value="<?php esc_attr_e( 'Change' ); ?>" name="changeit" class="button-secondary" />115 <?php submit_button( __( 'Change' ), 'secondary', 'changeit', false ); ?> 116 116 </div> 117 117 <?php 118 118 } -
wp-admin/includes/media.php
1216 1216 ); 1217 1217 1218 1218 if ( $send ) 1219 $send = "<input type='submit' class='button' name='send[$attachment_id]' value='" . esc_attr__( 'Insert into Post' ) . "' />";1219 $send = get_submit_button( __( 'Insert into Post' ), 'button', "send[$attachment_id]", false ); 1220 1220 if ( $delete && current_user_can( 'delete_post', $attachment_id ) ) { 1221 1221 if ( !EMPTY_TRASH_DAYS ) { 1222 1222 $delete = "<a href='" . wp_nonce_url( "post.php?action=delete&post=$attachment_id", 'delete-attachment_' . $attachment_id ) . "' id='del[$attachment_id]' class='delete'>" . __( 'Delete Permanently' ) . '</a>'; … … 1457 1457 <div id="html-upload-ui"> 1458 1458 <?php do_action('pre-html-upload-ui'); ?> 1459 1459 <p id="async-upload-wrap"> 1460 <label class="screen-reader-text" for="async-upload"><?php _e('Upload'); ?></label> 1461 <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> 1460 <label class="screen-reader-text" for="async-upload"><?php _e('Upload'); ?></label> 1461 <input type="file" name="async-upload" id="async-upload" /> 1462 <?php submit_button( __( 'Upload' ), 'button', 'html-upload', false ); ?> 1463 <a href="#" onclick="try{top.tb_remove();}catch(e){}; return false;"><?php _e('Cancel'); ?></a> 1462 1464 </p> 1463 1465 <div class="clear"></div> 1464 1466 <p class="media-upload-size"><?php printf( __( 'Maximum upload file size: %d%s' ), $upload_size_unit, $sizes[$u] ); ?></p> … … 1490 1492 ?> 1491 1493 1492 1494 <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"> 1493 < input type="submit" class="hidden" name="save" value="" />1495 <?php submit_button( '', 'hidden', 'save', false ); ?> 1494 1496 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" /> 1495 1497 <?php wp_nonce_field('media-form'); ?> 1496 1498 … … 1523 1525 ?> 1524 1526 </div> 1525 1527 <p class="savebutton ml-submit"> 1526 < input type="submit" class="button" name="save" value="<?php esc_attr_e( 'Save all changes' ); ?>" />1528 <?php submit_button( __( 'Save all changes' ), 'button', 'save', false ); ?> 1527 1529 </p> 1528 1530 </form> 1529 1531 <?php … … 1703 1705 </div> 1704 1706 1705 1707 <p class="ml-submit"> 1706 < input type="submit" class="button savebutton" style="display:none;" name="save" id="save-all" value="<?php esc_attr_e( 'Save all changes' ); ?>" />1708 <?php submit_button( __( 'Save all changes' ), 'button savebutton', 'save', false, array( 'id' => 'save-all', 'style' => 'display: none;' ) ); ?> 1707 1709 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" /> 1708 1710 <input type="hidden" name="type" value="<?php echo esc_attr( $GLOBALS['type'] ); ?>" /> 1709 1711 <input type="hidden" name="tab" value="<?php echo esc_attr( $GLOBALS['tab'] ); ?>" /> … … 1826 1828 <p id="media-search" class="search-box"> 1827 1829 <label class="screen-reader-text" for="media-search-input"><?php _e('Search Media');?>:</label> 1828 1830 <input type="text" id="media-search-input" name="s" value="<?php the_search_query(); ?>" /> 1829 < input type="submit" value="<?php esc_attr_e( 'Search Media' ); ?>" class="button" />1831 <?php submit_button( __( 'Search Media' ), 'button', '', false ); ?> 1830 1832 </p> 1831 1833 1832 1834 <ul class="subsubsub"> … … 1913 1915 </select> 1914 1916 <?php } ?> 1915 1917 1916 < input type="submit" id="post-query-submit" value="<?php echo esc_attr( __( 'Filter »' ) ); ?>" class="button-secondary" />1918 <?php submit_button( __( 'Filter »' ), 'secondary', 'post-query-submit', false ); ?> 1917 1919 1918 1920 </div> 1919 1921 … … 1943 1945 <?php echo get_media_items(null, $errors); ?> 1944 1946 </div> 1945 1947 <p class="ml-submit"> 1946 < input type="submit" class="button savebutton" name="save" value="<?php esc_attr_e( 'Save all changes' ); ?>" />1948 <?php submit_button( __( 'Save all changes' ), 'button savebutton', 'save', false ); ?> 1947 1949 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" /> 1948 1950 </p> 1949 1951 </form> … … 2141 2143 <tr> 2142 2144 <td></td> 2143 2145 <td> 2144 <input type="submit" class="button" name="insertonlybutton" value="' . esc_attr__('Insert into Post') . '" />2146 ' . get_submit_button( __( 'Insert into Post' ), 'button', 'insertonlybutton', false ) . ' 2145 2147 </td> 2146 2148 </tr> 2147 2149 '; -
wp-admin/includes/meta-boxes.php
22 22 23 23 <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?> 24 24 <div style="display:none;"> 25 < input type="submit" name="save" value="<?php esc_attr_e('Save'); ?>" />25 <?php submit_button( __( 'Save' ), 'button', 'save' ); ?> 26 26 </div> 27 27 28 28 <div id="minor-publishing-actions"> … … 211 211 if ( $can_publish ) : 212 212 if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> 213 213 <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' ) ); ?> 215 215 <?php else : ?> 216 216 <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' ) ); ?> 218 218 <?php endif; 219 219 else : ?> 220 220 <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' ) ); ?> 222 222 <?php 223 223 endif; 224 224 } else { ?> … … 582 582 583 583 <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?> 584 584 <div style="display:none;"> 585 < input type="submit" name="save" value="<?php esc_attr_e('Save'); ?>" />585 <?php submit_button( __( 'Save' ), 'button', 'save', false ); ?> 586 586 </div> 587 587 588 588 <div id="minor-publishing-actions"> -
wp-admin/includes/nav-menu.php
495 495 ?> 496 496 <p class="button-controls"> 497 497 <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 ) ); ?> 499 499 </p> 500 500 <?php 501 501 } … … 671 671 <p class="quick-search-wrap"> 672 672 <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; ?>" /> 673 673 <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 ); ?> 675 675 </p> 676 676 677 677 <ul id="<?php echo $post_type_name; ?>-search-checklist" class="list:<?php echo $post_type_name?> categorychecklist form-no-clear"> … … 898 898 <p class="quick-search-wrap"> 899 899 <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; ?>" /> 900 900 <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 ); ?> 902 902 </p> 903 903 904 904 <ul id="<?php echo $taxonomy_name; ?>-search-checklist" class="list:<?php echo $taxonomy_name?> categorychecklist form-no-clear"> -
wp-admin/includes/plugin-install.php
129 129 </select> 130 130 <input type="text" name="s" value="<?php echo esc_attr($term) ?>" /> 131 131 <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 ); ?> 133 133 </form><?php 134 134 } 135 135 -
wp-admin/includes/template.php
495 495 $r .= "\n\t<tr id='meta-{$entry['meta_id']}' class='$style'>"; 496 496 $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']}' />"; 497 497 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>"; 501 503 $r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false ); 502 504 $r .= "</td>"; 503 505 … … 557 559 </tr> 558 560 559 561 <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' ) ); ?> 561 563 <?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?> 562 564 </td></tr> 563 565 </tbody> … … 843 845 <input type="hidden" name="action" value="save" /> 844 846 <input type="hidden" name="max_file_size" value="<?php echo $bytes; ?>" /> 845 847 </p> 846 <?php submit_button( __('Upload file and import'), ' secondary' ); ?>848 <?php submit_button( __('Upload file and import'), 'button' ); ?> 847 849 </form> 848 850 <?php 849 851 endif; … … 1357 1359 </div> 1358 1360 <div class="find-box-buttons"> 1359 1361 <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 ); ?> 1361 1363 </div> 1362 1364 </div> 1363 1365 <?php … … 1889 1891 $return = "<div class='screen-options'>\n"; 1890 1892 if ( !empty($per_page_label) ) 1891 1893 $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 ); 1893 1895 $return .= "<input type='hidden' name='wp_screen_options[option]' value='" . esc_attr($option) . "' />"; 1894 1896 $return .= "</div>\n"; 1895 1897 return $return; … … 2086 2088 } 2087 2089 2088 2090 /** 2089 * Echos a paragraph-wrappedsubmit button, with provided text and appropriate class2091 * Echos a submit button, with provided text and appropriate class 2090 2092 * 2091 2093 * @since 3.1.0 2092 2094 * 2093 2095 * @param string $text The text of the button (defaults to 'Save Changes') 2094 2096 * @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" 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. 2096 2106 */ 2097 function submit_button( $text = NULL, $type = 'primary', $name = 'submit' ) {2098 echo get_submit_button( $text, $type, $name );2107 function submit_button( $text = NULL, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = NULL ) { 2108 echo get_submit_button( $text, $type, $name, $wrap, $other_attributes ); 2099 2109 } 2100 2110 2101 2111 /** 2102 * Returns a paragraph-wrappedsubmit button, with provided text and appropriate class2112 * Returns a submit button, with provided text and appropriate class 2103 2113 * 2104 2114 * @since 3.1.0 2105 2115 * 2106 2116 * @param string $text The text of the button (defaults to 'Save Changes') 2107 2117 * @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" 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. 2109 2127 */ 2110 function get_submit_button( $text = NULL, $type = 'primary', $name = 'submit' ) {2128 function get_submit_button( $text = NULL, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = NULL ) { 2111 2129 switch ( $type ) : 2112 2130 case 'primary' : 2113 2131 case 'secondary' : … … 2120 2138 $class = $type; // Custom cases can just pass in the classes they want to be used 2121 2139 endswitch; 2122 2140 $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>'; 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; 2124 2165 } 2125 2166 -
wp-admin/includes/theme-install.php
63 63 <option value="tag" <?php selected('tag', $type) ?>><?php _ex('Tag', 'Theme Installer'); ?></option> 64 64 </select> 65 65 <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 ); ?> 67 67 </form> 68 68 <?php 69 69 } … … 106 106 107 107 </div> 108 108 <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' ); ?> 110 110 </form> 111 111 <?php 112 112 } … … 119 119 <form method="post" enctype="multipart/form-data" action="<?php echo self_admin_url('update.php?action=upload-theme') ?>"> 120 120 <?php wp_nonce_field( 'theme-upload') ?> 121 121 <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 ); ?> 124 123 </form> 125 124 <?php 126 125 } -
wp-admin/includes/widgets.php
203 203 </div> 204 204 <div class="alignright<?php if ( 'noform' === $has_form ) echo ' widget-control-noform'; ?>"> 205 205 <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 ); ?> 207 207 </div> 208 208 <br class="clear" /> 209 209 </div> -
wp-admin/install.php
133 133 <td colspan="2"><label><input type="checkbox" name="blog_public" value="1" <?php checked( $blog_public ); ?> /> <?php _e( 'Allow my site to appear in search engines like Google and Technorati.' ); ?></label></td> 134 134 </tr> 135 135 </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> 137 137 </form> 138 138 <?php 139 139 } // end display_setup_form() -
wp-admin/link-manager.php
76 76 <p class="search-box"> 77 77 <label class="screen-reader-text" for="link-search-input"><?php _e( 'Search Links' ); ?>:</label> 78 78 <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 ); ?> 80 80 </p> 81 81 </form> 82 82 <br class="clear" /> -
wp-admin/media-upload.php
90 90 <input type="hidden" name="post_id" id="post_id" value="0" /> 91 91 <?php wp_nonce_field('media-form'); ?> 92 92 <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' ); ?> 96 94 </form> 97 95 </div> 98 96 -
wp-admin/media.php
91 91 92 92 <form method="post" action="" class="media-upload-form" id="media-single-form"> 93 93 <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 ); ?> 95 95 </p> 96 96 97 97 <div class="media-single"> … … 100 100 </div> 101 101 </div> 102 102 103 <?php submit_button( __( 'Update Media')); ?>103 <?php submit_button( __( 'Update Media' ), 'primary', 'save' ); ?> 104 104 <input type="hidden" name="post_id" id="post_id" value="<?php echo isset($post_id) ? esc_attr($post_id) : ''; ?>" /> 105 105 <input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr($att_id); ?>" /> 106 106 <input type="hidden" name="action" value="editattachment" /> -
wp-admin/ms-delete-site.php
70 70 <form method="post" name="deletedirect"> 71 71 <input type="hidden" name="action" value="deleteblog" /> 72 72 <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' ) ); ?> 74 74 </form> 75 75 <?php 76 76 } -
wp-admin/my-sites.php
102 102 </table> 103 103 <input type="hidden" name="action" value="updateblogsettings" /> 104 104 <?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(); ?> 108 106 </form> 109 107 </div> 110 108 <?php -
wp-admin/nav-menus.php
494 494 <option value="0"><?php esc_html_e('Add New Menu'); ?></option> 495 495 </select> 496 496 <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 ); ?> 498 498 </form> 499 499 </div> 500 500 <div class="nav-tabs-wrapper"> … … 556 556 <?php endif; ?> 557 557 <br class="clear" /> 558 558 <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 ); ?> 560 560 </div><!-- END .publishing-action --> 561 561 562 562 <?php if ( ! empty( $nav_menu_selected_id ) ) : ?> … … 593 593 <div id="nav-menu-footer"> 594 594 <div class="major-publishing-actions"> 595 595 <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 ); ?> 597 597 </div> 598 598 </div> 599 599 </div><!-- /#nav-menu-footer --> -
wp-admin/network.php
275 275 </td> 276 276 </tr> 277 277 </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' ); ?> 279 279 </form> 280 <?php280 <?php 281 281 } 282 282 283 283 /** -
wp-admin/network/edit.php
347 347 <input type="hidden" name="_wp_http_referer" value="<?php echo esc_attr( wp_get_referer() ); ?>" /> 348 348 <?php wp_nonce_field( $_GET['action2'], '_wpnonce', false ); ?> 349 349 <p><?php echo esc_html( stripslashes( $_GET['msg'] ) ); ?></p> 350 <?php submit_button( __('Confirm'), ' secondary' ); ?>350 <?php submit_button( __('Confirm'), 'button' ); ?> 351 351 </form> 352 352 </body> 353 353 </html> -
wp-admin/network/sites.php
110 110 <p class="search-box"> 111 111 <input type="hidden" name="action" value="blogs" /> 112 112 <input type="text" name="s" value="<?php echo esc_attr( $s ); ?>" /> 113 < input type="submit" class="button" value="<?php esc_attr_e( 'Search Site by' ) ?>" />113 <?php submit_button( __( 'Search Site by' ), 'button', 'submit', false ); ?> 114 114 <select name="searchaction"> 115 115 <option value="name" selected="selected"><?php _e( 'Name' ); ?></option> 116 116 <option value="id"><?php _e( 'ID' ); ?></option> -
wp-admin/network/themes.php
40 40 <?php screen_icon(); ?> 41 41 <h2><?php _e( 'Network Themes' ) ?></h2> 42 42 <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' ), '', '' ); ?> 45 44 <table class="widefat"> 46 45 <thead> 47 46 <tr> … … 83 82 <?php } ?> 84 83 </tbody> 85 84 </table> 86 87 <p class="submit"> 88 <input type="submit" value="<?php _e( 'Apply Changes' ) ?>" /></p> 85 86 <?php submit_button( __( 'Apply Changes' ), '', '' ); ?> 89 87 </form> 90 88 91 89 <h3><?php _e( 'Total' )?></h3> -
wp-admin/network/users.php
73 73 <form action="" method="get" class="search-form"> 74 74 <p class="search-box"> 75 75 <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 ); ?> 77 77 </p> 78 78 </form> 79 79 -
wp-admin/options.php
212 212 213 213 <input type="hidden" name="page_options" value="<?php echo esc_attr( implode( ',', $options_to_update ) ); ?>" /> 214 214 215 <?php submit_button( __( 'Save Changes')); ?>215 <?php submit_button( __( 'Save Changes' ), 'primary', 'Update' ); ?> 216 216 217 217 </form> 218 218 </div> -
wp-admin/plugin-editor.php
185 185 } 186 186 ?> 187 187 </select> 188 < input type="submit" name="Submit" value="<?php esc_attr_e('Select') ?>" class="button" />188 <?php submit_button( __( 'Select' ), 'button', 'Submit', false ); ?> 189 189 </form> 190 190 </div> 191 191 <br class="clear" /> … … 229 229 <?php } ?> 230 230 <p class="submit"> 231 231 <?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 } 236 238 ?> 237 239 </p> 238 240 <?php else : ?> -
wp-admin/plugins.php
253 253 echo '<input type="hidden" name="checked[]" value="' . esc_attr($plugin) . '" />'; 254 254 ?> 255 255 <?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 ); ?> 257 257 </form> 258 258 <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 ); ?> 260 260 </form> 261 261 262 262 <p><a href="#" onclick="jQuery('#files-list').toggle(); return false;"><?php _e('Click to view entire list of files which will be deleted'); ?></a></p> … … 357 357 <p class="search-box"> 358 358 <label class="screen-reader-text" for="plugin-search-input"><?php _e( 'Search Plugins' ); ?>:</label> 359 359 <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 ); ?> 361 361 </p> 362 362 </form> 363 363 -
wp-admin/press-this.php
472 472 <h3><?php _e('Publish') ?></h3> 473 473 <div class="inside"> 474 474 <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 } ?> 481 483 <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" id="saving" style="display:none;" /> 482 484 </p> 483 485 </div> -
wp-admin/setup-config.php
146 146 </tr> 147 147 </table> 148 148 <?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> 150 150 </form> 151 151 <?php 152 152 break; -
wp-admin/theme-editor.php
149 149 } 150 150 ?> 151 151 </select> 152 < input type="submit" name="Submit" value="<?php esc_attr_e('Select') ?>" class="button" />152 <?php submit_button( __( 'Select' ), 'button', 'Submit', false ); ?> 153 153 </form> 154 154 </div> 155 155 <br class="clear" /> … … 224 224 <?php } ?> 225 225 226 226 <div> 227 <?php if ( is_writeable($file) ) : ?>228 <p class="submit">229 227 <?php 230 echo "<input type='submit' name='submit' class='button-primary' value='" . esc_attr__('Update File') . "' tabindex='2' />"; 231 ?> 232 </p> 233 <?php else : ?> 228 if ( is_writeable($file) ) : 229 submit_button( __( 'Update File' ), 'primary', 'submit', true, array( 'tabindex' => '2' ) ); 230 else : ?> 234 231 <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> 235 232 <?php endif; ?> 236 233 </div> -
wp-admin/themes.php
133 133 <p class="search-box"> 134 134 <label class="screen-reader-text" for="theme-search-input"><?php _e('Search Themes'); ?>:</label> 135 135 <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 ); ?> 137 137 <a id="filter-click" href="?filter=1"><?php _e( 'Feature Filter' ); ?></a> 138 138 </p> 139 139 … … 166 166 <?php endforeach; ?> 167 167 168 168 <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' ) ); ?> 170 170 171 171 <small><a id="mini-filter-click" href="<?php echo admin_url( 'themes.php' ); ?>"><?php _e( 'Close filters' )?></a></small> 172 172 </div> -
wp-admin/update-core.php
58 58 echo '<input name="version" value="'. esc_attr($update->current) .'" type="hidden"/>'; 59 59 echo '<input name="locale" value="'. esc_attr($update->locale) .'" type="hidden"/>'; 60 60 if ( $show_buttons ) { 61 echo '<input id="upgrade" class="button" type="submit" value="' . esc_attr($submit) . '" name="upgrade" /> ';62 echo ' <a href="' . esc_url($update->package) . '" class="button">' . $download . '</a> ';61 submit_button( $submit, 'button', 'upgrade', false ); 62 echo ' <a href="' . esc_url($update->package) . '" class="button">' . $download . '</a> '; 63 63 } 64 64 if ( 'en_US' != $update->locale ) 65 65 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 ); 67 67 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 ); 69 69 echo '</p>'; 70 70 if ( 'en_US' != $update->locale && ( !isset($wp_local_package) || $wp_local_package != $update->locale ) ) 71 71 echo '<p class="hint">'.__('This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation.').'</p>'; -
wp-admin/upload.php
206 206 <p class="search-box"> 207 207 <label class="screen-reader-text" for="media-search-input"><?php _e( 'Search Media' ); ?>:</label> 208 208 <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 ); ?> 210 210 </p> 211 211 </form> 212 212 -
wp-admin/user-new.php
265 265 </tr> 266 266 <?php } ?> 267 267 </table> 268 269 <?php submit_button( __('Add User'), 'primary', 'adduser' ); ?> 268 <p class="submit"> 269 <input name="adduser" type="submit" id="addusersub" class="button-primary" value="<?php esc_attr_e('Add User') ?>" /> 270 </p> 270 271 </form> 271 272 272 273 </div> -
wp-admin/users.php
360 360 <p class="search-box"> 361 361 <label class="screen-reader-text" for="user-search-input"><?php _e( 'Search Users' ); ?>:</label> 362 362 <input type="text" id="user-search-input" name="usersearch" value="<?php echo esc_attr($usersearch); ?>" /> 363 < input type="submit" value="<?php esc_attr_e( 'Search Users' ); ?>" class="button" />363 <?php submit_button( __( 'Search Users' ), 'submit', 'submit', false ); ?> 364 364 </p> 365 365 </form> 366 366 -
wp-admin/widgets.php
306 306 </div> 307 307 308 308 <div class="widget-control-actions"> 309 <?php if ( isset($_GET['addnew']) ) { ?> 309 <?php 310 if ( isset($_GET['addnew']) ) { ?> 310 311 <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 ); ?> 315 317 <input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr($widget_id); ?>" /> 316 318 <input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr($id_base); ?>" /> 317 319 <input type="hidden" name="multi_number" class="multi_number" value="<?php echo esc_attr($multi_number); ?>" /> -
wp-includes/comment-template.php
1572 1572 <?php echo apply_filters( 'comment_form_field_comment', $args['comment_field'] ); ?> 1573 1573 <?php echo $args['comment_notes_after']; ?> 1574 1574 <p class="form-submit"> 1575 < input name="submit" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" />1575 <?php submit_button( $args['label_submit'], 'button', 'submit', false, array( 'id' => $args['id_submit'] ) ); ?> 1576 1576 <?php comment_id_fields(); ?> 1577 1577 </p> 1578 1578 <?php do_action( 'comment_form', $post_id ); ?> -
wp-includes/general-template.php
160 160 $form = '<form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" > 161 161 <div><label class="screen-reader-text" for="s">' . __('Search for:') . '</label> 162 162 <input type="text" value="' . get_search_query() . '" name="s" id="s" /> 163 <input type="submit" id="searchsubmit" value="'. esc_attr__('Search') .'" />163 ' . get_submit_button( __( 'Search' ), '', 'searchsubmit', false ) . ' 164 164 </div> 165 165 </form>'; 166 166 … … 283 283 ' . apply_filters( 'login_form_middle', '' ) . ' 284 284 ' . ( $args['remember'] ? '<p class="login-remember"><label><input name="rememberme" type="checkbox" id="' . esc_attr( $args['id_remember'] ) . '" value="forever" tabindex="90"' . ( $args['value_remember'] ? ' checked="checked"' : '' ) . ' /> ' . esc_html( $args['label_remember'] ) . '</label></p>' : '' ) . ' 285 285 <p class="login-submit"> 286 <input type="submit" name="wp-submit" id="' . esc_attr( $args['id_submit'] ) . '" class="button-primary" value="' . esc_attr( $args['label_log_in'] ) . '" tabindex="100" />286 ' . get_submit_button( $args['label_log_in'], 'primary', 'wp-submit', false, array( 'id' => $args['id_submit'], 'tabindex' => 100 ) ) . ' 287 287 <input type="hidden" name="redirect_to" value="' . esc_attr( $args['redirect'] ) . '" /> 288 288 </p> 289 289 ' . apply_filters( 'login_form_bottom', '' ) . ' -
wp-includes/post-template.php
1013 1013 $label = 'pwbox-'.(empty($post->ID) ? rand() : $post->ID); 1014 1014 $output = '<form action="' . get_option('siteurl') . '/wp-pass.php" method="post"> 1015 1015 <p>' . __("This post is password protected. To view it please enter your password below:") . '</p> 1016 <p><label for="' . $label . '">' . __("Password:") . ' <input name="post_password" id="' . $label . '" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . esc_attr__("Submit") . '" /></p> 1016 <p> 1017 <label for="' . $label . '">' . __("Password:") . ' 1018 <input name="post_password" id="' . $label . '" type="password" size="20" /> 1019 </label>' . get_submit_button( __( 'Submit' ), '', 'Submit', false ) . ' 1020 </p> 1017 1021 </form> 1018 1022 '; 1019 1023 return apply_filters('the_password_form', $output); … … 1196 1200 1197 1201 <div class="tablenav"> 1198 1202 <div class="alignleft"> 1199 < input type="submit" class="button-secondary" value="<?php esc_attr_e( 'Compare Revisions' ); ?>" />1203 <?php submit_button( __( 'Compare Revisions' ), 'secondary', '', false ); ?> 1200 1204 <input type="hidden" name="action" value="diff" /> 1201 1205 <input type="hidden" name="post_type" value="<?php echo esc_attr($post->post_type); ?>" /> 1202 1206 </div> -
wp-includes/post.php
5101 5101 ); 5102 5102 5103 5103 $submit_fields = array( 5104 'save' => '<input type="submit" name="save" id="save-post" class="button" tabindex="%s" value="'. esc_attr('Save Draft') .'" />',5104 'save' => get_submit_button( __( 'Save Draft' ), 'button', 'save', false, array( 'id' => 'save-post', 'tabindex' => '%s' ) ), 5105 5105 'reset' => '<input type="reset" tabindex="%s" value="'. esc_attr( 'Reset' ).'" class="button" />', 5106 5106 ); 5107 5107 5108 5108 $publishing_action = current_user_can('publish_posts') ? esc_attr('Publish') : esc_attr('Submit for Review'); 5109 5109 5110 5110 $publishing_fields = array( 5111 'submit' => '<input type="submit" name="publish" id="publish" accesskey="p" tabindex="%s" class="button-primary" value="' . $publishing_action . '" />',5111 'submit' => get_submit_button( $publishing_action, 'primary', 'publish', false, array( 'accesskey' => 'p', 'tabindex' => '%s' ) ), 5112 5112 /*'test' => '<input type="submit" name="publish" id="publish" accesskey="p" tabindex="%n" class="button-primary" value="'. esc_attr('Publish') .'" />', */ 5113 5113 5114 5114 ); -
wp-includes/theme-compat/comments-popup.php
95 95 <p> 96 96 <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /> 97 97 <input type="hidden" name="redirect_to" value="<?php echo esc_attr($_SERVER["REQUEST_URI"]); ?>" /> 98 < input name="submit" type="submit" tabindex="5" value="<?php _e('Say It!' ); ?>" />98 <?php submit_button( __( 'Say It!' ), '', 'submit', false, array( 'tabindex' => '5' ) ); ?> 99 99 </p> 100 100 <?php do_action('comment_form', $post->ID); ?> 101 101 </form> -
wp-includes/theme-compat/comments.php
89 89 90 90 <p><textarea name="comment" id="comment" cols="58" rows="10" tabindex="4"></textarea></p> 91 91 92 <p>< input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit Comment'); ?>" />92 <p><?php submit_button( __( 'Submit Comment' ), '', 'submit', false, array( 'tabindex' => '5' ) ); ?> 93 93 <?php comment_id_fields(); ?> 94 94 </p> 95 95 <?php do_action('comment_form', $post->ID); ?> -
wp-login.php
433 433 </p> 434 434 <?php do_action('lostpassword_form'); ?> 435 435 <input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" /> 436 < p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e('Get New Password'); ?>" tabindex="100" /></p>436 <?php submit_button( __( 'Get New Password' ), 'primary', 'wp-submit', true, array( 'tabindex' => '100' ) ); ?> 437 437 </form> 438 438 439 439 <p id="nav"> … … 488 488 <p class="description indicator-hint"><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ & ).'); ?></p> 489 489 490 490 <br class="clear" /> 491 < p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e('Reset Password'); ?>" tabindex="100" /></p>491 <?php submit_button( __( 'Reset Password' ), 'primary', 'wp-submit', true, array( 'tabindex' => '100' ) ); ?> 492 492 </form> 493 493 494 494 <p id="nav"> … … 546 546 <p id="reg_passmail"><?php _e('A password will be e-mailed to you.') ?></p> 547 547 <br class="clear" /> 548 548 <input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" /> 549 < p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e('Register'); ?>" tabindex="100" /></p>549 <?php submit_button( __( 'Register' ), 'primary', 'wp-submit', true, array( 'tabindex' => '100' ) ); ?> 550 550 </form> 551 551 552 552 <p id="nav"> … … 663 663 <?php do_action('login_form'); ?> 664 664 <p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90"<?php checked( $rememberme ); ?> /> <?php esc_attr_e('Remember Me'); ?></label></p> 665 665 <p class="submit"> 666 < input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e('Log In'); ?>" tabindex="100" />666 <?php submit_button( __( 'Log In' ), 'primary', 'wp-submit', false, array( 'tabindex' => '100' ) ); ?> 667 667 <?php if ( $interim_login ) { ?> 668 668 <input type="hidden" name="interim-login" value="1" /> 669 669 <?php } else { ?> -
wp-signup.php
192 192 <input type="hidden" name="stage" value="gimmeanotherblog" /> 193 193 <?php do_action( "signup_hidden_fields" ); ?> 194 194 <?php show_blog_form($blogname, $blog_title, $errors); ?> 195 < p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e( 'Create Site' ) ?>" /></p>195 <?php submit_button( __( 'Create Site' ), 'submit', 'submit' ); ?> 196 196 </form> 197 197 <?php 198 198 } … … 271 271 <?php } ?> 272 272 </p> 273 273 274 < p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e('Next') ?>" /></p>274 <?php submit_button( __( 'Next' ), 'submit', 'submit' ); ?> 275 275 </form> 276 276 <?php 277 277 } … … 327 327 <input type="hidden" name="user_email" value="<?php echo esc_attr($user_email) ?>" /> 328 328 <?php do_action( "signup_hidden_fields" ); ?> 329 329 <?php show_blog_form($blogname, $blog_title, $errors); ?> 330 < p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e('Signup') ?>" /></p>330 <?php submit_button( __( 'Signup' ), 'submit', 'submit', true ); ?> 331 331 </form> 332 332 <?php 333 333 }