鉴于此:
<?php add_action( $hook, $function_to_add, $priority, $accepted_args ); ?>
有没有办法$hook
函数内的值$function_to_add
?鉴于此:
<?php add_action( $hook, $function_to_add, $priority, $accepted_args ); ?>
有没有办法$hook
函数内的值$function_to_add
?当前挂钩的名称始终为current_filter()
. 尽管名称不同,此函数也会返回操作的名称。
用法示例:Move the textarea in a comment form.
当前优先级为:key( $GLOBALS[\'wp_filter\'][ $hook ] )
.
我在下面定义了一个自定义帖子类型,我想添加一个自定义行操作,以允许我通过管理面板“更新”帖子class LeagueCpt { function __construct() { add_action( \'init\', array(&$this,\'registerLeagueCPT\')); add_filter(\'post_row_actions\', array(&$this,\'post_r