PluginProbe ʕ •ᴥ•ʔ
WP STAGING – WordPress Backup, Restore, Migration & Clone / 3.1.4
WP STAGING – WordPress Backup, Restore, Migration & Clone v3.1.4
4.9.1 4.9.0 4.8.1 trunk 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.10.0 3.2.0 3.3.1 3.3.2 3.3.3 3.4.1 3.4.3 3.5.0 3.6.0 3.7.1 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 4.0.0 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.2.0 4.2.1 4.3.0 4.3.1 4.3.2 4.4.0 4.5.0 4.6.0 4.7.0 4.7.1 4.7.2 4.7.3 4.8.0
wp-staging / freeBootstrap.php
wp-staging Last commit date
Backend 2 years ago Backup 2 years ago Basic 2 years ago Core 2 years ago Framework 2 years ago Frontend 2 years ago assets 2 years ago languages 3 years ago vendor_wpstg 2 years ago Deactivate.php 2 years ago README.md 3 years ago autoloader.php 3 years ago bootstrap.php 2 years ago constantsFree.php 2 years ago freeBootstrap.php 2 years ago install.php 2 years ago opcacheBootstrap.php 2 years ago readme.txt 2 years ago runtimeRequirements.php 2 years ago uninstall.php 2 years ago wp-staging-error-handler.php 3 years ago wp-staging.php 2 years ago
freeBootstrap.php
46 lines
1 <?php
2
3 /**
4 * The purpose of the pre-bootstrap process is to make sure the environment is able to run
5 * the plugin without any errors, such as making sure there are no other WPSTAGING instances
6 * active at the same time.
7 *
8 * It works at a low level, without the autoloader, using anonymous callbacks and local variables
9 * to make sure we always use and execute the expected code.
10 *
11 * Since it uses closures, you can't dequeue those actions, but this is expected.
12 *
13 * @var string $pluginFilePath The absolute path to the main file of this plugin.
14 */
15
16 add_action('plugins_loaded', function () use ($pluginFilePath) {
17 // Unused $pluginFilePath: Other code will fail if removed it
18 try {
19 require __DIR__ . '/runtimeRequirements.php';
20 require_once __DIR__ . '/bootstrap.php';
21 } catch (Exception $e) {
22 if (defined('WPSTG_DEBUG') && WPSTG_DEBUG) {
23 error_log('WP STAGING: ' . $e->getMessage());
24 }
25 }
26 }, 11, 0); // The priority of this hook must be larger than 10 for the runtime requirement check to detect older versions of WPSTAGING.
27
28 register_activation_hook($pluginFilePath, function () use ($pluginFilePath) {
29 // Unused $pluginFilePath: Other code will fail if removed it
30
31 try {
32 require __DIR__ . '/runtimeRequirements.php';
33 require_once __DIR__ . '/bootstrap.php';
34 require_once __DIR__ . '/install.php';
35 } catch (Exception $e) {
36 if (defined('WPSTG_DEBUG') && WPSTG_DEBUG) {
37 error_log('WP STAGING: ' . $e->getMessage());
38 }
39 }
40 });
41
42 register_deactivation_hook($pluginFilePath, function () use ($pluginFilePath) {
43 require_once __DIR__ . '/Deactivate.php';
44 new WPStaging\Deactivate($pluginFilePath);
45 });
46