Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPML compatibility? #6

Open
timostsauber opened this issue Feb 16, 2022 · 1 comment
Open

WPML compatibility? #6

timostsauber opened this issue Feb 16, 2022 · 1 comment

Comments

@timostsauber
Copy link

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

@domtra
Copy link
Member

domtra commented Feb 18, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants