current_user_switched() undefined
-
I’m having the weirdest issue on a site I’m working on locally. I have the user switching plugin active and I’m trying to display a message if I’ve switched to a user. I have the following code just for testing:
if ( current_user_switched() ) {
ray( ‘switched’ );
} else {
ray( ‘not switched’ );
}In my browser, I’m logged in and switched to a user, but when I refresh the page, I get a “call to undefined function” error about current_user_switched().
I went into the user-switching.php file and found the function definition… I added the following:
if ( ! function_exists( ‘current_user_switched’ ) ) {
ray( ‘here’);And the ray call fires, but I still get the undefined error.
Any chance you can tell me what I’m doing wrong here?
- You must be logged in to reply to this topic.