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/press-this.php

    r15834 r16061  
    473473                <div class="inside">
    474474                    <p>
    475                         <input class="button" type="submit" name="draft" value="<?php esc_attr_e('Save Draft') ?>" id="save" />
    476                         <?php if ( current_user_can('publish_posts') ) { ?>
    477                             <input class="button-primary" type="submit" name="publish" value="<?php esc_attr_e('Publish') ?>" id="publish" />
    478                         <?php } else { ?>
    479                             <br /><br /><input class="button-primary" type="submit" name="review" value="<?php esc_attr_e('Submit for Review') ?>" id="review" />
    480                         <?php } ?>
     475                    <?php
     476                        submit_button( __( 'Save Draft' ), 'button', 'draft', false, array( 'id' => 'save' ) );
     477                        if ( current_user_can('publish_posts') ) {
     478                            submit_button( __( 'Publish' ), 'primary', 'publish', false );
     479                        } else {
     480                            echo '<br /><br />';
     481                            submit_button( __( 'Submit for Review' ), 'primary', 'review', false );
     482                        } ?>
    481483                        <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" id="saving" style="display:none;" />
    482484                    </p>
Note: See TracChangeset for help on using the changeset viewer.