| 1 |
<?php |
| 2 |
|
| 3 |
namespace ImageOptimization\Modules\Core\Components; |
| 4 |
|
| 5 |
if ( ! defined( 'ABSPATH' ) ) { |
| 6 |
exit; // Exit if accessed directly. |
| 7 |
} |
| 8 |
|
| 9 |
use Elementor\WPNotificationsPackage\V120\Notifications as Notifications_SDK; |
| 10 |
|
| 11 |
class Notificator { |
| 12 |
private ?Notifications_SDK $notificator = null; |
| 13 |
|
| 14 |
public function get_notifications_by_conditions( bool $force_request = false ): array { |
| 15 |
return $this->notificator->get_notifications_by_conditions( $force_request ); |
| 16 |
} |
| 17 |
|
| 18 |
public function __construct() { |
| 19 |
require_once IMAGE_OPTIMIZATION_PATH . '/vendor/autoload.php'; |
| 20 |
|
| 21 |
$this->notificator = new Notifications_SDK( [ |
| 22 |
'app_name' => 'image-optimizer', |
| 23 |
'app_version' => IMAGE_OPTIMIZATION_VERSION, |
| 24 |
'short_app_name' => 'eio', |
| 25 |
'app_data' => [ |
| 26 |
'plugin_basename' => IMAGE_OPTIMIZATION_PLUGIN_FILE, |
| 27 |
], |
| 28 |
] ); |
| 29 |
} |
| 30 |
} |
| 31 |
|