Skip to content
This repository has been archived by the owner on Oct 4, 2017. It is now read-only.

Commit

Permalink
dont pass hResume class if we cant parse the date
Browse files Browse the repository at this point in the history
  • Loading branch information
benbalter committed Feb 14, 2012
1 parent 72e3ee0 commit 79c7451
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions includes/templating.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ function get_date( $ID ) {
if ( !$value)
continue;

//if we can't parse the date (e.g., "Present"), do not pass a hResume class to maintain compliance
//See https://github.com/benbalter/WP-Resume/issues/7
if ( !strtotime( $value ) )
$class = 'dt';

$date .= '<span class="' . $class . '" title="' . date( 'Y-m-d', strtotime( $value ) ) . '">';
$date .= $this->parent->api->apply_filters( 'date', $value, $field );
$date .= '</span>';
Expand Down

0 comments on commit 79c7451

Please sign in to comment.