public static function iconUrlHandler($hook, $type, $url, $params) {

		$entity = elgg_extract('entity', $params);
		/* @var ElggEntity $entity */

		if ($entity instanceof Comment) {
			$owner = $entity->getOwnerEntity();
			if (!$owner) {
				return;
			}
			return $owner->getIconURL($params);
		}

		return $url;
	}
public static function iconUrlHandler($hook, $type, $url, $params) {

		$entity = elgg_extract('entity', $params);
		/* @var ElggEntity $entity */

		if ($entity instanceof Comment) {
			$owner = $entity->getOwnerEntity();
			if (!$owner) {
				return;
			}
			return $owner->getIconURL($params);
		}

		return $url;
	}
public static function iconUrlHandler ( $ hook , $ type , $ url , $ params ) { $ entity = elgg_extract ( 'entity' , $ params ) ; /* @var ElggEntity $entity */ if ( $ entity instanceof Comment ) { $ owner = $ entity -> getOwnerEntity ( ) ; if ( ! $ owner ) { return ; } return $ owner -> getIconURL ( $ params ) ; } return $ url ; }
Replaces comment icons

@param string $hook   "entity:icon:url"
@param string $type   "object"
@param string $url    Current URL
@param array  $params Hook params
@return string
Replaces comment icons