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

git-svn-id: http://svn.automattic.com/wordpress/trunk@8179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-06-24 00:29:04 +00:00
parent 316e26ee39
commit 34a726ae12
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;
}