diff --git a/functions.php b/functions.php index a0ba2ba..701111b 100644 --- a/functions.php +++ b/functions.php @@ -214,3 +214,16 @@ function cbsonline_add_page_to_tag_archive($obj) $obj->query_vars['post_type'] = ['post', 'page']; } } + +// override date_format option +add_filter('option_date_format', 'cbsonline_date_format'); +function cbsonline_date_format($format) { + $lang = get_query_var('lang', ''); + switch($lang) { + case 'ja': + return 'Y年n月j日'; + case 'en_US': + return 'D, d M Y'; + } + return $format; +}