您可以使用全局$wp_filter
数组以检查每个筛选器上的回调。下面是一个代码片段,它打印出the_content
在主题的页脚部分进行筛选:
add_action(\'wp_footer\',function(){
global $wp_filter;
printf(\'<pre>%s</pre>\',print_r( $wp_filter[\'the_content\'],true));
});
优先级
10
零件可能如下所示:
[10] => Array
(
[wptexturize] => Array
(
[function] => wptexturize
[accepted_args] => 1
)
[convert_smilies] => Array
(
[function] => convert_smilies
[accepted_args] => 1
)
[convert_chars] => Array
(
[function] => convert_chars
[accepted_args] => 1
)
[wpautop] => Array
(
[function] => wpautop
[accepted_args] => 1
)
[shortcode_unautop] => Array
(
[function] => shortcode_unautop
[accepted_args] => 1
)
[prepend_attachment] => Array
(
[function] => prepend_attachment
[accepted_args] => 1
)
)