Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix master linking for localized posts #13

Open
villesiltala opened this issue Mar 22, 2019 · 0 comments
Open

Fix master linking for localized posts #13

villesiltala opened this issue Mar 22, 2019 · 0 comments

Comments

@villesiltala
Copy link

The documentation describes master linking with the following specifications:

  • i18n (object) (Optional) Custom localization information is stored in the property. It must contain an object with the following properties:
    • locale (string) (Required) The language code string, for example fi.
    • master (string|object) (Required) A gi_id value to be used to fetch a default language post or an array containing a query_key value. This is used to link the post as a translation.

It seems that the current version only supports the array type as the "master" property. The validation does not allow passing a value other than an array with a "query_key" key. See:
https://github.com/devgeniem/wp-geniem-importer/blob/master/src/Post.php#L593

Fix this by allowing a direct id value to be set as the value of "master".

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

No branches or pull requests

1 participant