i have to do a simple work
i have to find all <youtube>v=xxxxxx</youtube> in post of a wordpress
and replace then custom way!
this function is in post-template.php in wp-include folder.
pls help!
i have to find all <youtube>v=xxxxxx</youtube> in post of a wordpress
and replace then custom way!
Code:
function the_content($more_link_text = null, $stripteaser = 0) {
$content = get_the_content($more_link_text, $stripteaser);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
preg_match_all('#<youtube>(.*?)</youtube>#i', $content, $link_matches);
if (count($link_matches) > 0){
foreach ($link_matches as $link_value){
echo $link_value;
}
}
return $content;
}
pls help!
Last edited: