Skip to content

Commit 2356a17

Browse files
committed
removed directory check on activate
1 parent f1651f6 commit 2356a17

File tree

4 files changed

+15
-17
lines changed

4 files changed

+15
-17
lines changed

includes/class-mill3-wp-utils-activator.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,20 @@ class Mill3_Wp_Utils_Activator
3737
public static function activate()
3838
{
3939
// Expected plugin directory
40-
$expected_dir = join('/', [WP_PLUGIN_DIR, MILL3_WP_UTILS_PLUGIN_DIR_NAME]);
40+
// $expected_dir = join('/', [WP_PLUGIN_DIR, MILL3_WP_UTILS_PLUGIN_DIR_NAME]);
4141

42-
// Current plugin directory
43-
$current_dir = MILL3_WP_UTILS_PLUGIN_DIR_PATH;
42+
// // Current plugin directory
43+
// $current_dir = MILL3_WP_UTILS_PLUGIN_DIR_PATH;
4444

45-
// current plugin name
46-
$plugin_name = plugin_basename(join("/", [MILL3_WP_UTILS_PLUGIN_DIR_PATH, MILL3_WP_UTILS_PLUGIN_FILE_NAME]));
45+
// // current plugin name
46+
// $plugin_name = plugin_basename(join("/", [MILL3_WP_UTILS_PLUGIN_DIR_PATH, MILL3_WP_UTILS_PLUGIN_FILE_NAME]));
4747

48-
// Check if the plugin is installed in the correct directory
49-
if (trailingslashit($current_dir) !== trailingslashit($expected_dir)) {
50-
// Deactivate the plugin
51-
deactivate_plugins($plugin_name);
52-
// Output an error message
53-
wp_die(__('Plugin must be installed in the <code>' . $expected_dir . '</code> directory.', 'mill3-wp-utils'));
54-
}
48+
// // Check if the plugin is installed in the correct directory
49+
// if (trailingslashit($current_dir) !== trailingslashit($expected_dir)) {
50+
// // Deactivate the plugin
51+
// deactivate_plugins($plugin_name);
52+
// // Output an error message
53+
// wp_die(__('Plugin must be installed in the <code>' . $expected_dir . '</code> directory.', 'mill3-wp-utils'));
54+
// }
5555
}
5656
}

includes/class-mill3-wp-utils-updater.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ function __construct()
3232
);
3333

3434
$this->updater->setBranch('master');
35-
36-
// error_log(print_r($this->updater->getUpdate(), true));
3735
}
3836

3937
/**

includes/class-mill3-wp-utils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ private function set_updates()
160160
// register the hooks to WP core update process
161161

162162
// after the plugin is downloaded, force the plugin directory to match existing directory structure
163-
$this->loader->add_filter('upgrader_package_options', $plugin_updates, 'upgrader_package_options', 10, 1);
163+
// $this->loader->add_filter('upgrader_package_options', $plugin_updates, 'upgrader_package_options', 10, 1);
164164

165165
// check for updates
166166
$this->loader->add_filter('pre_set_site_transient_update_plugins', $plugin_updates, 'check_for_update');

mill3-wp-utils.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: MILL3 WP Utils
44
* Plugin URI: https://github.com/Mill3/mill3-wp-utils-plugin
55
* Description: MILL3 WP utils, includes Gutenberg editor sidebar resizer.
6-
* Version: 0.0.3.9
6+
* Version: 0.0.3.9.1
77
* Author: MILL3 Studio
88
* Author URI: https://mill3.studio/
99
* Tested up to: 6.6.6
@@ -27,7 +27,7 @@
2727
* Start at version 0.0.1 and use SemVer - https://semver.org
2828
* Rename this for your plugin and update it as you release new versions.
2929
*/
30-
define( 'MILL3_WP_UTILS_VERSION', '0.0.3.9' );
30+
define( 'MILL3_WP_UTILS_VERSION', '0.0.3.9.1' );
3131

3232

3333
/**

0 commit comments

Comments
 (0)