Changeset 16061
- Timestamp:
- 10/28/2010 09:56:43 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 56 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/comment.php
r15674 r16061 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> -
trunk/wp-admin/custom-background.php
r15830 r16061 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> … … 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> … … 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> -
trunk/wp-admin/custom-header.php
r15843 r16061 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> … … 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> … … 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> … … 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> … … 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> -
trunk/wp-admin/edit-comments.php
r15956 r16061 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 -
trunk/wp-admin/edit-form-comment.php
r14647 r16061 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> -
trunk/wp-admin/edit-tags.php
r16032 r16061 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> … … 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 ) -
trunk/wp-admin/edit.php
r15956 r16061 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 -
trunk/wp-admin/export.php
r15961 r16061 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> -
trunk/wp-admin/includes/class-wp-list-table.php
r15958 r16061 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 -
trunk/wp-admin/includes/dashboard.php
r15902 r16061 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"> -
trunk/wp-admin/includes/file.php
r16024 r16061 1067 1067 echo '<input type="hidden" name="' . esc_attr( $field ) . '" value="' . esc_attr( stripslashes( $_POST[ $field ] ) ) . '" />'; 1068 1068 } 1069 submit_button( __( 'Proceed' ), 'button', 'upgrade' ); 1069 1070 ?> 1070 <p class="submit">1071 <input id="upgrade" name="upgrade" type="submit" class="button" value="<?php esc_attr_e('Proceed'); ?>" />1072 </p>1073 1071 </div> 1074 1072 </form> -
trunk/wp-admin/includes/list-table-comments.php
r15969 r16061 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 … … 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 214 } 215 ?> 216 <?php 211 submit_button( $title, 'button-secondary apply', 'delete_all', false ); 212 } 217 213 do_action( 'manage_comments_nav', $comment_status ); 218 214 echo '</div>'; -
trunk/wp-admin/includes/list-table-links.php
r15985 r16061 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 -
trunk/wp-admin/includes/list-table-media.php
r16004 r16061 99 99 100 100 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 } ?> 111 109 </div> 112 110 <?php -
trunk/wp-admin/includes/list-table-plugins.php
r16036 r16061 288 288 if ( 'recently_activated' == $status ) { ?> 289 289 <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 ); ?> 291 291 </div> 292 292 <?php } -
trunk/wp-admin/includes/list-table-posts.php
r16003 r16061 224 224 } 225 225 do_action( 'restrict_manage_posts' ); 226 submit_button( __( 'Filter' ), 'secondary', 'post-query-submit', false ); 226 227 ?> 227 <input type="submit" id="post-query-submit" value="<?php esc_attr_e( 'Filter' ); ?>" class="button-secondary" />228 228 </div> 229 229 <?php … … 231 231 232 232 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 ); 236 234 } 237 235 } … … 986 984 <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" /> 987 985 <?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 } ?> 992 988 <input type="hidden" name="post_view" value="<?php echo esc_attr( $m ); ?>" /> 993 989 <input type="hidden" name="screen" value="<?php echo esc_attr( $screen->id ); ?>" /> -
trunk/wp-admin/includes/list-table-users.php
r15958 r16061 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 -
trunk/wp-admin/includes/media.php
r16057 r16061 1219 1219 1220 1220 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 ); 1222 1222 if ( $delete && current_user_can( 'delete_post', $attachment_id ) ) { 1223 1223 if ( !EMPTY_TRASH_DAYS ) { … … 1460 1460 <?php do_action('pre-html-upload-ui'); ?> 1461 1461 <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> 1464 1466 </p> 1465 1467 <div class="clear"></div> … … 1493 1495 1494 1496 <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 ); ?> 1496 1498 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" /> 1497 1499 <?php wp_nonce_field('media-form'); ?> … … 1526 1528 </div> 1527 1529 <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 ); ?> 1529 1531 </p> 1530 1532 </form> … … 1706 1708 1707 1709 <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;' ) ); ?> 1709 1711 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" /> 1710 1712 <input type="hidden" name="type" value="<?php echo esc_attr( $GLOBALS['type'] ); ?>" /> … … 1829 1831 <label class="screen-reader-text" for="media-search-input"><?php _e('Search Media');?>:</label> 1830 1832 <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 ); ?> 1832 1834 </p> 1833 1835 … … 1916 1918 <?php } ?> 1917 1919 1918 < input type="submit" id="post-query-submit" value="<?php echo esc_attr( __( 'Filter »' ) ); ?>" class="button-secondary" />1920 <?php submit_button( __( 'Filter »' ), 'secondary', 'post-query-submit', false ); ?> 1919 1921 1920 1922 </div> … … 1946 1948 </div> 1947 1949 <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 ); ?> 1949 1951 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" /> 1950 1952 </p> … … 2144 2146 <td></td> 2145 2147 <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 ) . ' 2147 2149 </td> 2148 2150 </tr> -
trunk/wp-admin/includes/meta-boxes.php
r15955 r16061 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 … … 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; … … 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 -
trunk/wp-admin/includes/nav-menu.php
r15815 r16061 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 … … 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 … … 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 -
trunk/wp-admin/includes/plugin-install.php
r15867 r16061 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 } -
trunk/wp-admin/includes/template.php
r15976 r16061 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>"; … … 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> … … 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 … … 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> … … 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"; … … 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 … … 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" 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 */ 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 ); 2109 } 2110 2111 /** 2112 * Returns a submit button, with provided text and appropriate class 2103 2113 * 2104 2114 * @since 3.1.0 … … 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" 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 */ 2128 function get_submit_button( $text = NULL, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = NULL ) { 2111 2129 switch ( $type ) : 2112 2130 case 'primary' : … … 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>'; 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 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 … … 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 … … 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 -
trunk/wp-admin/includes/widgets.php
r14374 r16061 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" /> -
trunk/wp-admin/install.php
r15998 r16061 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 -
trunk/wp-admin/link-manager.php
r15956 r16061 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> -
trunk/wp-admin/media-upload.php
r15834 r16061 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> -
trunk/wp-admin/media.php
r16008 r16061 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 … … 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); ?>" /> -
trunk/wp-admin/ms-delete-site.php
r15245 r16061 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 -
trunk/wp-admin/my-sites.php
r15132 r16061 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> -
trunk/wp-admin/nav-menus.php
r15588 r16061 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> … … 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 … … 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> -
trunk/wp-admin/network.php
r15965 r16061 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 280 <?php 281 281 } 282 282 -
trunk/wp-admin/network/edit.php
r15905 r16061 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> -
trunk/wp-admin/network/sites.php
r16014 r16061 100 100 <input type="hidden" name="action" value="blogs" /> 101 101 <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 ); ?> 103 103 <select name="searchaction"> 104 104 <option value="name" selected="selected"><?php _e( 'Name' ); ?></option> -
trunk/wp-admin/network/themes.php
r15481 r16061 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> … … 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 -
trunk/wp-admin/network/users.php
r15956 r16061 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> -
trunk/wp-admin/options.php
r15830 r16061 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> -
trunk/wp-admin/plugin-editor.php
r16015 r16061 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> … … 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> -
trunk/wp-admin/plugins.php
r16026 r16061 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 … … 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> -
trunk/wp-admin/press-this.php
r15834 r16061 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> -
trunk/wp-admin/setup-config.php
r14404 r16061 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 -
trunk/wp-admin/theme-editor.php
r15853 r16061 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> … … 225 225 226 226 <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 : ?> 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; ?> -
trunk/wp-admin/themes.php
r16008 r16061 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> … … 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> -
trunk/wp-admin/update-core.php
r16008 r16061 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 ) ) -
trunk/wp-admin/upload.php
r15956 r16061 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> -
trunk/wp-admin/user-new.php
r16009 r16061 263 263 <?php } ?> 264 264 </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> 267 268 </form> 268 269 -
trunk/wp-admin/users.php
r16009 r16061 358 358 <label class="screen-reader-text" for="user-search-input"><?php _e( 'Search Users' ); ?>:</label> 359 359 <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 ); ?> 361 361 </p> 362 362 </form> -
trunk/wp-admin/widgets.php
r16008 r16061 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); ?>" /> -
trunk/wp-includes/comment-template.php
r16028 r16061 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> -
trunk/wp-includes/general-template.php
r16050 r16061 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>'; … … 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> -
trunk/wp-includes/post-template.php
r16034 r16061 1026 1026 $output = '<form action="' . get_option('siteurl') . '/wp-pass.php" method="post"> 1027 1027 <p>' . __("This post is password protected. To view it please enter your password below:") . '</p> 1028 <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> 1028 <p> 1029 <label for="' . $label . '">' . __("Password:") . ' 1030 <input name="post_password" id="' . $label . '" type="password" size="20" /> 1031 </label>' . get_submit_button( __( 'Submit' ), '', 'Submit', false ) . ' 1032 </p> 1029 1033 </form> 1030 1034 '; … … 1209 1213 <div class="tablenav"> 1210 1214 <div class="alignleft"> 1211 < input type="submit" class="button-secondary" value="<?php esc_attr_e( 'Compare Revisions' ); ?>" />1215 <?php submit_button( __( 'Compare Revisions' ), 'secondary', '', false ); ?> 1212 1216 <input type="hidden" name="action" value="diff" /> 1213 1217 <input type="hidden" name="post_type" value="<?php echo esc_attr($post->post_type); ?>" /> -
trunk/wp-includes/post.php
r16050 r16061 5124 5124 5125 5125 $submit_fields = array( 5126 'save' => '<input type="submit" name="save" id="save-post" class="button" tabindex="%s" value="'. esc_attr('Save Draft') .'" />',5126 'save' => get_submit_button( __( 'Save Draft' ), 'button', 'save', false, array( 'id' => 'save-post', 'tabindex' => '%s' ) ), 5127 5127 'reset' => '<input type="reset" tabindex="%s" value="'. esc_attr( 'Reset' ).'" class="button" />', 5128 5128 ); … … 5131 5131 5132 5132 $publishing_fields = array( 5133 'submit' => '<input type="submit" name="publish" id="publish" accesskey="p" tabindex="%s" class="button-primary" value="' . $publishing_action . '" />',5133 'submit' => get_submit_button( $publishing_action, 'primary', 'publish', false, array( 'accesskey' => 'p', 'tabindex' => '%s' ) ), 5134 5134 /*'test' => '<input type="submit" name="publish" id="publish" accesskey="p" tabindex="%n" class="button-primary" value="'. esc_attr('Publish') .'" />', */ 5135 5135 -
trunk/wp-includes/theme-compat/comments-popup.php
r15843 r16061 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); ?> -
trunk/wp-includes/theme-compat/comments.php
r15843 r16061 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> -
trunk/wp-login.php
r16009 r16061 412 412 <?php do_action('lostpassword_form'); ?> 413 413 <input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" /> 414 < 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>414 <?php submit_button( __( 'Get New Password' ), 'primary', 'wp-submit', true, array( 'tabindex' => '100' ) ); ?> 415 415 </form> 416 416 … … 468 468 469 469 <br class="clear" /> 470 < 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>470 <?php submit_button( __( 'Reset Password' ), 'primary', 'wp-submit', true, array( 'tabindex' => '100' ) ); ?> 471 471 </form> 472 472 … … 524 524 <br class="clear" /> 525 525 <input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" /> 526 < p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e('Register'); ?>" tabindex="100" /></p>526 <?php submit_button( __( 'Register' ), 'primary', 'wp-submit', true, array( 'tabindex' => '100' ) ); ?> 527 527 </form> 528 528 … … 641 641 <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> 642 642 <p class="submit"> 643 < input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e('Log In'); ?>" tabindex="100" />643 <?php submit_button( __( 'Log In' ), 'primary', 'wp-submit', false, array( 'tabindex' => '100' ) ); ?> 644 644 <?php if ( $interim_login ) { ?> 645 645 <input type="hidden" name="interim-login" value="1" /> -
trunk/wp-signup.php
r16009 r16061 192 192 <?php do_action( "signup_hidden_fields" ); ?> 193 193 <?php show_blog_form($blogname, $blog_title, $errors); ?> 194 < p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e( 'Create Site' ) ?>" /></p>194 <?php submit_button( __( 'Create Site' ), 'submit', 'submit' ); ?> 195 195 </form> 196 196 <?php … … 271 271 </p> 272 272 273 < p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e('Next') ?>" /></p>273 <?php submit_button( __( 'Next' ), 'submit', 'submit' ); ?> 274 274 </form> 275 275 <?php … … 327 327 <?php do_action( "signup_hidden_fields" ); ?> 328 328 <?php show_blog_form($blogname, $blog_title, $errors); ?> 329 < p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e('Signup') ?>" /></p>329 <?php submit_button( __( 'Signup' ), 'submit', 'submit', true ); ?> 330 330 </form> 331 331 <?php
Note: See TracChangeset
for help on using the changeset viewer.