mainwp_get_sql_where_allow_access_sites. Call this filter from Dashboard-side PHP code to retrieve the existing site-access SQL conditions for a custom site query.
Retrieve the Conditions
Run the code after MainWP has initialized its hooks:wp.
The returned conditions use MainWP’s existing site-access query logic and exclude staging sites. The result depends on the current execution context.
