Ticket #7216: 7216.r8534.diff
File 7216.r8534.diff, 1.4 KB (added by , 17 years ago) |
---|
-
plugin.php
206 206 return $r; 207 207 } 208 208 209 /** 210 * Remove all of the hooks from a filter. 211 * 212 * @since {@internal Version Unknown}} 213 * 214 * @param string $tag The filter to remove hooks from. 215 * @param int $priority The priority number to remove. 216 * @return bool True when finished. 217 */ 218 function remove_all_filters($tag, $priority = false) { 219 global $wp_filter, $merge_filters; 209 220 221 if( isset($wp_filter[$tag]) ) { 222 if( false !== $priority && isset($$wp_filter[$tag][$priority]) ) 223 unset($wp_filter[$tag][$priority]); 224 else 225 unset($wp_filter[$tag]); 226 } 227 228 if( isset($merged_filters[$tag]) ) 229 unset($merged_filters[$tag]); 230 231 return true; 232 } 233 210 234 /** 211 235 * current_filter() - Return the name of the current filter or action. 212 236 * … … 427 451 return remove_filter($tag, $function_to_remove, $priority, $accepted_args); 428 452 } 429 453 454 /** 455 * Remove all of the hooks from an action. 456 * 457 * @since {@internal Version Unknown}} 458 * 459 * @param string $tag The action to remove hooks from. 460 * @param int $priority The priority number to remove. 461 * @return bool True when finished. 462 */ 463 function remove_all_actions($tag, $priority = false) { 464 return remove_all_filters($tag, $priority); 465 } 466 430 467 // 431 468 // Functions for handling plugins. 432 469 //