ACF remove_filter 不适用于所见即所得字段

ACF remove_filter not working for wysiwyg field

使用 ACF 并且有一个字段需要使用所见即所得字段。

我正在尝试使用 add_filter('acf_the_content') 对内容应用过滤器,但它不起作用。

接下来我尝试使用 remove_filter('acf_the_content', 'wpautop') 但这也没有任何作用。

任何帮助或指出正确的方向都会很好!

这是一个如何使用 acf_content 过滤器的工作示例。我可以确认这是在使用 Twenty Seventeen 主题并将过滤器放置在主题的 functions.php.

中工作

add_filter('acf_the_content', function($content){ // do some magic to $content // e.g. $content = strtoupper($content); return $content; }, 10, 1);

希望对您有所帮助!