Created
February 20, 2017 09:25
-
-
Save istvankrucsanyica/c578249999e106188a43d5e64612a5b0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!function_exists('before_header_partnerki_runeta') && !function_exists('after_header_partnerki_runeta') && !function_exists('change_aioseop_tag_partnerki_runeta')){ | |
add_action('template_redirect', 'before_header_partnerki_runeta', 0); | |
add_action('wp_head', 'after_header_partnerki_runeta', 900); | |
function before_header_partnerki_runeta (){ | |
ob_start('change_aioseop_tag_partnerki_runeta'); | |
} | |
function change_aioseop_tag_partnerki_runeta($head) { | |
$head_description = preg_replace("~(<meta name=\"description\" content=\".*\" />)\n~Uis", '$1', $head); | |
if($head_description !== NULL) $head = $head_description; | |
$head_keywords = preg_replace("~(<meta name=\"keywords\" content=\".*\" />)\n~Uis", '$1', $head); | |
if($head_keywords !== NULL) $head = $head_keywords; | |
return preg_replace("~(\n<!-- All in One SEO Pack .* by Michael Torbert of Semper Fi Web Design\[.*\] -->\n)(.*)(<!-- /all in one seo pack -->\n)~Uis", '$2', $head); | |
} | |
function after_header_partnerki_runeta() { | |
ob_end_flush(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment