My blog is es_ES , the date format is in spanish in all of the blog except bbpress forums..
The function get_post_time is disable for translation. You can use a filter, example
add_filter ( ‘get_post_time’, ‘new_date’, 10, 3);
function new_date ($time, $d = ‘U’, $gmt = false) {
$translate = true;
$time = mysql2date($d, $time, $translate);
return $time;
}
Un saludo š
This filter i put in functions.php, isnt it?
Thxs!!!!!!
š š
OK, file functions.php in your theme’s folder.
By the way, WordPress 3.5.1 and bbPress 2.2.4
De nada… š
There is a problem with that code when using latest post bbpres widget
“last post was 43 years ago” when the last post was 6 days ago
Regards
Ay, bbPress make me feel so happy… š
add_filter ( ‘get_post_time’, ‘new_date’, 10, 3);
function new_date ($time, $d = āUā, $gmt = false) {
$translate = true;
$time = mysql2date($d, $time, $translate);
remove_filter (‘get_post_time’, ‘new_date’, 10, 3);
return $time;
}
Un saludo
Sorry, not run yet š still showing “43 dias y 2 meses” in last post widget on the sidebar š
Saludos!
Please try this code instead:
add_filter ( ‘bbp_get_reply_post_date’, ‘act_fecha’, 10, 6);
add_filter ( ‘bbp_get_topic_post_date’, ‘act_fecha’, 10, 6);
function act_fecha( $result, $reply_id, $humanize, $gmt, $date, $time ) {
$date = get_post_time( get_option( ‘date_format’ ), $gmt, $reply_id, $translate = true );
$result = sprintf( _x( ‘%1$s at %2$s’, ‘date at time’, ‘bbpress’ ), $date, $time );
$return $result;
}
The above code would now work.
Via ayudawordpres.com/foros