@tjackson9
Hi,
You could try moving the call to do the install as below
- comment/remove these lines (420-421).
$activatestr = str_replace(WP_PLUGIN_DIR . "/", "activate_", __FILE__);
add_action($activatestr, 'loginLockdown_install');
- Add after those lines
register_activation_hook( __FILE__, 'loginLockdown_install' );
Haven’t tried it, but should work. make sure to deactivate & activate the plugin after.
Sam
Hi @mvandemar,
The issue is with line 420, when you are trying to create a activate hook name from the file path, being windows it contains a \ as the separator, but also being wordpress it also contains / for some of the separators, here’s my fix for it (forgive the nested str_replace).
$activatestr =
str_replace(
DIRECTORY_SEPARATOR, "/",
str_replace(
str_replace("/", DIRECTORY_SEPARATOR,
WP_PLUGIN_DIR
)
. DIRECTORY_SEPARATOR, "activate_", __FILE__)
);
Would this be better done with register_activation_hook ?
Sam