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

metabox settings pages #26

Open
wkoehn opened this issue Jun 4, 2020 · 4 comments
Open

metabox settings pages #26

wkoehn opened this issue Jun 4, 2020 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@wkoehn
Copy link

wkoehn commented Jun 4, 2020

Have you looked into supporting metabox settings pages at all? I'm just getting started with wp-graphql, and I see that settings registered via register_settings() are natively supported, but I'm not quite sure where to get started if I would want some of my metabox.io created settings pages registered for graphql?

@hsimah hsimah added enhancement New feature or request help wanted Extra attention is needed labels Jun 4, 2020
@hsimah
Copy link
Member

hsimah commented Jun 4, 2020

I've never used custom settings, so right now - no. But I would like this plugin to be fully featured, so this is definitely something I want to implement.

Documentation for accessing settings.

Looks like you just need to pass in a type to rwmb_meta. It shouldn't be too hard.

@hsimah
Copy link
Member

hsimah commented Jun 4, 2020

What I have found with MB is that any additional configuration parameters you give to their registration settings get pushed through, so you can use them in a graphql registration hook.

  • Readshow_in_graphql and graphql_name from configuration (see existing code for this).
  • Should settings be valid, register the settings field.
  • Optional resolve complex settings types (there's a list in the docs linked above).

@wkoehn
Copy link
Author

wkoehn commented Jun 4, 2020

Otherwise looks like my other option is just to get the options manually as described here: https://wp-graphql.slack.com/archives/C3NM1M291/p1588969342475700

@wkoehn
Copy link
Author

wkoehn commented Jun 4, 2020

Thanks for the response, I'll keep digging into this and let you know if I find anything interesting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants