Make WordPress Core

Ticket #25461: 25461-date-input-labels.patch

File 25461-date-input-labels.patch, 3.0 KB (added by buffler, 12 years ago)

adds labels to post publish/schedule date

  • wp-admin/includes/template.php

     
    652652        $cur_hh = gmdate( 'H', $time_adj );
    653653        $cur_mn = gmdate( 'i', $time_adj );
    654654
    655         $month = "<select " . ( $multi ? '' : 'id="mm" ' ) . "name=\"mm\"$tab_index_attribute>\n";
     655        $month = '<span><label for="mm">' . __( 'Month' ) . '</label><br />' . "<select " . ( $multi ? '' : 'id="mm" ' ) . "name=\"mm\"$tab_index_attribute>\n";
    656656        for ( $i = 1; $i < 13; $i = $i +1 ) {
    657657                $monthnum = zeroise($i, 2);
    658658                $month .= "\t\t\t" . '<option value="' . $monthnum . '"';
     
    661661                /* translators: 1: month number (01, 02, etc.), 2: month abbreviation */
    662662                $month .= '>' . sprintf( __( '%1$s-%2$s' ), $monthnum, $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) ) ) . "</option>\n";
    663663        }
    664         $month .= '</select>';
     664        $month .= '</select></span>';
    665665
    666         $day = '<input type="text" ' . ( $multi ? '' : 'id="jj" ' ) . 'name="jj" value="' . $jj . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
    667         $year = '<input type="text" ' . ( $multi ? '' : 'id="aa" ' ) . 'name="aa" value="' . $aa . '" size="4" maxlength="4"' . $tab_index_attribute . ' autocomplete="off" />';
    668         $hour = '<input type="text" ' . ( $multi ? '' : 'id="hh" ' ) . 'name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
    669         $minute = '<input type="text" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
     666        $day = '<span><label for="jj">' . __( 'Day' ) . '</label><br /><input type="text" ' . ( $multi ? '' : 'id="jj" ' ) . 'name="jj" value="' . $jj . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" /></span>';
     667        $year = '<span><label for="aa">' . __( 'Year' ) . '</label><br /><input type="text" ' . ( $multi ? '' : 'id="aa" ' ) . 'name="aa" value="' . $aa . '" size="4" maxlength="4"' . $tab_index_attribute . ' autocomplete="off" /></span>';
     668        $hour = '<span><label for="hh">' . __( 'HH' ) . '</label><br /><input type="text" ' . ( $multi ? '' : 'id="hh" ' ) . 'name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" /></span>';
     669        $minute = '<span><label for="mn">' . __( 'MM' ) . '</label><br /><input type="text" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" /></span>';
    670670
    671671        echo '<div class="timestamp-wrap">';
    672672        /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
  • wp-admin/css/wp-admin.css

     
    33743374        border-style: solid;
    33753375}
    33763376
     3377.timestamp-wrap > span {
     3378        display: inline-block;
     3379}
     3380
    33773381.notification-dialog {
    33783382        position: fixed;
    33793383        top: 30%;