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 options page #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix options page #93

wants to merge 1 commit into from

Conversation

PSMJonas
Copy link

The output of the content based on the selected language did not work because the type attribute was not present:

$type = $source['type'] ?? null;
return $type === 'options_page';

$type is always null.

@geck1942
Copy link

This DOES fix the issue! Nice call.-
Beware in the commit, you've removed is_options_page but it is still called line 150

@Aku-benj
Copy link

Aku-benj commented Sep 23, 2024

The resolver is executed on all queries, maybe we could keep the function is_options_page and compare the class of the 'node' attribute ?

Something like :

$type = $source['type'] ?? null;
$class_name = isset($source['node']) ? get_class($source['node']) : null;
return $type === 'options_page' || $class_name == \WPGraphQL\Acf\Model\AcfOptionsPage::class;

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

Successfully merging this pull request may close these issues.

3 participants