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 string translation hooks #1761

Closed
srdjan-jcc opened this issue Jul 10, 2018 · 6 comments
Closed

WPML string translation hooks #1761

srdjan-jcc opened this issue Jul 10, 2018 · 6 comments
Assignees
Milestone

Comments

@srdjan-jcc
Copy link
Contributor

Translations for Home Page Title and Home Page Description fields are not applied.
AIOSEOP is calling get_options() too early and translations are not applied.

When home page is loaded, get_options() hook is only once called from file/line
all-in-one-seo-pack-pro/all_in_one_seo_pack.php :126

If aioseop_get_options() is called on 'init' hook - translations are applied.

To Reproduce

  1. Edit Home Page Title and Home Page Description fields
  2. Translate Home Page Title and Home Page Description fields using WPML String Translation
  3. Visit home page in other language
  4. Translations are not applied

Expected behavior
Translations are applied to Home Page Title and Home Page Description fields.

@michaeltorbert
Copy link
Contributor

Thanks for the report. Feel free to submit a PR if you like.

@srdjan-jcc
Copy link
Contributor Author

@michaeltorbert I have no exact suggestions for changing initialization.
Here is snippet that fixes issue:
https://gist.github.com/srdjan-jcc/e4352428f1c7cc4271b7aef52aeeb0af

Tested and looks it has no (bad) impact on other code.
Would be good to perform your tests too.

Do you think it can be added like that somewhere in AIOSEOP?

@michaeltorbert
Copy link
Contributor

Do you think it can be added like that somewhere in AIOSEOP?

@srdjan-jcc Sure, but as we have hundreds of issues, we have to prioritize, so submitting a PR is the quickest way to get it included.

@srdjan-jcc
Copy link
Contributor Author

@michaeltorbert Created PR here #1876

Please make sure fix is also applied to PRO version, thank you!

@michaeltorbert michaeltorbert added this to the 2.8 milestone Sep 3, 2018
@michaeltorbert
Copy link
Contributor

When testing, make sure to first verify the problem, and that the linked PR fixes it.

@arnaudbroes arnaudbroes self-assigned this Sep 7, 2018
@wpsmort wpsmort modified the milestones: 2.8, 2.9 Sep 7, 2018
@arnaudbroes
Copy link
Contributor

arnaudbroes commented Sep 7, 2018

@wpsmort this has first verified and then tested. Works fine. @michaeltorbert needs code review.

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

4 participants