这是通过过滤*_row_actions
.
用于评论屏幕(/wp-admin/edit-comments.php
)这是挂钩:
add_filter( \'comment_row_actions\', \'comments_row_wpse_92313\', 15, 2 );
function comments_row_wpse_92313( $actions, $comment )
{
if( !current_user_can( \'delete_plugins\' ) )
unset( $actions[\'quickedit\'], $actions[\'edit\'], $actions[\'spam\'] );
return $actions;
}
我看不到
History
选项,可能它包含在某个插件(?)中。这是一个将其添加到
unset
列表
这些是
default actions in the core files:
$actions = array(
\'approve\' => \'\',
\'unapprove\' => \'\',
\'reply\' => \'\',
\'quickedit\' => \'\',
\'edit\' => \'\',
\'spam\' => \'\',
\'unspam\' => \'\',
\'trash\' => \'\',
\'untrash\' => \'\',
\'delete\' => \'\'
);