Changeset 8660
- Timestamp:
- 08/17/2008 11:15:38 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/plugin.php
r8587 r8660 207 207 } 208 208 209 /** 210 * Remove all of the hooks from a filter. 211 * 212 * @since 2.7 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; 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 } 209 233 210 234 /** … … 426 450 function remove_action($tag, $function_to_remove, $priority = 10, $accepted_args = 1) { 427 451 return remove_filter($tag, $function_to_remove, $priority, $accepted_args); 452 } 453 454 /** 455 * Remove all of the hooks from an action. 456 * 457 * @since 2.7 458 * 459 * @param string $tag The action to remove hooks from. 460 * @param int $priority The priority number to remove them from. 461 * @return bool True when finished. 462 */ 463 function remove_all_actions($tag, $priority = false) { 464 return remove_all_filters($tag, $priority); 428 465 } 429 466
Note: See TracChangeset
for help on using the changeset viewer.