<?php
/**
 * Plugin glomex_oEmbed
 *
 * @package   glomex_oEmbed
 * @author    glomex <info@glomex.com>
 * @copyright 2022 glomex
 * @license   Apache-2.0
 * @link      https://glomex.com
 */

namespace glomex_oEmbed\Backend;

use glomex_oEmbed\Engine\Base;

/**
 * Everything that involves notification on the WordPress dashboard
 */
class Notices extends Base {

	/**
	 * Initialize the class
	 *
	 * @return void|bool
	 */
	public function initialize() {
		if ( !parent::initialize() ) {
			return;
		}

		if ( empty( \getenv( 'GLOMEX_INTEGRATION_ID' ) ) ) {
			return;
		}

		\wpdesk_permanent_dismissible_wp_notice(
			\__( 'glomex oEmbed plugin detected integration ID in the environment. We will use it.', 'glomex-oembed' ),
			'notice-name'
		);
	}

}
