cap_key = $wpdb->prefix . 'capabilities'; TO THIS: $this->cap_key = CAP_PREFIX . 'capabilities'; */ // TODO: Allow for SSL $wpcl_master_domain = 'http://'. MASTER_DOMAIN; $wpcl_current_domain = 'http://'.$_SERVER["SERVER_NAME"]; function wpcl_action() { $wpcl_stage = $_GET['wpcl-stage']; switch ($wpcl_stage) { case '1': $target_url = wpcl_send_cookie(urldecode($_GET['wpcl-caller'])); wp_redirect($target_url); exit; break; case '2': wpcl_receive_cookie(); break; default: break; } } add_filter('init', 'wpcl_action', 10, 2); function wpcl_background() { global $wpcl_master_domain, $wpcl_current_domain; // Bypass for master if ( $wpcl_current_domain == $wpcl_master_domain ) { return; } // If logged in on a slave site, send the cookie to the master if ( is_user_logged_in() ) { $target_url = wpcl_send_cookie($wpcl_master_domain); } // If not logged in on a slave site, request a cookie from the master else { $target_url = wpcl_request_cookie(); } ?>