Skip to content

Commit

Permalink
Use submit_button() in more places. See #15064
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.automattic.com/wordpress/trunk@15830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
scribu committed Oct 17, 2010
1 parent af29ce4 commit 799baf1
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 31 deletions.
4 changes: 1 addition & 3 deletions wp-activate.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ function wpmu_activate_stylesheet() {
<label for="key"><?php _e('Activation Key:') ?></label>
<br /><input type="text" name="key" id="key" value="" size="50" />
</p>
<p class="submit">
<input id="submit" type="submit" name="Submit" class="submit" value="<?php esc_attr_e('Activate') ?>" />
</p>
<?php submit_button( __('Activate'), 'submit' ); ?>
</form>

<?php } else {
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/custom-background.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ function admin_page() {
</table>

<?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>

</div>
Expand Down
7 changes: 4 additions & 3 deletions wp-admin/custom-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,8 @@ function step_1() {
do_action( '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>
</div>

Expand Down Expand Up @@ -636,15 +637,15 @@ function step_2() {
<img src="<?php echo esc_url( $url ); ?>" id="upload" width="<?php echo $width; ?>" height="<?php echo $height; ?>" />
</div>

<p class="submit">
<input type="hidden" name="x1" id="x1" 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="height" id="height" value="<?php echo esc_attr( $height ); ?>"/>
<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 ); ?>" />
<?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>
</form>
</div>
Expand Down
3 changes: 2 additions & 1 deletion wp-admin/edit-tag-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@
do_action('edit_tag_form', $tag);

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>
</div>
2 changes: 1 addition & 1 deletion wp-admin/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
</td>
</tr>
</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" />
</p>
</form>
Expand Down
4 changes: 2 additions & 2 deletions wp-admin/includes/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_
function _wp_dashboard_control_callback( $dashboard, $meta_box ) {
echo '<form action="" method="post" class="dashboard-widget-control-form">';
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>';
}

Expand Down
4 changes: 1 addition & 3 deletions wp-admin/includes/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -843,9 +843,7 @@ function wp_import_upload_form( $action ) {
<input type="hidden" name="action" value="save" />
<input type="hidden" name="max_file_size" value="<?php echo $bytes; ?>" />
</p>
<p class="submit">
<input type="submit" class="button" value="<?php esc_attr_e( 'Upload file and import' ); ?>" />
</p>
<?php submit_button( __('Upload file and import'), 'secondary' ); ?>
</form>
<?php
endif;
Expand Down
5 changes: 2 additions & 3 deletions wp-admin/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,13 @@
</div>
</div>

<p class="submit">
<input type="submit" class="button-primary" name="save" value="<?php esc_attr_e('Update Media'); ?>" />
<?php submit_button( __('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="attachment_id" id="attachment_id" value="<?php echo esc_attr($att_id); ?>" />
<input type="hidden" name="action" value="editattachment" />
<?php wp_original_referer_field(true, 'previous'); ?>
<?php wp_nonce_field('media-form'); ?>
</p>

</form>

</div>
Expand Down
5 changes: 3 additions & 2 deletions wp-admin/network/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
<?php
return true;
Expand Down Expand Up @@ -502,7 +503,7 @@ function confirm_delete_users( $users ) {
<input type="hidden" name="_wp_http_referer" value="<?php echo esc_attr( wp_get_referer() ); ?>" />
<?php wp_nonce_field( $_GET['action2'], '_wpnonce', false ); ?>
<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>
</body>
</html>
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/network/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@

<?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>
</div>

Expand Down
6 changes: 5 additions & 1 deletion wp-admin/options.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,11 @@
endforeach;
?>
</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>
</div>

Expand Down
10 changes: 5 additions & 5 deletions wp-admin/user-edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,11 +384,11 @@ function use_ssl_preference($user) {
</table>
<?php } ?>

<p class="submit">
<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="submit" class="button-primary" value="<?php IS_PROFILE_PAGE ? esc_attr_e('Update Profile') : esc_attr_e('Update User') ?>" name="submit" />
</p>
<input type="hidden" name="action" value="update" />
<input type="hidden" name="user_id" id="user_id" value="<?php echo esc_attr($user_id); ?>" />

<?php submit_button( IS_PROFILE_PAGE ? __('Update Profile') : __('Update User') ); ?>

</form>
</div>
<?php
Expand Down
5 changes: 2 additions & 3 deletions wp-admin/user-new.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,8 @@ function admin_created_user_subject( $text ) {
</tr>
<?php } ?>
</table>
<p class="submit">
<input name="adduser" type="submit" id="addusersub" class="button-primary" value="<?php esc_attr_e('Add User') ?>" />
</p>

<?php submit_button( __('Add User'), 'primary', 'adduser' ); ?>
</form>

</div>
Expand Down
4 changes: 2 additions & 2 deletions wp-admin/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
<?php echo '<label for="delete_option1">'.__('Attribute all posts and links to:')."</label> $user_dropdown"; ?></li>
</ul></fieldset>
<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 : ?>
<p><?php _e('There are no valid users selected for deletion.'); ?></p>
<?php endif; ?>
Expand Down Expand Up @@ -278,7 +278,7 @@
?>
<?php if ( $go_remove ) : ?>
<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 : ?>
<p><?php _e('There are no valid users selected for removal.'); ?></p>
<?php endif; ?>
Expand Down

0 comments on commit 799baf1

Please sign in to comment.