要查看为特定挂钩注册的回调,请检查$GLOBALS[\'wp_filter\']
. 我为此编写了一个小插件:T5 Debug Hook.
安装完成后,如果使用?hook=NAME
.
实例example.com/?hook=the_content
:
array (
8 =>
array (
\'000000001b2c775b000000006f220833run_shortcode\' =>
array (
\'function\' =>
array (
0 =>
WP_Embed::__set_state(array(
\'handlers\' =>
array (
10 =>
array (
\'googlevideo\' =>
array (
\'regex\' => \'#http://video\\\\.google\\\\.([A-Za-z.]{2,5})/videoplay\\\\?docid=([\\\\d-]+)(.*?)#i\',
\'callback\' => \'wp_embed_handler_googlevideo\',
),
),
),
\'post_ID\' => NULL,
\'usecache\' => true,
\'linkifunknown\' => true,
)),
1 => \'run_shortcode\',
),
\'accepted_args\' => 1,
),
\'000000001b2c775b000000006f220833autoembed\' =>
array (
\'function\' =>
array (
0 =>
WP_Embed::__set_state(array(
\'handlers\' =>
array (
10 =>
array (
\'googlevideo\' =>
array (
\'regex\' => \'#http://video\\\\.google\\\\.([A-Za-z.]{2,5})/videoplay\\\\?docid=([\\\\d-]+)(.*?)#i\',
\'callback\' => \'wp_embed_handler_googlevideo\',
),
),
),
\'post_ID\' => NULL,
\'usecache\' => true,
\'linkifunknown\' => true,
)),
1 => \'autoembed\',
),
\'accepted_args\' => 1,
),
),
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,
),
),
11 =>
array (
\'capital_P_dangit\' =>
array (
\'function\' => \'capital_P_dangit\',
\'accepted_args\' => 1,
),
\'do_shortcode\' =>
array (
\'function\' => \'do_shortcode\',
\'accepted_args\' => 1,
),
),
)