mirror of
				https://github.com/pierre42100/ComunicAPI
				synced 2025-11-04 12:14:12 +00:00 
			
		
		
		
	Get informations about likes in posts
This commit is contained in:
		@@ -177,6 +177,10 @@ class Posts {
 | 
			
		||||
		$info["link_description"] = $src["description_page"];
 | 
			
		||||
		$info["link_image"] = $src["image_page"];
 | 
			
		||||
 | 
			
		||||
		//Get informations about likes
 | 
			
		||||
		$info["likes"] = CS::get()->components->likes->count($info["ID"], Likes::LIKE_POST);
 | 
			
		||||
		$info["userlike"] = user_signed_in() ? CS::get()->components->likes->is_liking(userID, $info["ID"], Likes::LIKE_POST) : false;
 | 
			
		||||
 | 
			
		||||
		//Load comments, if required
 | 
			
		||||
		if($load_comments)
 | 
			
		||||
			$info["comments"] = CS::get()->components->comments->get($info["ID"]);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user