EP_WP_Query_Integration::action_loop_end PHP Method

action_loop_end() public method

Make sure the correct blog is restored
Since: 0.9
public action_loop_end ( $query )
    public function action_loop_end($query)
    {
        if (!is_multisite()) {
            return;
        }
        array_pop($this->query_stack);
        if (!ep_elasticpress_enabled($query) || apply_filters('ep_skip_query_integration', false, $query)) {
            return;
        }
        if (!empty($GLOBALS['switched'])) {
            restore_current_blog();
        }
    }