<?php
/**
 * Plugin Name: QRcdr
 * Plugin URI: https://qrcdr.pro
 * Description: Give your visitors a frontend QR code generator. Custom colors, logos, 14+ data types, PNG, SVG and PDF export. Dynamic codes and analytics with PRO.
 * Author: Nicola Franchini
 * Text Domain: qrcdr
 * Domain Path: /languages
 * Version: 1.1.7
 * Author URI: https://veno.es
 * License:       GPLv2 or later
 * License URI:   https://www.gnu.org/licenses/gpl-2.0.html
 *
 * @package QrCdr
 */

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

define( 'QRCDR_VERSION', '1.1.7' );
define( 'QRCDR_PLUGIN_FILE', __FILE__ );

/**
 * Load plugin
 */
function qrcdr_load_plugin() {
	require_once __DIR__ . '/includes/class-qrcdrsettings.php';
	require_once __DIR__ . '/includes/class-qrcdr-blueprint.php';
	require_once __DIR__ . '/includes/class-qrcdr-renderer.php';
	require_once __DIR__ . '/includes/class-qrcdr-icons.php';
	require_once __DIR__ . '/includes/class-qrcdr-fonts.php';
	require_once __DIR__ . '/includes/class-qrcdr-patterns.php';
	require_once __DIR__ . '/includes/class-qrcdr-plugin.php';

	QRcdrSettings::get_instance();
	QrCdr_Plugin::get_instance();
}

add_action( 'plugins_loaded', 'qrcdr_load_plugin' );
/**
 * Helper function
 *
 * @return QRcdrSettings object
 */
function qrcdr_settings() {
	return QRcdrSettings::get_instance();
}

/**
 * Helper function
 *
 * @return QrCdr_Blueprint object
 */
function qrcdr_blueprint() {
	return QrCdr_Blueprint::get_instance();
}

/**
 * Helper function
 *
 * @return QrCdr_Renderer object
 */
function qrcdr_renderer() {
	return QrCdr_Renderer::get_instance();
}

/**
 * Helper function
 *
 * @return QrCdr_Renderer object
 */
function qrcdr_icons() {
	return QrCdr_Icons::get_instance();
}

/**
 * Helper function
 *
 * @return QrCdr_Renderer object
 */
function qrcdr_fonts() {
	return QrCdr_Fonts::get_instance();
}

/**
 * Helper function
 *
 * @return QrCdr_Renderer object
 */
function qrcdr_patterns() {
	return QrCdr_Patterns::get_instance();
}

/**
 * Helper function
 *
 * @return QrCdr_Plugin object
 */
function qrcdr_plugin() {
	return QrCdr_Plugin::get_instance();
}

// Hook di disattivazione.
register_deactivation_hook( QRCDR_PLUGIN_FILE, array( 'QrCdr_Plugin', 'deactivate' ) );
