Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.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
Wordpress 管理\u[post\u type]\u posts\u自定义\u列不传递“$post\u id”`_Wordpress - Fatal编程技术网

Wordpress 管理\u[post\u type]\u posts\u自定义\u列不传递“$post\u id”`

Wordpress 管理\u[post\u type]\u posts\u自定义\u列不传递“$post\u id”`,wordpress,Wordpress,在Wordpress中,我得到以下错误: PHP致命错误:Uncaught argumentcounter错误:函数processar_colunas_tc_events()的参数太少,第289行传入了1个/var/www/html/wp includes/class-wp-hook.PHP,预期正好2个 。。。当我这样做时: add_action('manage_tc_events_posts_custom_column', 'processar_colunas_tc_events'); fu

在Wordpress中,我得到以下错误:

PHP致命错误:Uncaught argumentcounter错误:函数processar_colunas_tc_events()的参数太少,第289行传入了1个/var/www/html/wp includes/class-wp-hook.PHP,预期正好2个

。。。当我这样做时:

add_action('manage_tc_events_posts_custom_column', 'processar_colunas_tc_events');
function processar_colunas_tc_events($column, $post_id) { ... }

我做错什么了吗?

有关详细信息,请参阅Wordpress文档。函数中有四个参数。请注意,第四个参数是
accepted\u args
,它指定您的操作接受多少个参数。由于
接受的参数的默认值为1,但您的操作接受2个参数,因此需要将
接受的参数设置为2