Changeset 1815

Show
Ignore:
Timestamp:
10/18/04 23:45:26 (4 years ago)
Author:
michelvaldrighi
Message:

fixed single_month_title. thanks to Brak (http://wordpress.org/support/6/14897)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/template-functions-general.php

    r1789 r1815  
    217217 
    218218function single_month_title($prefix = '', $display = true ) { 
    219     global $m, $month; 
    220     if(!empty($m)) { 
    221         $my_year = substr($m, 0, 4); 
    222         $my_month = $month[substr($m, 4, 2)]; 
    223         if ($display) 
    224             echo $prefix . $my_month . $prefix . $my_year; 
    225         else 
    226             return $m; 
     219    global $monthnum, $month, $year; 
     220    if(!empty($monthnum)) { 
     221        $my_year = $year; 
     222        $my_month = $month[$monthnum]; 
     223        if ($display) { 
     224            echo $prefix . $my_month . $prefix . " " . $my_year; 
     225        } else { 
     226            return $monthnum; 
     227        } 
    227228    } 
    228229}