Forum Replies Created
-
In reply to: Date format in spanish
Up!
In reply to: Date format in spanishPlease 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.
In reply to: Date format in spanishAy, 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
In reply to: Date format in spanishOK, file functions.php in your theme’s folder.
By the way, WordPress 3.5.1 and bbPress 2.2.4
De nada… š
In reply to: Date format in spanishThe 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 š