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

Fix bug where options pages with a custom post_id weren't getting matched to their translated version #21

Merged
merged 4 commits into from
Nov 13, 2018

Conversation

legroomdwyer
Copy link
Contributor

I had an options created with this:

acf_add_options_page(array(
    'page_title' => 'Settings',
    'post_id' => 'appearance',
    'menu_slug' => 'nf-appearance-settings',
    'parent_slug' => 'themes.php',
    'capability' => 'manage_options',
));

but calling get_field('footer_columns', 'appearance') wouldn't match to the translated version, and in wp-admin the content was the same regardless of what Polylang language was selected.

Main changes:

  • fetch options page ids properly (function was returning their menu_slug's previously)
  • call get_field() when fetching the default "All languages" version so that repeaters and stuff are parsed properly

@MaximeCulea MaximeCulea self-assigned this Jun 27, 2018
@MaximeCulea
Copy link
Contributor

Hello @legroomdwyer, thx for the submission, I'll have a look soon back to my holidays.
Cheers.

@MaximeCulea
Copy link
Contributor

Hello @legroomdwyer,

Thank you for contacting us and for the PR.

It looks great, I am doing some tests before merging.

Thank you

@MaximeCulea MaximeCulea merged commit 4e76812 into BeAPI:master Nov 13, 2018
@MaximeCulea
Copy link
Contributor

Working with custom and default option id.

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

Successfully merging this pull request may close these issues.

2 participants