Example #1
0
      </li>
      <?php 
if (userStatus() == 'admin') {
    ?>
<li class="restrictCronToggle"><a class="updates_centre first-level" id="updateCentreBtn">IWP Update Centre<span id="updateCenterCount" style="display:none" class="count">1</span></a>
      	
        <div id="updates_centre_cont" style="display:none">
                   
          <div class="th rep_sprite" style="border-top: 1px solid #C1C4C6; height: 38px; border-bottom: 0;">
            <div class="btn_action float-right"><a class="rep_sprite updateActionBtn">Check Now</a></div>
            
          </div>
        </div>
      </li>
       <li><a class="first-level" id="iwpAddonsBtn">Addons <span class="count" style="<?php 
    if (($addonUpdate = getAddonAlertCount()) < 1) {
        ?>
display:none;<?php 
    }
    ?>
"><?php 
    echo $addonUpdate;
    ?>
</span></a></li><?php 
}
?>
       <li><a class="first-level" href="https://support.infinitewp.com/support/discussions/forums/290737?utm_source=application&utm_medium=userapp&utm_campaign=ideas" target="_blank">Got an idea?</a></li>
      <li class="help"><a class="first-level">Help <span style="font-size:7px;">▼</span></a>
      	<ul class="sub_menu_ul">
        	  <?php 
/* <li><a href="https://support.infinitewp.com/?utm_source=application&utm_medium=userapp&utm_campaign=support" target="_blank">Discussion Forum</a></li> */
Example #2
0
 public static function generalCheck(&$finalResponse)
 {
     if ($updateAvailable = checkUpdate()) {
         if (getOption('updateHideNotify') != $updateAvailable['newVersion'] && getOption('updateNotifySentToJS') != $updateAvailable['newVersion']) {
             $finalResponse['updateAvailable'] = $updateAvailable;
             updateOption('updateNotifySentToJS', $updateAvailable['newVersion']);
         }
     }
     $notifications = getNotifications(true);
     if (!empty($notifications)) {
         $finalResponse['notifications'] = $notifications;
     }
     $waitData = self::getWaitData();
     if (!empty($waitData)) {
         $finalResponse['data']['getWaitData'] = $waitData;
     }
     $alertCount = getAddonAlertCount();
     //$cookieAlertCount = manageCookies::cookieGet('addonAlertCount');
     $cookieAlertCount = getOption('addonAlertCount');
     if ($cookieAlertCount !== $alertCount) {
         //manageCookies::cookieSet('addonAlertCount',$alertCount,array('expire'=>0));
         updateOption('addonAlertCount', $alertCount);
         $finalResponse['addonAlertCount'] = $alertCount;
     }
 }