]*>.*?<\/title>/s', function($m) use (&$count) {
$count++;
return $count === 1 ? $m[0] : ";
}, $output);
// Count and remove duplicate meta descriptions
$count = 0;
$output = preg_replace_callback('/]*>/s', function($m) use (&$count) {
$count++;
return $count === 1 ? $m[0] : ";
}, $output);
return $output;
});
}, 1);
add_action('wp_head', function() {
ob_end_flush();
}, 9999);