acf/compatibility


目录

Description

Used to enable backwards compatibility support for changed functionality.

Support for each compatibility can be enabled by its own filter. Compatibilities are disabled by default and can be opted-in using the __return_true() function.

Changelog

Parameters

apply_filters( "acf/compatibility/{$name}", $enabled );

Compatibilities

The following table lists the available compatibilities which can be enabled.

Name Added Description
field_wrapper_class 5.2.0 Field class names changed in v5.2.0 from field_type-{$type} to acf-field-{$type}. This change was introduced to better optimise JS performance.

Example

This example demonstrates how to enable backwards-compatibility for field class names.

functions.php

add_filter('acf/compatibility/field_wrapper_class', '__return_true');

版本号 #1
由 壳壳虫 创建于 2026-08-29 23:44:03 UTC
由 壳壳虫 更新于 2026-08-29 23:44:03 UTC