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.


  • Added in version 5.2.0


apply_filters( "acf/compatibility/{$name}", $enabled );
  • $enabled (bool) Whether of not backwards compatibility support is enabled. Defaults to false.


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.


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


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

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.