init(); } private function init() { require __DIR__ . '/vendor/autoload.php'; $this->notifications = new Notifications( [ 'app_name' => 'wp-notifications-package', 'app_version' => '1.2.0', 'short_app_name' => 'wppe', 'app_data' => [ 'plugin_basename' => plugin_basename( __FILE__ ), ], ] ); add_action( 'admin_notices', [ $this, 'display_notifications' ] ); add_action( 'admin_footer', [ $this, 'display_dialog' ] ); } public function display_notifications() { $notifications = $this->notifications->get_notifications_by_conditions(); if ( empty( $notifications ) ) { return; } ?>