Php 如何删除“;“快速编辑”;“中的选项”;注册“发布”meta;列表页
我正在列表页面中自动使用Php 如何删除“;“快速编辑”;“中的选项”;注册“发布”meta;列表页,php,wordpress,Php,Wordpress,我正在列表页面中自动使用注册\发布\类型,这是四个操作编辑/快速编辑/垃圾/查看。我想从列表页面中删除“快速编辑”选项。我怎么能做到这一点 /*------------------------------------------------------------------------------------ remove quick edit for custom post type videos just to check if less mem consumption -----
注册\发布\类型
,这是四个操作编辑/快速编辑/垃圾/查看。我想从列表页面中删除“快速编辑”选项。我怎么能做到这一点
/*------------------------------------------------------------------------------------
remove quick edit for custom post type videos just to check if less mem consumption
------------------------------------------------------------------------------------*/
add_filter( 'post_row_actions', 'remove_row_actions', 10, 2 );
function remove_row_actions( $actions, $post )
{
global $current_screen;
if( $current_screen->post_type != 'videos' ) return $actions;
unset( $actions['edit'] );
unset( $actions['view'] );
unset( $actions['trash'] );
unset( $actions['inline hide-if-no-js'] );
//$actions['inline hide-if-no-js'] .= __( 'Quick Edit' );
return $actions;
}
这对我来说很有效,跟你的核对一下