Me ayudarian con estas Lineas de PHP ?

  • Autor Autor ferlandia
  • Fecha de inicio Fecha de inicio
ferlandia

ferlandia

Gamma
Verificación en dos pasos activada
Gente, tengo este código:

PHP:
function time_ago( $type = 'post' ) {

	$d = 'comment' == $type ? 'get_comment_time' : 'get_post_time';

	return human_time_diff($d('U'), current_time('timestamp')) . " " . __('Hace');

}

Lo que quiero es pasar el "Hace" para adelante del return. Entonces en mi web quedaria: "Hace 2 dias/semanas/años"

Gracias por su ayuda gente!
 
PHP:
function time_ago( $type = 'post' ) {
    $d = 'comment' == $type ? 'get_comment_time' : 'get_post_time';
    return __('Hace') . " " . human_time_diff($d('U'), current_time('timestamp'));
}

Eso debería funcionar... Saludos :encouragement:
 
PHP:
function time_ago( $type = 'post' ) {
    $d = 'comment' == $type ? 'get_comment_time' : 'get_post_time';
    return __('Hace') . " " . human_time_diff($d('U'), current_time('timestamp'));
}

Eso debería funcionar... Saludos :encouragement:

Me hiciste ahorrar 300 dls, te lo agradezco de todo corazón genio
 
Atrás
Arriba