Allow requests through custom process

I have 2 sites on which I have a custom function running on the init hook. The code requires a user to be logged in under some circumstances. Currently it seems to be blocking the WPRUS communication between the two sites.

Is there something I can check for that will allow me to identify WPRUS requests and allow them through this process? Like a POST element or other globally available variable?



This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer