| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Plugin Name: Visual Composer |
| 5 |
* Plugin URI: https://visualcomposer.com/premium/?utm_source=vcwb&utm_medium=wpplugins&utm_campaign=vcbrand&utm_content=text |
| 6 |
* Description: Create your WordPress website with the fast and easy-to-use drag-and-drop builder for experts and beginners. |
| 7 |
* Version: 45.2.0 |
| 8 |
* Author: visualcomposer.com |
| 9 |
* Author URI: https://visualcomposer.com/?utm_source=vcwb&utm_medium=wpplugins&utm_campaign=vcbrand&utm_content=text |
| 10 |
* Copyright: (c) 2017 TechMill Ltd. |
| 11 |
* License: GPLv3 |
| 12 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html |
| 13 |
* Requires at least: 5.5 |
| 14 |
* Text Domain: visualcomposer |
| 15 |
* Domain Path: /languages/ |
| 16 |
*/ |
| 17 |
|
| 18 |
/** |
| 19 |
* Check for direct call file. |
| 20 |
*/ |
| 21 |
if (!defined('ABSPATH')) { |
| 22 |
header('Status: 403 Forbidden'); |
| 23 |
header('HTTP/1.1 403 Forbidden'); |
| 24 |
exit; |
| 25 |
} |
| 26 |
|
| 27 |
|
| 28 |
/** |
| 29 |
* Skip loading when installing. |
| 30 |
* |
| 31 |
* @see wp_installing |
| 32 |
*/ |
| 33 |
if (defined('WP_INSTALLING') && WP_INSTALLING) { |
| 34 |
return; |
| 35 |
} |
| 36 |
|
| 37 |
/** |
| 38 |
* Check for plugin conflict. |
| 39 |
*/ |
| 40 |
if (defined('VCV_VERSION')) { |
| 41 |
wp_die( |
| 42 |
'It seems that another version of Visual Composer Website Builder is active. Please deactivate it before use this version.' |
| 43 |
); |
| 44 |
} |
| 45 |
|
| 46 |
/** |
| 47 |
* Plugin version constant |
| 48 |
*/ |
| 49 |
define('VCV_VERSION', '45.2.0'); |
| 50 |
/** |
| 51 |
* Plugin url: 'http://web/wp-content/plugins/plugin_dir/' |
| 52 |
*/ |
| 53 |
define('VCV_PLUGIN_URL', rtrim(plugin_dir_url(__FILE__), '/') . '/'); |
| 54 |
/** |
| 55 |
* Plugin directory full path: 'server/web/wp-content/plugins/plugin_dir/' |
| 56 |
* @internal - please try to use vcapp()->path() instead |
| 57 |
*/ |
| 58 |
define('VCV_PLUGIN_DIR_PATH', rtrim(plugin_dir_path(__FILE__), '/') . '/'); |
| 59 |
/** |
| 60 |
* Plugin "basename" - directoryName/PluginFileName.php: 'vc-five/plugin-wordpress.php' |
| 61 |
*/ |
| 62 |
define('VCV_PLUGIN_BASE_NAME', plugin_basename(__FILE__)); |
| 63 |
/** |
| 64 |
* Plugin core file full path: '/server/web/wp-content/plugins/vc-five/plugin-wordpress.php' |
| 65 |
*/ |
| 66 |
define('VCV_PLUGIN_FULL_PATH', __FILE__); |
| 67 |
/** |
| 68 |
* Plugin directory name: 'visualcomposer' |
| 69 |
*/ |
| 70 |
define('VCV_PLUGIN_DIRNAME', basename(dirname(VCV_PLUGIN_BASE_NAME))); |
| 71 |
define('VCV_PLUGIN_ASSETS_DIRNAME', 'visualcomposer-assets'); |
| 72 |
/** |
| 73 |
* Plugin core prefix for options/meta and etc. |
| 74 |
*/ |
| 75 |
define('VCV_PREFIX', 'vcv-'); |
| 76 |
|
| 77 |
// Used in requirements.php |
| 78 |
/** |
| 79 |
* Minimal required PHP version. |
| 80 |
*/ |
| 81 |
define('VCV_REQUIRED_PHP_VERSION', '5.6'); |
| 82 |
/** |
| 83 |
* Minimal required WordPress version. |
| 84 |
*/ |
| 85 |
define('VCV_REQUIRED_BLOG_VERSION', '5.5'); |
| 86 |
if (!defined('VCV_AJAX_REQUEST')) { |
| 87 |
define('VCV_AJAX_REQUEST', 'vcv-ajax'); |
| 88 |
} |
| 89 |
if (!defined('VCV_ADMIN_AJAX_REQUEST')) { |
| 90 |
define('VCV_ADMIN_AJAX_REQUEST', 'vcv-admin-ajax'); |
| 91 |
} |
| 92 |
if (!defined('VCV_LAZY_LOAD')) { |
| 93 |
define('VCV_LAZY_LOAD', false); |
| 94 |
} |
| 95 |
/** |
| 96 |
* Check PHP version. |
| 97 |
* Check WordPress version. |
| 98 |
* PHP 5.1 parse-able (no parse error). |
| 99 |
*/ |
| 100 |
$dir = dirname(__FILE__); |
| 101 |
|
| 102 |
require_once $dir . '/visualcomposer/Env.php'; |
| 103 |
|
| 104 |
if (file_exists($dir . '/env-dev.php')) { |
| 105 |
require_once $dir . '/env-dev.php'; |
| 106 |
} else { |
| 107 |
require_once $dir . '/env.php'; |
| 108 |
} |
| 109 |
|
| 110 |
$uploadDir = wp_upload_dir(); |
| 111 |
define('VCV_PLUGIN_ASSETS_DIR_PATH', $uploadDir['basedir'] . '/' . VCV_PLUGIN_ASSETS_DIRNAME); |
| 112 |
|
| 113 |
require_once $dir . '/visualcomposer/Requirements.php'; |
| 114 |
|
| 115 |
$errorMessages = false; |
| 116 |
if (!defined('DOING_AJAX') || !DOING_AJAX) { |
| 117 |
$requirements = new VcvCoreRequirements(); |
| 118 |
$errorMessages = $requirements->getCoreRequirementsErrorMessages(); |
| 119 |
} |
| 120 |
|
| 121 |
// !! PHP 5.4 Required under this line (parse error otherwise). |
| 122 |
|
| 123 |
if ($errorMessages) { |
| 124 |
add_action('admin_notices', function () use ($errorMessages) { |
| 125 |
echo wp_kses($errorMessages, [ |
| 126 |
'div' => ['class' => []], |
| 127 |
'ul' => ['class' => []], |
| 128 |
'li' => [], |
| 129 |
'p' => [], |
| 130 |
'b' => [], |
| 131 |
]); |
| 132 |
}); |
| 133 |
} else { |
| 134 |
// Bootstrap the system. |
| 135 |
require $dir . '/bootstrap/autoload.php'; |
| 136 |
} |
| 137 |
|