WordPress.org

Support

Support » Plugins and Hacks » Hacks » [Plugin: User Access Manager] 3.1.1 compatibility

[Plugin: User Access Manager] 3.1.1 compatibility

  • I tried running the current version of UAM (1.1.4) on WP 3.1.1 and so far I haven’t noticed any problems except that the uninstall hook is from an instanced object rather than a static method. The only reason I even noticed that was because I had WP_DEBUG on while developing another plugin and saw the notice “register_uninstall_hook was called incorrectly.”

    Sorry I haven’t written this as a patch file, but in case anyone is interested here’s what I changed:

    in file UserAccessManager.class.php:
    line 31: protected static $adminOptionsName = “uamAdminOptions”;
    line 406: public static function uninstall()
    line 414: delete_option(self::$adminOptionsName);
    line 417: self::deleteHtaccessFiles();
    line 447: public static function deactivate()
    line 449: self::deleteHtaccessFiles();
    line 591: public static function deleteHtaccessFiles($dir = null)
    line 730: $uamOptions = get_option(self::$adminOptionsName);
    line 738: update_option(self::$adminOptionsName, $uamAdminOptions);

Viewing 1 replies (of 1 total)
  • Forgot the most important step, which is to change user-access-manager.php

    register_uninstall_hook(__FILE__, array(&$userAccessManager, ‘uninstall’));

    to

    register_uninstall_hook(__FILE__, array(‘UserAccessManager’, ‘uninstall’));

    It’s probably a good idea to give the same treatment to install and deactivate as well, but hopefully this is a good starting point for someone.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: User Access Manager] 3.1.1 compatibility’ is closed to new replies.