getGUID())) { $subscribed = true; } $methods = content_subscriptions_get_notification_settings(); if (!empty($methods)) { $return_value[] = \ElggMenuItem::factory([ 'name' => 'content_subscription_subscribe', 'text' => elgg_echo('content_subscriptions:subscribe'), 'href' => "action/content_subscriptions/subscribe?entity_guid={$entity->getGUID()}", 'is_action' => true, 'priority' => 100, 'item_class' => $subscribed ? 'hidden' : '', ]); } $return_value[] = \ElggMenuItem::factory([ 'name' => 'content_subscription_unsubscribe', 'text' => elgg_echo('content_subscriptions:unsubscribe'), 'href' => "action/content_subscriptions/subscribe?entity_guid={$entity->getGUID()}", 'is_action' => true, 'priority' => 101, 'item_class' => $subscribed ? '' : 'hidden', ]); return $return_value; } }