pero no consigo obtener de forma separada el número de likes.
Necesito una mano con esto, esta es la parte del código de la cual creo que debo sacar la variable $likes->total_count
Código PHP:
if(!$hasPersonLiked){
$returnStr.="<a class='like' href=\"javascript:wp_likes.like($postId);\" title='".($likes->total_count?$settings->text[5]:"")."' >";
$returnStr.="<img src=\"".$settings->likeImageUrl."\" alt='' border='0'/>";
//$this->text_default[5]="Like";
$returnStr.= "</a>";
$returnStr.= "<span class='text'>";
if($likes->total_count==0) {
//$this->text_default[7]="Be the first to like.";
$returnStr.= $likes->getText($likes->total_count, $settings->text[7]); ;
} elseif($likes->total_count>1){
//$this->text_default[3]="%NUM% people like this post.";
$returnStr.=$likes->getText($likes->total_count, $settings->text[3]);
} elseif($likes->total_count==1) {
//$this->text_default[4]="1 person likes this post.";
$returnStr=$returnStr.$likes->getText($likes->total_count, $settings->text[4]);
}
//$this->text_default[6]="Unlike";
$returnStr.="</span>";
} else {
$returnStr.="<a class='liked'><img src=\"".$settings->likeImageUrl."\" alt='' border='0'/></a><span class='text'>";
if($likes->total_count==1)
//$this->text_default[2]="You like this post.";
$returnStr.= $likes->getText($likes->total_count, $settings->text[2]);
elseif($likes->total_count==2)
//$this->text_default[1]="You and 1 person like this post.";
$returnStr.=$likes->getText(1, $settings->text[1]);
else {
$likes->total_count--;
//$this->text_default[0]="You and %NUM% people like this post.";
$returnStr.=$likes->getText($likes->total_count, $settings->text[0]);
}
$returnStr.="</span>";
}
$returnStr.= "<div class='like' ".($hasPersonLiked?'style="display:none"':"")."><a href=\"javascript:wp_likes.like($postId);\">".$settings->text[5]."</a></div>"
."<div class='unlike' ".($hasPersonLiked?'style="display:block"':"")."><a href=\"javascript:wp_likes.unlike($postId);\">".$settings->text[6]."</a></div>";
$returnStr.="</div>";
if($settings->customRender=='true') echo $returnStr;
else return $content.$returnStr;
}
me retorna el contenido total (imagen, botones y texto), yo necesitaría obtener individualmente el número.
Funcionamiento actual: http://patricioherrera.com.ar/work-number-3/
Gracias!