Remove default feed function when adding new function to hook. fixes #6970

git-svn-id: https://develop.svn.wordpress.org/trunk@8179 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-06-24 00:29:04 +00:00
parent 672ca87116
commit 86bfd4952f
1 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,8 @@ function add_feed($feedname, $function) {
$wp_rewrite->feeds[] = $feedname;
}
$hook = 'do_feed_' . $feedname;
remove_action($hook, $function, 10, 1);
// Remove default function hook
remove_action($hook, $hook, 10, 1);
add_action($hook, $function, 10, 1);
return $hook;
}