Make WordPress Core


Ignore:
Timestamp:
10/28/2010 09:56:43 PM (14 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/includes/meta-boxes.php

    r15955 r16061  
    2323<?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
    2424<div style="display:none;">
    25 <input type="submit" name="save" value="<?php esc_attr_e('Save'); ?>" />
     25<?php submit_button( __( 'Save' ), 'button', 'save' ); ?>
    2626</div>
    2727
     
    212212        if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?>
    213213        <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' ) ); ?>
    215215<?php   else : ?>
    216216        <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' ) ); ?>
    218218<?php   endif;
    219219    else : ?>
    220220        <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' ) ); ?>
    222222<?php
    223223    endif;
     
    583583<?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
    584584<div style="display:none;">
    585 <input type="submit" name="save" value="<?php esc_attr_e('Save'); ?>" />
     585<?php submit_button( __( 'Save' ), 'button', 'save', false ); ?>
    586586</div>
    587587
Note: See TracChangeset for help on using the changeset viewer.