the_time only displays in WP 1.5
-
I looked about, but couldn’t find this addressed, so I fixed it in my installation, and thought I should share!
In my template (worked under 1.2, not as a template), I had a piece of code that took today’s date, looked to see if there were photo albums from that day, and then displayed thumbnails if there were. When I installed WP 1.5, the functionality broke, with only the date being displayed, instead of passed.
I did some digging, and found that in template-functions-general.php, the function for the_time no longer included an option for echo or not. I added that to the parameters, and added the block of code to handle whether or not display the_time. This seems to look like the code from previous versions, and mirrors how the_date looks.
Sorry if this is a duplicate issue (wasted bandwidth), but it was a show-stopper for me.
Anyway, here’s what my block looks like now:
function the_time ( $d = '', $echo = true ) {
$the_time = apply_filters('the_time', get_the_time ($d ), $d);
if ($echo) {
echo $the_time;
} else {
return $the_time;
}
{
- The topic ‘the_time only displays in WP 1.5’ is closed to new replies.