WordPress.org

Make WordPress Core

Changeset 6989


Ignore:
Timestamp:
02/22/2008 11:13:02 PM (14 years ago)
Author:
ryan
Message:

Allow full localization of edit timestamp fields. fixes #5514

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r6980 r6989  
    785785    $ss = ($edit) ? mysql2date( 's', $post_date ) : gmdate( 's', $time_adj );
    786786
    787     echo "<select name=\"mm\" onchange=\"edit_date.checked=true\"$tab_index_attribute>\n";
     787    $month = "<select name=\"mm\" onchange=\"edit_date.checked=true\"$tab_index_attribute>\n";
    788788    for ( $i = 1; $i < 13; $i = $i +1 ) {
    789         echo "\t\t\t<option value=\"$i\"";
     789        $month .= "\t\t\t<option value=\"$i\"";
    790790        if ( $i == $mm )
    791             echo ' selected="selected"';
    792         echo '>' . $wp_locale->get_month( $i ) . "</option>\n";
    793     }
     791            $month .= ' selected="selected"';
     792        $month .= '>' . $wp_locale->get_month( $i ) . "</option>\n";
     793    }
     794    $month .= '</select>';
     795
     796    $day = '<input type="text" id="jj" name="jj" value="' . $jj . '" size="2" maxlength="2" onchange="edit_date.checked=true"' . $tab_index_attribute . ' />';
     797    $year = '<input type="text" id="aa" name="aa" value="' . $aa . '" size="4" maxlength="5" onchange="edit_date.checked=true"' . $tab_index_attribute . ' />';
     798    $hour = '<input type="text" id="hh" name="hh" value="' . $hh . '" size="2" maxlength="2" onchange="edit_date.checked=true"' . $tab_index_attribute . ' />';
     799    $minute = '<input type="text" id="mn" name="mn" value="' . $mn . '" size="2" maxlength="2" onchange="edit_date.checked=true"' . $tab_index_attribute . ' />';
     800    printf(__('%1$s%2$s%3$s @ %4$s : %5$s'), $month, $day, $year, $hour, $minute);
    794801?>
    795 </select>
    796 <input type="text" id="jj" name="jj" value="<?php echo $jj; ?>" size="2" maxlength="2" onchange="edit_date.checked=true"<?php echo $tab_index_attribute ?> />
    797 <input type="text" id="aa" name="aa" value="<?php echo $aa ?>" size="4" maxlength="5" onchange="edit_date.checked=true"<?php echo $tab_index_attribute ?> /> @
    798 <input type="text" id="hh" name="hh" value="<?php echo $hh ?>" size="2" maxlength="2" onchange="edit_date.checked=true"<?php echo $tab_index_attribute ?> /> :
    799 <input type="text" id="mn" name="mn" value="<?php echo $mn ?>" size="2" maxlength="2" onchange="edit_date.checked=true"<?php echo $tab_index_attribute ?> />
    800802<input type="hidden" id="ss" name="ss" value="<?php echo $ss ?>" size="2" maxlength="2" onchange="edit_date.checked=true" />
    801803<?php
Note: See TracChangeset for help on using the changeset viewer.