| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Vision - Interactive Image Map Builder |
| 4 |
* Plugin URI: https://1.envato.market/getvision |
| 5 |
* Description: Vision is a lightweight and rich-feature plugin helps you create great interactive image maps. |
| 6 |
* Version: 1.9.7 |
| 7 |
* Requires at least: 4.6 |
| 8 |
* Requires PHP: 7.4 |
| 9 |
* Author: Avirtum |
| 10 |
* Author URI: https://1.envato.market/avirtum |
| 11 |
* License: GPLv3 |
| 12 |
* Text Domain: vision |
| 13 |
* Domain Path: /languages |
| 14 |
*/ |
| 15 |
defined('ABSPATH') || exit; |
| 16 |
|
| 17 |
define('VISION_PLUGIN_NAME', 'vision'); |
| 18 |
define('VISION_PLUGIN_VERSION', '1.9.7'); |
| 19 |
define('VISION_DB_VERSION', '1.1.0'); |
| 20 |
define('VISION_SHORTCODE_NAME', 'vision'); |
| 21 |
define('VISION_PLUGIN_BASE_NAME', plugin_basename(__FILE__)); |
| 22 |
define('VISION_PLUGIN_URL', plugin_dir_url(__FILE__)); |
| 23 |
define('VISION_PLUGIN_REST_URL', 'vision/v1' ); |
| 24 |
define('VISION_PLUGIN_PUBLIC_REST_URL', 'vision/public/v1' ); |
| 25 |
define('VISION_FEEDBACK_URL', 'https://avirtum.com/api/feedback/'); |
| 26 |
define('VISION_REST_URL', 'vision/v1'); |
| 27 |
|
| 28 |
/** |
| 29 |
* The code that runs during plugin activation |
| 30 |
*/ |
| 31 |
function vision_activate() { |
| 32 |
require_once(plugin_dir_path( __FILE__ ) . 'includes/activator.php'); |
| 33 |
$activator = new Vision_Activator(); |
| 34 |
$activator->activate(); |
| 35 |
} |
| 36 |
register_activation_hook( __FILE__, 'vision_activate' ); |
| 37 |
|
| 38 |
/** |
| 39 |
* The code that runs during plugin deactivation |
| 40 |
*/ |
| 41 |
function vision_deactivate() { |
| 42 |
require_once(plugin_dir_path( __FILE__ ) . 'includes/deactivator.php'); |
| 43 |
$deactivator = new Vision_Deactivator(); |
| 44 |
$deactivator->deactivate(); |
| 45 |
} |
| 46 |
register_deactivation_hook( __FILE__, 'vision_deactivate' ); |
| 47 |
|
| 48 |
/** |
| 49 |
* The code that runs after plugins loaded |
| 50 |
*/ |
| 51 |
function vision_check_db() { |
| 52 |
require_once(plugin_dir_path( __FILE__ ) . 'includes/activator.php'); |
| 53 |
|
| 54 |
$activator = new Vision_Activator(); |
| 55 |
$activator->check_db(); |
| 56 |
} |
| 57 |
add_action('plugins_loaded', 'vision_check_db'); |
| 58 |
|
| 59 |
/** |
| 60 |
* Begins execution of the plugin. |
| 61 |
* |
| 62 |
* Since everything within the plugin is registered via hooks, |
| 63 |
* then kicking off the plugin from this point in the file does |
| 64 |
* not affect the page life cycle. |
| 65 |
*/ |
| 66 |
function vision_run() { |
| 67 |
require_once(plugin_dir_path( __FILE__ ) . 'includes/plugin.php'); |
| 68 |
$pluginBasename = plugin_basename(__FILE__); |
| 69 |
|
| 70 |
$plugin = new Vision_Builder($pluginBasename); |
| 71 |
$plugin->run(); |
| 72 |
} |
| 73 |
add_action('init', 'vision_run'); |