Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何删除“;“快速编辑”;“中的选项”;注册“发布”meta;列表页_Php_Wordpress - Fatal编程技术网

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;
}
这对我来说很有效,跟你的核对一下