<?php
/**
 * Admin Initialization
 *
 * @package Author_Website_Templates
 */

if (!defined('ABSPATH')) {
    exit;
}

class AWT_Admin_Init
{

    /**
     * Admin notice: Minimum Elementor Version
     */
    public static function admin_notice_minimum_elementor_version()
    {
        if (isset($_GET['activate']))
            unset($_GET['activate']);

        $message = sprintf(
            /* translators: 1: Plugin name 2: Elementor 3: Required Elementor version */
            esc_html__('"%1$s" requires "%2$s" version %3$s or greater.', 'author-website-templates'),
            '<strong>' . esc_html__('Author Website Templates', 'author-website-templates') . '</strong>',
            '<strong>' . esc_html__('Elementor', 'author-website-templates') . '</strong>',
            Rswpthemes_Author_Website_Templates::MINIMUM_ELEMENTOR_VERSION
        );

        printf('<div class="notice notice-warning is-dismissible"><p>%1$s</p></div>', $message);
    }

    /**
     * Admin notice: Minimum PHP Version
     */
    public static function admin_notice_minimum_php_version()
    {
        if (isset($_GET['activate']))
            unset($_GET['activate']);

        $message = sprintf(
            /* translators: 1: Plugin name 2: PHP 3: Required PHP version */
            esc_html__('"%1$s" requires "%2$s" version %3$s or greater.', 'author-website-templates'),
            '<strong>' . esc_html__('Author Website Templates', 'author-website-templates') . '</strong>',
            '<strong>' . esc_html__('PHP', 'author-website-templates') . '</strong>',
            Rswpthemes_Author_Website_Templates::MINIMUM_PHP_VERSION
        );

        printf('<div class="notice notice-warning is-dismissible"><p>%1$s</p></div>', $message);
    }
}
