使用自定义帖子类型时,请使用post_row_actions
过滤挂钩并检查立柱类型以仅对其进行修改:
add_filter(\'post_row_actions\',\'my_action_row\', 10, 2);
function my_action_row($actions, $post){
//check for your post type
if ($post->post_type =="feedbacks"){
/*do you stuff here
you can unset to remove actions
and to add actions ex:
$actions[\'in_google\'] = \'<a href="http://www.google.com/?q=\'.get_permalink($post->ID).\'">check if indexed</a>\';
*/
}
return $actions;
}
Quick update:
多亏了somaticif,如果您的自定义帖子类型是“层次”,那么您的动作挂钩是:
page_row_actions
.