<?php
/**
 * Plugin Name: wpsection
 * Description: Elemntor Addon Plugin
 * Version: 99.0
 * Author: Rashid Mahfuz
 */

defined( 'WPSECTION_PLUGIN_PATH' ) || define( 'WPSECTION_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
define( 'WPSECTION_PLUGIN_URL', plugins_url( 'wpsection' ) . '/' );
defined('WPSECTION_VERSION' ) || define( 'WPSECTION_VERSION', '1.0.0' );


final class WPSection {
  // Define plugin constants
  const PLUGIN_NAME = 'wpsection';
  const PLUGIN_SLUG = 'wpsection';
	
  // Constructor function
  function __construct() {
    // Register plugin activation and deactivation hooks
    register_activation_hook( __FILE__, array( $this, 'activate' ) );
    register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );
    // Register plugin installation and uninstallation hooks
    register_uninstall_hook( __FILE__, array( 'WPSection', 'uninstall' ) );
	// This is for Elemntor Widget Settings
	require_once plugin_dir_path( __FILE__ ) . '/includes/elementor/settings.php';
	  
    // This is requer_one GLOB of this root 
                                                                                                               
	function wpsection_include_files() {
	  $plugin_path = plugin_dir_path( __FILE__ );

	  foreach ( glob( $plugin_path . '/includes/require_once/*.php' ) as $file ) {
		require_once $file;
	  }
	}
	wpsection_include_files(); 
	  
	function wpsection_templates_files() {
	  $plugin_path = plugin_dir_path( __FILE__ );

	  foreach ( glob( $plugin_path . '/includes/templates/*.php' ) as $file ) {
		require_once $file;
	  }
	}
	wpsection_templates_files();  
	
	  
	function wpsection_shop_files() {
	  $plugin_path = plugin_dir_path( __FILE__ );

	  foreach ( glob( $plugin_path . '/includes/shop/*.php' ) as $file ) {
		require_once $file;
	  }
	}
	wpsection_shop_files();   
	  
	  
}

  // Activate the plugin
  function activate() {
    // Code to run on activation
  }

  // Deactivate the plugin
  function deactivate() {
    // Code to run on deactivation
  }

  // Uninstall the plugin
  static function uninstall() {
    // Code to run on uninstallation
  }
}
// Instantiate the WPSection class
$wpsection = new WPSection();

