WordPress.org

Make WordPress Core

Ticket #16068: 16068-radio-inputs.diff

File 16068-radio-inputs.diff, 1.1 KB (added by lancewillett, 9 years ago)

Start of a patch to add radio inputs that I worked on at WC Phx

  • wp-admin/includes/template.php

     
    622622        $minute = '<input type="text" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
    623623
    624624        echo '<div class="timestamp-wrap">';
     625        echo '<div><input type="radio" name="publish-when" value="publish-when-now" id="publish-when-now" checked="checked" /> <label for="publish-when-now">' . __( 'Immediately' ) . '</label></div>';
    625626        /* translators: 1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input */
    626         printf(__('%1$s%2$s, %3$s @ %4$s : %5$s'), $month, $day, $year, $hour, $minute);
     627        echo '<div><input type="radio" name="publish-when" value="publish-when-later" id="publish-when-later" /> <label for="publish-when-later">' . sprintf( __( '%1$s%2$s, %3$s @ %4$s : %5$s' ), $month, $day, $year, $hour, $minute ) . '</label></div>';
    627628
    628629        echo '</div><input type="hidden" id="ss" name="ss" value="' . $ss . '" />';
    629630