callback = array(AdminNoticesController::getInstance(), 'proposeUpgradePopup'); parent::load(); } protected function checkTrigger() { $quotaController = QuotaController::getInstance(); if ($quotaController->hasQuota() === true) return false; // $quotaData = $quotaController->getQuota(); $this->reset('MSG_UPGRADE_MONTH'); $this->reset('MSG_UPGRADE_BULK'); return true; } protected function getMessage() { $statsControl = StatsController::getInstance(); $averageCompression = $statsControl->getAverageCompression(); $quotaController = QuotaController::getInstance(); $keyControl = ApiKeyController::getInstance(); //$keyModel->loadKey(); $login_url = 'https://shortpixel.com/login/'; $friend_url = $login_url; if ($keyControl->getKeyForDisplay()) { $login_url .= $keyControl->getKeyForDisplay() . '/spio-unlimited'; $friend_url = $login_url . 'tell-a-friend'; } $message = '
' . sprintf(__('The plugin has optimized %s images and has been stopped because it has reached the available quota limit.','shortpixel-image-optimiser'), $creditsUsed); if($totalImagesToOptimize > 0) { $message .= sprintf(__(' %s images and thumbnails have not been optimized by ShortPixel yet.','shortpixel-image-optimiser'), $totalImagesToOptimize ); } $message .= sprintf('
', $login_url); $message .= '