} // don't try to use ob_gzhandler on hhvm, it's not supported // (see https://github.com/facebook/hhvm/issues/1854) if (defined('HHVM_VERSION')) { return false; } // start gzipping ob_start("ob_gzhandler"); } add_action('pre_get_posts', function () { global $wp_query; if (!is_feed()) { return; } $feedname = get_query_var('feed'); $feed = \Podlove\Model\Feed::find_one_by_property('slug', $feedname); if (isset($feed) && $feed->protected == 1) { if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])) { feed_authentication(); } else { switch ($feed->protection_type) { case '0': // A local User/PW combination is set if ($_SERVER['PHP_AUTH_USER'] == $feed->protection_user && $_SERVER['PHP_AUTH_PW'] == $feed->protection_password) { // let the script continue check_for_and_do_compression(); } else { feed_authentication(); } break; case '1':