Thread Starter
xinple
(@xinple)
已找到原因:
/wpjam-basic/extends/wpjam-toc.php 文件中
将:
$object = wpjam_get_instance('toc', $post_id, fn()=> new WPJAM_Toc($content, $depth));
改为:
$object = wpjam_get_instance('toc', $post_id, function() use (&$content, $depth) {
return new WPJAM_Toc($content, $depth);
});
原因是闭包导致 $content 未被修改。