-
Gansad replied to the question URL Preview (internal url) captures login page instead in the forum BuddyBoss Wall 8 years, 4 months ago
I’m trying to create something like this which you gave for RBE… any idea how to do this for the url preview ?
/*
Plugin Name: WP Require Auth Plugin Fix for RBE
Description: Fix Private Plugin Conflict With RBE Plugin
Version: 1.1
Author: BB
Author URI: #
*/defined('ABSPATH') or exit;
function rbe_fix_wp_require_auth()
{
global $pagenow,$_SERVER;if(defined( 'DOING_AJAX' ) && DOING_AJAX) {
if($pagenow == "admin-ajax.php" AND isset($_GET["action"]) AND $_GET["action"] == "cloudmailin_incoming_service") {
$_SERVER["PHP_SELF"] = "wp-login.php"; // by pass site private.
}
}
}add_action('init', 'rbe_fix_wp_require_auth',1);