Use submit_button() in more places. See #15064

git-svn-id: http://svn.automattic.com/wordpress/trunk@15830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
scribu 2010-10-17 18:24:34 +00:00
parent af29ce4440
commit 799baf139c
14 changed files with 32 additions and 31 deletions

View File

@ -48,9 +48,7 @@ get_header();
<label for="key"><?php _e('Activation Key:') ?></label> <label for="key"><?php _e('Activation Key:') ?></label>
<br /><input type="text" name="key" id="key" value="" size="50" /> <br /><input type="text" name="key" id="key" value="" size="50" />
</p> </p>
<p class="submit"> <?php submit_button( __('Activate'), 'submit' ); ?>
<input id="submit" type="submit" name="Submit" class="submit" value="<?php esc_attr_e('Activate') ?>" />
</p>
</form> </form>
<?php } else { <?php } else {

View File

@ -303,7 +303,7 @@ if ( get_background_image() ) {
</table> </table>
<?php wp_nonce_field('custom-background'); ?> <?php wp_nonce_field('custom-background'); ?>
<p class="submit"><input type="submit" class="button-primary" name="save-background-options" value="<?php esc_attr_e('Save Changes'); ?>" /></p> <?php submit_button( null, 'primary', 'save-background-options' ); ?>
</form> </form>
</div> </div>

View File

@ -562,7 +562,8 @@ class Custom_Image_Header {
do_action( 'custom_header_options' ); do_action( 'custom_header_options' );
wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
<p class="submit"><input type="submit" class="button-primary" name="save-header-options" value="<?php esc_attr_e( 'Save Changes' ); ?>" /></p>
<?php submit_button(); ?>
</form> </form>
</div> </div>
@ -636,7 +637,6 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
<img src="<?php echo esc_url( $url ); ?>" id="upload" width="<?php echo $width; ?>" height="<?php echo $height; ?>" /> <img src="<?php echo esc_url( $url ); ?>" id="upload" width="<?php echo $width; ?>" height="<?php echo $height; ?>" />
</div> </div>
<p class="submit">
<input type="hidden" name="x1" id="x1" value="0"/> <input type="hidden" name="x1" id="x1" value="0"/>
<input type="hidden" name="y1" id="y1" value="0"/> <input type="hidden" name="y1" id="y1" value="0"/>
<input type="hidden" name="width" id="width" value="<?php echo esc_attr( $width ); ?>"/> <input type="hidden" name="width" id="width" value="<?php echo esc_attr( $width ); ?>"/>
@ -644,7 +644,8 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
<input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr( $id ); ?>" /> <input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr( $id ); ?>" />
<input type="hidden" name="oitar" id="oitar" value="<?php echo esc_attr( $oitar ); ?>" /> <input type="hidden" name="oitar" id="oitar" value="<?php echo esc_attr( $oitar ); ?>" />
<?php wp_nonce_field( 'custom-header-crop-image' ) ?> <?php wp_nonce_field( 'custom-header-crop-image' ) ?>
<input type="submit" class="button-primary" value="<?php esc_attr_e( 'Crop and Publish' ); ?>" />
<?php submit_button( __( 'Crop and Publish' ) ); ?>
</p> </p>
</form> </form>
</div> </div>

View File

@ -86,7 +86,8 @@ else
do_action('edit_tag_form', $tag); do_action('edit_tag_form', $tag);
do_action($taxonomy . '_edit_form', $tag, $taxonomy); do_action($taxonomy . '_edit_form', $tag, $taxonomy);
submit_button( __('Update') );
?> ?>
<p class="submit"><input type="submit" class="button-primary" name="submit" value="<?php echo esc_attr( __( 'Update' ) ); ?>" /></p>
</form> </form>
</div> </div>

View File

@ -136,7 +136,7 @@ foreach ( (array) $authors as $author ) {
</td> </td>
</tr> </tr>
</table> </table>
<p class="submit"><input type="submit" name="submit" class="button" value="<?php esc_attr_e('Download Export File'); ?>" /> <?php submit_button( __('Download Export File'), 'secondary' ); ?>
<input type="hidden" name="download" value="true" /> <input type="hidden" name="download" value="true" />
</p> </p>
</form> </form>

View File

@ -152,8 +152,8 @@ function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_
function _wp_dashboard_control_callback( $dashboard, $meta_box ) { function _wp_dashboard_control_callback( $dashboard, $meta_box ) {
echo '<form action="" method="post" class="dashboard-widget-control-form">'; echo '<form action="" method="post" class="dashboard-widget-control-form">';
wp_dashboard_trigger_widget_control( $meta_box['id'] ); wp_dashboard_trigger_widget_control( $meta_box['id'] );
echo '<p class="submit"><input type="hidden" name="widget_id" value="' . esc_attr($meta_box['id']) . '" /><input type="submit" value="' . esc_attr__( 'Submit' ) . '" /></p>'; echo '<input type="hidden" name="widget_id" value="' . esc_attr($meta_box['id']) . '" />';
submit_button( __('Submit') );
echo '</form>'; echo '</form>';
} }

View File

@ -843,9 +843,7 @@ function wp_import_upload_form( $action ) {
<input type="hidden" name="action" value="save" /> <input type="hidden" name="action" value="save" />
<input type="hidden" name="max_file_size" value="<?php echo $bytes; ?>" /> <input type="hidden" name="max_file_size" value="<?php echo $bytes; ?>" />
</p> </p>
<p class="submit"> <?php submit_button( __('Upload file and import'), 'secondary' ); ?>
<input type="submit" class="button" value="<?php esc_attr_e( 'Upload file and import' ); ?>" />
</p>
</form> </form>
<?php <?php
endif; endif;

View File

@ -100,14 +100,13 @@ case 'edit' :
</div> </div>
</div> </div>
<p class="submit"> <?php submit_button( __('Update Media') ); ?>
<input type="submit" class="button-primary" name="save" value="<?php esc_attr_e('Update Media'); ?>" />
<input type="hidden" name="post_id" id="post_id" value="<?php echo isset($post_id) ? esc_attr($post_id) : ''; ?>" /> <input type="hidden" name="post_id" id="post_id" value="<?php echo isset($post_id) ? esc_attr($post_id) : ''; ?>" />
<input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr($att_id); ?>" /> <input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr($att_id); ?>" />
<input type="hidden" name="action" value="editattachment" /> <input type="hidden" name="action" value="editattachment" />
<?php wp_original_referer_field(true, 'previous'); ?> <?php wp_original_referer_field(true, 'previous'); ?>
<?php wp_nonce_field('media-form'); ?> <?php wp_nonce_field('media-form'); ?>
</p>
</form> </form>
</div> </div>

View File

@ -74,8 +74,9 @@ function confirm_delete_users( $users ) {
} }
} }
} }
submit_button( __('Confirm Deletion'), 'delete' );
?> ?>
<p class="submit"><input type="submit" class="button-secondary delete" value="<?php esc_attr_e( 'Confirm Deletion' ); ?>" /></p>
</form> </form>
<?php <?php
return true; return true;
@ -502,7 +503,7 @@ switch ( $_GET['action'] ) {
<input type="hidden" name="_wp_http_referer" value="<?php echo esc_attr( wp_get_referer() ); ?>" /> <input type="hidden" name="_wp_http_referer" value="<?php echo esc_attr( wp_get_referer() ); ?>" />
<?php wp_nonce_field( $_GET['action2'], '_wpnonce', false ); ?> <?php wp_nonce_field( $_GET['action2'], '_wpnonce', false ); ?>
<p><?php echo esc_html( stripslashes( $_GET['msg'] ) ); ?></p> <p><?php echo esc_html( stripslashes( $_GET['msg'] ) ); ?></p>
<p class="submit"><input class="button" type="submit" value="<?php _e( 'Confirm' ); ?>" /></p> <?php submit_button( __('Confirm'), 'secondary' ); ?>
</form> </form>
</body> </body>
</html> </html>

View File

@ -273,7 +273,7 @@ if (isset($_GET['updated'])) {
<?php do_action( 'wpmu_options' ); // Add more options here ?> <?php do_action( 'wpmu_options' ); // Add more options here ?>
<p class="submit"><input type="submit" class="button-primary" name="Submit" value="<?php esc_attr_e( 'Save Changes' ) ?>" /></p> <?php submit_button(); ?>
</form> </form>
</div> </div>

View File

@ -209,7 +209,11 @@ foreach ( (array) $options as $option ) :
endforeach; endforeach;
?> ?>
</table> </table>
<p class="submit"><input type="hidden" name="page_options" value="<?php echo esc_attr( implode( ',', $options_to_update ) ); ?>" /><input type="submit" name="Update" value="<?php esc_attr_e( 'Save Changes' ); ?>" class="button-primary" /></p>
<input type="hidden" name="page_options" value="<?php echo esc_attr( implode( ',', $options_to_update ) ); ?>" />
<?php submit_button( __('Save Changes') ); ?>
</form> </form>
</div> </div>

View File

@ -384,11 +384,11 @@ if ( $show_password_fields ) :
</table> </table>
<?php } ?> <?php } ?>
<p class="submit"> <input type="hidden" name="action" value="update" />
<input type="hidden" name="action" value="update" /> <input type="hidden" name="user_id" id="user_id" value="<?php echo esc_attr($user_id); ?>" />
<input type="hidden" name="user_id" id="user_id" value="<?php echo esc_attr($user_id); ?>" />
<input type="submit" class="button-primary" value="<?php IS_PROFILE_PAGE ? esc_attr_e('Update Profile') : esc_attr_e('Update User') ?>" name="submit" /> <?php submit_button( IS_PROFILE_PAGE ? __('Update Profile') : __('Update User') ); ?>
</p>
</form> </form>
</div> </div>
<?php <?php

View File

@ -265,9 +265,8 @@ $new_user_send_password = !$_POST || isset($_POST['send_password']);
</tr> </tr>
<?php } ?> <?php } ?>
</table> </table>
<p class="submit">
<input name="adduser" type="submit" id="addusersub" class="button-primary" value="<?php esc_attr_e('Add User') ?>" /> <?php submit_button( __('Add User'), 'primary', 'adduser' ); ?>
</p>
</form> </form>
</div> </div>

View File

@ -190,7 +190,7 @@ case 'delete':
<?php echo '<label for="delete_option1">'.__('Attribute all posts and links to:')."</label> $user_dropdown"; ?></li> <?php echo '<label for="delete_option1">'.__('Attribute all posts and links to:')."</label> $user_dropdown"; ?></li>
</ul></fieldset> </ul></fieldset>
<input type="hidden" name="action" value="dodelete" /> <input type="hidden" name="action" value="dodelete" />
<p class="submit"><input type="submit" name="submit" value="<?php esc_attr_e('Confirm Deletion'); ?>" class="button-secondary" /></p> <?php submit_button( __('Confirm Deletion'), 'secondary' ); ?>
<?php else : ?> <?php else : ?>
<p><?php _e('There are no valid users selected for deletion.'); ?></p> <p><?php _e('There are no valid users selected for deletion.'); ?></p>
<?php endif; ?> <?php endif; ?>
@ -278,7 +278,7 @@ case 'remove':
?> ?>
<?php if ( $go_remove ) : ?> <?php if ( $go_remove ) : ?>
<input type="hidden" name="action" value="doremove" /> <input type="hidden" name="action" value="doremove" />
<p class="submit"><input type="submit" name="submit" value="<?php esc_attr_e('Confirm Removal'); ?>" class="button-secondary" /></p> <?php submit_button( __('Confirm Removal'), 'secondary' ); ?>
<?php else : ?> <?php else : ?>
<p><?php _e('There are no valid users selected for removal.'); ?></p> <p><?php _e('There are no valid users selected for removal.'); ?></p>
<?php endif; ?> <?php endif; ?>