関数 remove_all_filters()
定義ファイル :/blog/wp-includes/plugin.php
remove_all_filters()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | /** * Remove all of the hooks from a filter. * * @since 2.7.0 * * @param string $tag The filter to remove hooks from. * @param int|bool $priority Optional. The priority number to remove. Default false. * @return bool True when finished. */ function remove_all_filters( $tag, $priority = false ) { global $wp_filter, $merged_filters; if ( isset( $wp_filter[ $tag ]) ) { if ( false !== $priority && isset( $wp_filter[ $tag ][ $priority ] ) ) { $wp_filter[ $tag ][ $priority ] = array(); } else { $wp_filter[ $tag ] = array(); } } if ( isset( $merged_filters[ $tag ] ) ) { unset( $merged_filters[ $tag ] ); } return true; } |