%s

', esc_html__( 'Alpha Google Map For Elementor is already active from another plugin folder. Deactivate and delete the old copy before activating this one, or install the update using a ZIP whose top-level folder is alpha-google-map-for-elementor.', 'alpha-google-map-for-elementor' ) ); } } add_action( 'admin_notices', 'alpha_google_map_for_elementor_duplicate_copy_notice' ); register_activation_hook( __FILE__, static function (): void { if ( ! function_exists( 'deactivate_plugins' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } deactivate_plugins( plugin_basename( __FILE__ ) ); wp_die( esc_html__( 'Alpha Google Map For Elementor is already active from another plugin folder. Deactivate and delete the old copy before activating this one, or install the update using a ZIP whose top-level folder is alpha-google-map-for-elementor.', 'alpha-google-map-for-elementor' ), esc_html__( 'Plugin activation blocked', 'alpha-google-map-for-elementor' ), array( 'back_link' => true ) ); } ); return; } define( 'ALPHAMAP_VERSION', '1.5.0' ); define( 'ALPHAMAP_ADDONS_PL_ROOT', __FILE__ ); define( 'ALPHAMAP_PL_URL', plugins_url( '/', ALPHAMAP_ADDONS_PL_ROOT ) ); define( 'ALPHAMAP_PL_PATH', plugin_dir_path( ALPHAMAP_ADDONS_PL_ROOT ) ); define( 'ALPHAMAP_PL_ASSETS', trailingslashit( ALPHAMAP_PL_URL . 'assets' ) ); define( 'ALPHAMAP_PL_INCLUDE', trailingslashit( ALPHAMAP_PL_PATH . 'include' ) ); define( 'ALPHAMAP_PL_LANGUAGES', trailingslashit( ALPHAMAP_PL_PATH . 'languages' ) ); define( 'ALPHAMAP_PLUGIN_BASE', plugin_basename( ALPHAMAP_ADDONS_PL_ROOT ) ); /** * Plugin activation hook. */ function alpha_google_map_activate(): void { include_once ALPHAMAP_PL_INCLUDE . '/class-alpha-google-map.php'; if ( class_exists( '\AlphaGoogleMap\Alpha_Google_Map' ) ) { \AlphaGoogleMap\Alpha_Google_Map::activate(); } } register_activation_hook( __FILE__, 'alpha_google_map_activate' ); /** * Initializes and runs the Alpha Google Map add-on by including the required plugin file * and invoking the instance of the Alpha_Google_Map class. * * @return void */ function alpha_google_map_addon() { // Load plugin file. include_once ALPHAMAP_PL_INCLUDE . '/class-alpha-google-map.php'; // Run the plugin. \AlphaGoogleMap\Alpha_Google_Map::instance(); } add_action( 'plugins_loaded', 'alpha_google_map_addon' );