WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: User Access Manager] 3.1.1 compatibility (2 posts)

  1. Innerdvations
    Member
    Posted 3 years ago #

    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);

  2. Innerdvations
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic