Replace hardcoded date and time formats with wp_option

This commit is contained in:
2019-01-19 13:10:35 +00:00
parent 4a40f3c45b
commit e83f7c4eb8
5 changed files with 5 additions and 5 deletions

View File

@@ -15,7 +15,7 @@
$year = date('Y', $date);
$month = date('F', $date);
$day = date('jS', $date);
$date = get_the_date('jS F, Y', $post->ID).' at '.get_the_date('H:i', $post->ID);
$date = get_the_date(get_option('date_format'), $post->ID).' at '.get_the_date(get_option('time_format'), $post->ID);
$content = (strlen($post->post_excerpt) === 0) ?
strip_tags(substr($post->post_content, 0, 200)).'[...]' :
$post->post_excerpt;