Wordpress 管理\u[post\u type]\u posts\u自定义\u列不传递“$post\u id”`
在Wordpress中,我得到以下错误: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
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