acf-hide-layout icon indicating copy to clipboard operation
acf-hide-layout copied to clipboard

WPML compatibility?

Open timostsauber opened this issue 4 years ago • 1 comments

By default it looks like this is set to copy in the WPML Custom Fields Translation settings.

If we wanted to change it to Copy Once, any suggestions on how best to do this globally?

The only way I could see to achieve it was via the Custom Fields Translation settings (See attached), but this is only useful for existing or created posts. It would be nice to set it globally if possible via code?

Thanks for an awesome plugin!!

wpml

timostsauber avatar Feb 16 '22 20:02 timostsauber

Hi @timostsauber , have you tried using the wpml-config.xml file for that. It could be that something like this works:

<wpml-config>
  <custom-fields>
    <custom-field action="copy-once">*_acf_hide_layout</custom-field>
  </custom-fields>
</wpml-config>

It might be, however, that the wildcard syntax only works in attributes. But I am not 100% sure.

The thing is that the acf_hide_value is a meta value but no real ACF field. This is why hooking into ACF fields definition will not work. And I am not really sure how to programatically handle the translation settings for regular meta fields.

Let me know if this works.

domtra avatar Feb 18 '22 12:02 domtra