Support » Plugin: Enable jQuery Migrate Helper » jQuery_Migrate_Helper::init_actions initialises user

  • jQuery_Migrate_Helper::init_actions initialises the currently logged in user by calling is_user_logged_in(). This can mess with other plugins that attempt to adjust things like roles by causing the user to be initialised before the roles are and could be mitigated by changing the priority of the helper initialisation so as to run after other plugins_loaded handlers by default.

    Arguably plugins that want to mess with roles should set their priority appropriately to run earlier (which is the fix I’m making to the one that I’m using, that was written by someone at the company about a decade ago and adjusts roles by overwriting the global $wp_user_roles :facepalm:).

  • The topic ‘jQuery_Migrate_Helper::init_actions initialises user’ is closed to new replies.