Fix options page
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.
This DOES fix the issue! Nice call.-
Beware in the commit, you've removed is_options_page but it is still called line 150
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;
I've just checked the snippet above, it seems to work indeed. However, I am not familiar enough with the plugin to implement this and understand the consequences. Can someone with more experience verify this and merge this so the issue can be solved?
Can this fix be implemented please? So we can stop using a mirror plugin with just this fix :)