<?php

/**
 * Admin Notices
 *
 * @link       https://organicthemes.com
 * @since      1.0.0
 *
 * @package    Organic_Widgets
 * @subpackage Organic_Widgets/admin
 */

/**
 * The admin notice functionality of the plugin.
 *
 * @package Organic_Widgets
 * @subpackage Organic_Widgets/admin
 * @author Organic Themes <info@organicthemes.com>
 */
class Organic_Widgets_Pro_Admin_Notices {

	/** Function organic_widgets_pro_admin_notice */
	function organic_widgets_pro_admin_notice_license() {

		$license = get_option( 'organic_widgets_pro_license_key' );
		$status  = get_option( 'organic_widgets_pro_license_status' );

		if ( ! PAnD::is_admin_notice_active( 'notice-organic-widgets-license-forever' ) ) {
			return;
		}

		if ( $status == false && $status !== 'valid' ) {

			?>

				<div data-dismissible="notice-organic-widgets-license-forever" class="notice error">
					<p style="margin-bottom: 6px;"><?php printf( __( 'It appears your <strong>Organic Builder Widgets Pro</strong> license has not been activated. Please <a href="%1$s"><strong>activate</strong></a> your license to use the plugin.', 'organic-widgets-pro' ), admin_url( 'admin.php?page=organic-widgets-pro-license' ) ); ?></p>
					<p><?php printf( __( '<a class="button button-primary" href="%1$s">Activate Your License</a>', 'organic-widgets-pro' ), admin_url( 'admin.php?page=organic-widgets-pro-license' ) ); ?></p>
				</div>

			<?php

		}

	}

}
