WordPress.org

Make WordPress Core

Ticket #21852: 21852.patch

File 21852.patch, 872 bytes (added by SergeyBiryukov, 9 years ago)
  • wp-admin/includes/template.php

     
    16381638 */
    16391639function get_submit_button( $text = null, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = null ) {
    16401640        if ( ! is_array( $type ) )
    1641                 $type = explode( ' ', $type ); 
     1641                $type = explode( ' ', $type );
    16421642
    16431643        $button_shorthand = array( 'primary', 'tiny', 'small', 'large' );
    1644         $classes = array( 'button' );
     1644        $classes = array();
    16451645        foreach ( $type as $t ) {
    16461646                if ( 'secondary' === $t || 'button-secondary' === $t )
    16471647                        continue;
    16481648                $classes[] = in_array( $t, $button_shorthand ) ? 'button-' . $t : $t;
    16491649        }
     1650        $classes[] = 'button';
    16501651        $class = implode( ' ', array_unique( $classes ) );
    16511652
    16521653        if ( 'delete' === $type )