override get_date option.
This commit is contained in:
parent
741c51d448
commit
9d072d063a
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user