<?php
/**
 * Plugin Name: WordForm
 * Plugin URI:  http://softcoy.com/wordform/
 * Description: WordForm – The intuitive drag-and-drop form builder for WordPress. Effortlessly create and embed custom forms into any page or post using full block editor support—no coding required.
 * Version:     2.0.2
 * Author:      SOFTCOY
 * Author URI:  https://softcoy.com/
 * License:     GPL2
 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: wordform
 * Domain Path: /languages
 */

/*
	Copyright 2024 softcoy.com
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

if ( ! defined( 'SFTCY_WORDFORM_VERSION' ) ) {
	define( 'SFTCY_WORDFORM_VERSION', '2.0.2' );
}
if ( ! defined( 'SFTCY_WORDFORM_MINIMUM_PHP_VERSION' ) ) {
	define( 'SFTCY_WORDFORM_MINIMUM_PHP_VERSION', '7.4' );
}
if ( ! defined( 'SFTCY_WORDFORM_MINIMUM_WP_VERSION' ) ) {
	define( 'SFTCY_WORDFORM_MINIMUM_WP_VERSION', '6.2' );
}
if ( ! defined( 'SFTCY_WORDFORM_PLUGIN_DIR' ) ) {
	define( 'SFTCY_WORDFORM_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
}
if ( ! defined( 'SFTCY_WORDFORM_PLUGIN_FILE' ) ) {
	define( 'SFTCY_WORDFORM_PLUGIN_FILE', plugin_dir_path( __FILE__ ) . '/wordform.php' );
}
if ( ! defined( 'SFTCY_WORDFORM_PLUGIN_INC' ) ) {
	define( 'SFTCY_WORDFORM_PLUGIN_INC', plugin_dir_path( __FILE__ ) . '/includes/' );
}



if ( ! function_exists( 'sftcy_wordform_autoloader' ) ) {

	/**
	 * Autoload Class files
	 *
	 * @param $sc_class - class name
	 * @since 1.0.0
	 */
	function sftcy_wordform_autoloader( $sc_class ) {
		$sc_class  = 'class-' . trim( $sc_class );
		$classfile = SFTCY_WORDFORM_PLUGIN_INC . strtolower( str_replace( '_', '-', $sc_class ) ) . '.php';
		if ( file_exists( $classfile ) ) {
			require_once $classfile;
		}
	}
}
	spl_autoload_register( 'sftcy_wordform_autoloader' );
	new SFTCY_Wordform_Autoloader();
	register_activation_hook( __FILE__, array( 'SFTCY_Wordform', 'activate' ) );