Make WordPress Core


Ignore:
Timestamp:
04/19/2006 08:51:01 AM (21 years ago)
Author:
matt
Message:

Save a few lines of code, don't show 0 in month list

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit.php

    r3722 r3724  
    9292        <?php
    9393                foreach ($arc_result as $arc_row) {
    94                         $arc_year  = $arc_row->yyear;
    95                         $arc_month = $arc_row->mmonth;
    96                         $arc_month = zeroise($arc_month, 2);
    97 
    98                         if( isset($_GET['m']) && $arc_year . $arc_month == (int) $_GET['m'] )
     94                        if ( $arc_row->yyear == 0 )
     95                                continue;
     96                        $arc_row->mmonth = zeroise($arc_row->mmonth, 2);
     97
     98                        if( isset($_GET['m']) && $arc_row->yyear . $arc_row->mmonth == (int) $_GET['m'] )
    9999                                $default = 'selected="selected"';
    100100                        else
    101101                                $default = null;
    102102
    103                         echo "<option $default value=\"" . $arc_year . $arc_month . '">';
    104                         echo $wp_locale->get_month($arc_month) . " $arc_year";
     103                        echo "<option $default value='$arc_row->yyear$arc_row->mmonth'>";
     104                        echo $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear";
    105105                        echo "</option>\n";
    106106                }
Note: See TracChangeset for help on using the changeset viewer.