function _comment_goodness_uses_timeago_format in Comment goodness 7
Checks if $date_type uses a Timeago date format.
Parameters
string $date_type: The name of an existing date type.
Return value
bool If $date_type uses a Timeago date format.
1 call to _comment_goodness_uses_timeago_format()
- _comment_goodness_get_submitted_string in ./
comment_goodness.module - Returns the proper format of the 'Submitted' string.
File
- ./
comment_goodness.module, line 731 - Comment goodness provides newest to oldest comment sorting
Code
function _comment_goodness_uses_timeago_format($date_type) {
if (module_exists('timeago')) {
$date_type_format = variable_get('date_format_' . $date_type);
$timeago_formats = array(
TIMEAGO_FORMAT_SHORT_US,
TIMEAGO_FORMAT_SHORT,
TIMEAGO_FORMAT_MEDIUM_US,
TIMEAGO_FORMAT_MEDIUM,
TIMEAGO_FORMAT_LONG_US,
TIMEAGO_FORMAT_LONG,
);
return in_array($date_type_format, $timeago_formats);
}
else {
return FALSE;
}
}