<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
class Activity_Plugin_Menus
{
  // core_main
  public function onMenuInitialize_CoreMiniUpdate($row)
  {
    // Check viewer
    $viewer = Engine_Api::_()->user()->getViewer();
    if( !$viewer || !$viewer->getIdentity() ) {
      return false;
    }

    $notificationCount = Engine_Api::_()->getDbtable('notifications', 'activity')->hasNotifications($viewer);
    $view = Zend_Registry::get('Zend_View');
    $label = $view->translate(array('%s Update', '%s Updates', $notificationCount), $view->locale()->toNumber($notificationCount));
    return array(
      'label' => $label,
      'class' => 'updates_toggle ' . ( $notificationCount ? 'new_updates' : ''),
      'uri' => 'javascript:void(0);this.blur();',
    );
  }
  
  public function enableonthisday() {
    $viewer = Engine_Api::_()->user()->getViewer();
    if(!$viewer->getIdentity()){
			return false;	
		}    
    return true;
  }
}
