<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[15830] trunk: Use submit_button() in more places.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/15830">15830</a></dd>
<dt>Author</dt> <dd>scribu</dd>
<dt>Date</dt> <dd>2010-10-17 18:24:34 +0000 (Sun, 17 Oct 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Use submit_button() in more places. See <a href="http://trac.wordpress.org/ticket/15064">#15064</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpactivatephp">trunk/wp-activate.php</a></li>
<li><a href="#trunkwpadmincustombackgroundphp">trunk/wp-admin/custom-background.php</a></li>
<li><a href="#trunkwpadmincustomheaderphp">trunk/wp-admin/custom-header.php</a></li>
<li><a href="#trunkwpadminedittagformphp">trunk/wp-admin/edit-tag-form.php</a></li>
<li><a href="#trunkwpadminexportphp">trunk/wp-admin/export.php</a></li>
<li><a href="#trunkwpadminincludesdashboardphp">trunk/wp-admin/includes/dashboard.php</a></li>
<li><a href="#trunkwpadminincludestemplatephp">trunk/wp-admin/includes/template.php</a></li>
<li><a href="#trunkwpadminmediaphp">trunk/wp-admin/media.php</a></li>
<li><a href="#trunkwpadminnetworkeditphp">trunk/wp-admin/network/edit.php</a></li>
<li><a href="#trunkwpadminnetworksettingsphp">trunk/wp-admin/network/settings.php</a></li>
<li><a href="#trunkwpadminoptionsphp">trunk/wp-admin/options.php</a></li>
<li><a href="#trunkwpadminusereditphp">trunk/wp-admin/user-edit.php</a></li>
<li><a href="#trunkwpadminusernewphp">trunk/wp-admin/user-new.php</a></li>
<li><a href="#trunkwpadminusersphp">trunk/wp-admin/users.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpactivatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-activate.php (15829 => 15830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-activate.php        2010-10-17 13:47:40 UTC (rev 15829)
+++ trunk/wp-activate.php        2010-10-17 18:24:34 UTC (rev 15830)
</span><span class="lines">@@ -48,9 +48,7 @@
</span><span class="cx">                          <label for="key"><?php _e('Activation Key:') ?></label>
</span><span class="cx">                          <br /><input type="text" name="key" id="key" value="" size="50" />
</span><span class="cx">                         </p>
</span><del>-                        <p class="submit">
-                         <input id="submit" type="submit" name="Submit" class="submit" value="<?php esc_attr_e('Activate') ?>" />
-                        </p>
</del><ins>+                        <?php submit_button( __('Activate'), 'submit' ); ?>
</ins><span class="cx">                 </form>
</span><span class="cx">
</span><span class="cx">         <?php } else {
</span></span></pre></div>
<a id="trunkwpadmincustombackgroundphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/custom-background.php (15829 => 15830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/custom-background.php        2010-10-17 13:47:40 UTC (rev 15829)
+++ trunk/wp-admin/custom-background.php        2010-10-17 18:24:34 UTC (rev 15830)
</span><span class="lines">@@ -303,7 +303,7 @@
</span><span class="cx"> </table>
</span><span class="cx">
</span><span class="cx"> <?php wp_nonce_field('custom-background'); ?>
</span><del>-<p class="submit"><input type="submit" class="button-primary" name="save-background-options" value="<?php esc_attr_e('Save Changes'); ?>" /></p>
</del><ins>+<?php submit_button( null, 'primary', 'save-background-options' ); ?>
</ins><span class="cx"> </form>
</span><span class="cx">
</span><span class="cx"> </div>
</span></span></pre></div>
<a id="trunkwpadmincustomheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/custom-header.php (15829 => 15830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/custom-header.php        2010-10-17 13:47:40 UTC (rev 15829)
+++ trunk/wp-admin/custom-header.php        2010-10-17 18:24:34 UTC (rev 15830)
</span><span class="lines">@@ -562,7 +562,8 @@
</span><span class="cx"> do_action( 'custom_header_options' );
</span><span class="cx">
</span><span class="cx"> wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
</span><del>-<p class="submit"><input type="submit" class="button-primary" name="save-header-options" value="<?php esc_attr_e( 'Save Changes' ); ?>" /></p>
</del><ins>+
+<?php submit_button(); ?>
</ins><span class="cx"> </form>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="lines">@@ -636,7 +637,6 @@
</span><span class="cx">                 <img src="<?php echo esc_url( $url ); ?>" id="upload" width="<?php echo $width; ?>" height="<?php echo $height; ?>" />
</span><span class="cx">         </div>
</span><span class="cx">
</span><del>-        <p class="submit">
</del><span class="cx">         <input type="hidden" name="x1" id="x1" value="0"/>
</span><span class="cx">         <input type="hidden" name="y1" id="y1" value="0"/>
</span><span class="cx">         <input type="hidden" name="width" id="width" value="<?php echo esc_attr( $width ); ?>"/>
</span><span class="lines">@@ -644,7 +644,8 @@
</span><span class="cx">         <input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr( $id ); ?>" />
</span><span class="cx">         <input type="hidden" name="oitar" id="oitar" value="<?php echo esc_attr( $oitar ); ?>" />
</span><span class="cx">         <?php wp_nonce_field( 'custom-header-crop-image' ) ?>
</span><del>-        <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Crop and Publish' ); ?>" />
</del><ins>+        
+        <?php submit_button( __( 'Crop and Publish' ) ); ?>
</ins><span class="cx">         </p>
</span><span class="cx"> </form>
</span><span class="cx"> </div>
</span></span></pre></div>
<a id="trunkwpadminedittagformphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-tag-form.php (15829 => 15830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-tag-form.php        2010-10-17 13:47:40 UTC (rev 15829)
+++ trunk/wp-admin/edit-tag-form.php        2010-10-17 18:24:34 UTC (rev 15830)
</span><span class="lines">@@ -86,7 +86,8 @@
</span><span class="cx">         do_action('edit_tag_form', $tag);
</span><span class="cx">
</span><span class="cx"> do_action($taxonomy . '_edit_form', $tag, $taxonomy);
</span><ins>+
+submit_button( __('Update') );
</ins><span class="cx"> ?>
</span><del>-<p class="submit"><input type="submit" class="button-primary" name="submit" value="<?php echo esc_attr( __( 'Update' ) ); ?>" /></p>
</del><span class="cx"> </form>
</span><span class="cx"> </div>
</span></span></pre></div>
<a id="trunkwpadminexportphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/export.php (15829 => 15830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/export.php        2010-10-17 13:47:40 UTC (rev 15829)
+++ trunk/wp-admin/export.php        2010-10-17 18:24:34 UTC (rev 15830)
</span><span class="lines">@@ -136,7 +136,7 @@
</span><span class="cx"> </td>
</span><span class="cx"> </tr>
</span><span class="cx"> </table>
</span><del>-<p class="submit"><input type="submit" name="submit" class="button" value="<?php esc_attr_e('Download Export File'); ?>" />
</del><ins>+<?php submit_button( __('Download Export File'), 'secondary' ); ?>
</ins><span class="cx"> <input type="hidden" name="download" value="true" />
</span><span class="cx"> </p>
</span><span class="cx"> </form>
</span></span></pre></div>
<a id="trunkwpadminincludesdashboardphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/dashboard.php (15829 => 15830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/dashboard.php        2010-10-17 13:47:40 UTC (rev 15829)
+++ trunk/wp-admin/includes/dashboard.php        2010-10-17 18:24:34 UTC (rev 15830)
</span><span class="lines">@@ -152,8 +152,8 @@
</span><span class="cx"> function _wp_dashboard_control_callback( $dashboard, $meta_box ) {
</span><span class="cx">         echo '<form action="" method="post" class="dashboard-widget-control-form">';
</span><span class="cx">         wp_dashboard_trigger_widget_control( $meta_box['id'] );
</span><del>-        echo '<p class="submit"><input type="hidden" name="widget_id" value="' . esc_attr($meta_box['id']) . '" /><input type="submit" value="' . esc_attr__( 'Submit' ) . '" /></p>';
-
</del><ins>+        echo '<input type="hidden" name="widget_id" value="' . esc_attr($meta_box['id']) . '" />';
+        submit_button( __('Submit') );
</ins><span class="cx">         echo '</form>';
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminincludestemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/template.php (15829 => 15830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/template.php        2010-10-17 13:47:40 UTC (rev 15829)
+++ trunk/wp-admin/includes/template.php        2010-10-17 18:24:34 UTC (rev 15830)
</span><span class="lines">@@ -843,9 +843,7 @@
</span><span class="cx"> <input type="hidden" name="action" value="save" />
</span><span class="cx"> <input type="hidden" name="max_file_size" value="<?php echo $bytes; ?>" />
</span><span class="cx"> </p>
</span><del>-<p class="submit">
-<input type="submit" class="button" value="<?php esc_attr_e( 'Upload file and import' ); ?>" />
-</p>
</del><ins>+<?php submit_button( __('Upload file and import'), 'secondary' ); ?>
</ins><span class="cx"> </form>
</span><span class="cx"> <?php
</span><span class="cx">         endif;
</span></span></pre></div>
<a id="trunkwpadminmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/media.php (15829 => 15830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/media.php        2010-10-17 13:47:40 UTC (rev 15829)
+++ trunk/wp-admin/media.php        2010-10-17 18:24:34 UTC (rev 15830)
</span><span class="lines">@@ -100,14 +100,13 @@
</span><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><del>-<p class="submit">
-<input type="submit" class="button-primary" name="save" value="<?php esc_attr_e('Update Media'); ?>" />
</del><ins>+<?php submit_button( __('Update Media') ); ?>
</ins><span class="cx"> <input type="hidden" name="post_id" id="post_id" value="<?php echo isset($post_id) ? esc_attr($post_id) : ''; ?>" />
</span><span class="cx"> <input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr($att_id); ?>" />
</span><span class="cx"> <input type="hidden" name="action" value="editattachment" />
</span><span class="cx"> <?php wp_original_referer_field(true, 'previous'); ?>
</span><span class="cx"> <?php wp_nonce_field('media-form'); ?>
</span><del>-</p>
</del><ins>+
</ins><span class="cx"> </form>
</span><span class="cx">
</span><span class="cx"> </div>
</span></span></pre></div>
<a id="trunkwpadminnetworkeditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/network/edit.php (15829 => 15830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/edit.php        2010-10-17 13:47:40 UTC (rev 15829)
+++ trunk/wp-admin/network/edit.php        2010-10-17 18:24:34 UTC (rev 15830)
</span><span class="lines">@@ -74,8 +74,9 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         }
</span><ins>+        
+        submit_button( __('Confirm Deletion'), 'delete' );
</ins><span class="cx">         ?>
</span><del>-        <p class="submit"><input type="submit" class="button-secondary delete" value="<?php esc_attr_e( 'Confirm Deletion' ); ?>" /></p>
</del><span class="cx">         </form>
</span><span class="cx"> <?php
</span><span class="cx">         return true;
</span><span class="lines">@@ -502,7 +503,7 @@
</span><span class="cx">                                         <input type="hidden" name="_wp_http_referer" value="<?php echo esc_attr( wp_get_referer() ); ?>" />
</span><span class="cx">                                         <?php wp_nonce_field( $_GET['action2'], '_wpnonce', false ); ?>
</span><span class="cx">                                         <p><?php echo esc_html( stripslashes( $_GET['msg'] ) ); ?></p>
</span><del>-                                        <p class="submit"><input class="button" type="submit" value="<?php _e( 'Confirm' ); ?>" /></p>
</del><ins>+                                        <?php submit_button( __('Confirm'), 'secondary' ); ?>
</ins><span class="cx">                                 </form>
</span><span class="cx">                         </body>
</span><span class="cx">                 </html>
</span></span></pre></div>
<a id="trunkwpadminnetworksettingsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/network/settings.php (15829 => 15830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/settings.php        2010-10-17 13:47:40 UTC (rev 15829)
+++ trunk/wp-admin/network/settings.php        2010-10-17 18:24:34 UTC (rev 15830)
</span><span class="lines">@@ -273,7 +273,7 @@
</span><span class="cx">
</span><span class="cx">                 <?php do_action( 'wpmu_options' ); // Add more options here ?>
</span><span class="cx">
</span><del>-                <p class="submit"><input type="submit" class="button-primary" name="Submit" value="<?php esc_attr_e( 'Save Changes' ) ?>" /></p>
</del><ins>+                <?php submit_button(); ?>
</ins><span class="cx">         </form>
</span><span class="cx"> </div>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminoptionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/options.php (15829 => 15830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/options.php        2010-10-17 13:47:40 UTC (rev 15829)
+++ trunk/wp-admin/options.php        2010-10-17 18:24:34 UTC (rev 15830)
</span><span class="lines">@@ -209,7 +209,11 @@
</span><span class="cx"> endforeach;
</span><span class="cx"> ?>
</span><span class="cx"> </table>
</span><del>-<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>
</del><ins>+
+<input type="hidden" name="page_options" value="<?php echo esc_attr( implode( ',', $options_to_update ) ); ?>" />
+
+<?php submit_button( __('Save Changes') ); ?>
+
</ins><span class="cx"> </form>
</span><span class="cx"> </div>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminusereditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/user-edit.php (15829 => 15830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/user-edit.php        2010-10-17 13:47:40 UTC (rev 15829)
+++ trunk/wp-admin/user-edit.php        2010-10-17 18:24:34 UTC (rev 15830)
</span><span class="lines">@@ -384,11 +384,11 @@
</span><span class="cx">         </table>
</span><span class="cx"> <?php } ?>
</span><span class="cx">
</span><del>-<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>
</del><ins>+<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') ); ?>
+
</ins><span class="cx"> </form>
</span><span class="cx"> </div>
</span><span class="cx"> <?php
</span></span></pre></div>
<a id="trunkwpadminusernewphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/user-new.php (15829 => 15830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/user-new.php        2010-10-17 13:47:40 UTC (rev 15829)
+++ trunk/wp-admin/user-new.php        2010-10-17 18:24:34 UTC (rev 15830)
</span><span class="lines">@@ -265,9 +265,8 @@
</span><span class="cx">         </tr>
</span><span class="cx">         <?php } ?>
</span><span class="cx"> </table>
</span><del>-<p class="submit">
-        <input name="adduser" type="submit" id="addusersub" class="button-primary" value="<?php esc_attr_e('Add User') ?>" />
-</p>
</del><ins>+
+<?php submit_button( __('Add User'), 'primary', 'adduser' ); ?>
</ins><span class="cx"> </form>
</span><span class="cx">
</span><span class="cx"> </div>
</span></span></pre></div>
<a id="trunkwpadminusersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/users.php (15829 => 15830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/users.php        2010-10-17 13:47:40 UTC (rev 15829)
+++ trunk/wp-admin/users.php        2010-10-17 18:24:34 UTC (rev 15830)
</span><span class="lines">@@ -190,7 +190,7 @@
</span><span class="cx">                 <?php echo '<label for="delete_option1">'.__('Attribute all posts and links to:')."</label> $user_dropdown"; ?></li>
</span><span class="cx">         </ul></fieldset>
</span><span class="cx">         <input type="hidden" name="action" value="dodelete" />
</span><del>-        <p class="submit"><input type="submit" name="submit" value="<?php esc_attr_e('Confirm Deletion'); ?>" class="button-secondary" /></p>
</del><ins>+        <?php submit_button( __('Confirm Deletion'), 'secondary' ); ?>
</ins><span class="cx"> <?php else : ?>
</span><span class="cx">         <p><?php _e('There are no valid users selected for deletion.'); ?></p>
</span><span class="cx"> <?php endif; ?>
</span><span class="lines">@@ -278,7 +278,7 @@
</span><span class="cx">         ?>
</span><span class="cx"> <?php if ( $go_remove ) : ?>
</span><span class="cx">                 <input type="hidden" name="action" value="doremove" />
</span><del>-                <p class="submit"><input type="submit" name="submit" value="<?php esc_attr_e('Confirm Removal'); ?>" class="button-secondary" /></p>
</del><ins>+                <?php submit_button( __('Confirm Removal'), 'secondary' ); ?>
</ins><span class="cx"> <?php else : ?>
</span><span class="cx">         <p><?php _e('There are no valid users selected for removal.'); ?></p>
</span><span class="cx"> <?php endif; ?>
</span></span></pre>
</div>
</div>
</body>
</html>