PHP code example of coldtrick / likes_extended
1. Go to this page and download the library: Download coldtrick/likes_extended library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
coldtrick / likes_extended example snippets
elgg_register_event_handler('likes:subtypes', 'likes_extended', function (\Elgg\Event $event): array {
$result = $event->getValue();
// my custom like
$result['my_like_type'] = [
'icon' => 'cheers',
];
return $result;
}