Make WordPress Core


Ignore:
Timestamp:
10/28/2010 09:56:43 PM (13 years ago)
Author:
markjaquith
Message:

Expand submit_button() capabilities. Replace all (or almost all) manual HTML instances in WP. props sbressler. see #15064

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/theme-editor.php

    r15853 r16061  
    150150?>
    151151        </select>
    152         <input type="submit" name="Submit" value="<?php esc_attr_e('Select') ?>" class="button" />
     152        <?php submit_button( __( 'Select' ), 'button', 'Submit', false ); ?>
    153153    </form>
    154154</div>
     
    225225
    226226        <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 : ?>
    234231<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>
    235232<?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.