Skip to content
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

Adds Options page support. - #66

Merged
jasonbahl merged 11 commits into
wp-graphql:masterfrom
kidunot89:feature/options-page-support
Oct 22, 2019
Merged

Adds Options page support.#66
jasonbahl merged 11 commits into
wp-graphql:masterfrom
kidunot89:feature/options-page-support

Conversation

@kidunot89

@kidunot89 kidunot89 commented Oct 5, 2019

Copy link
Copy Markdown
Collaborator

Adds options pages and there field groups to schema as a field on RootQuery.

TODO

  • Add Show In GraphQL setting to option pages
  • Make WPCS complaint

Issues closed

#9

@jasonbahl jasonbahl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tenatively approved. We still need tests.

@jasonbahl

Copy link
Copy Markdown
Contributor

@kidunot89 I just activated Travis for this repo. Going to close this PR and re-open it as I believe that will trigger Travis.

@jasonbahl jasonbahl closed this Oct 11, 2019
@jasonbahl jasonbahl reopened this Oct 11, 2019
@jasonbahl
jasonbahl merged commit 5b35a4a into wp-graphql:master Oct 22, 2019
@drewbaker

Copy link
Copy Markdown

Would love to know how to query for this? query {getOptionsPage {}}?

@nathobson

Copy link
Copy Markdown

Also struggling to see any options page data in the schema. I have the latest master branch of WPGraphWL ACF and the 0.4.0 release of WPGraphQL itself.

@lloan

lloan commented Nov 1, 2019

Copy link
Copy Markdown

Same as @nathobson - can't seem to find it. I also have the latest master branch of WPGraphQL ACF and the WPGraphQL 0.4.0+

@ghost

ghost commented Nov 6, 2019

Copy link
Copy Markdown

Hi Y'all

Just want to chime in here to let y'all know that options pages are working. You have to add show_in_graphql' => true to your acf_add_options_page().

Example => acf_add_options_page(array( 'page_title' => 'Site General Settings', 'menu_title' => 'Site Settings', 'menu_slug' => 'site-settings', 'capability' => 'edit_posts', 'position' => '20.5', 'redirect' => true, 'show_in_graphql' => true ));

Hope this helps!

@nathobson

Copy link
Copy Markdown

Doh. This makes so much sense and worked perfectly.

Thanks :)

@lloan

lloan commented Nov 6, 2019 via email

Copy link
Copy Markdown

@ghost

ghost commented Nov 6, 2019

Copy link
Copy Markdown

Wonderful. Thanks! For future reference, can this be found in other documentation? I must have missed it :( Get Outlook for Androidhttps://aka.ms/ghei36

________________________________ From: Nat Hobson notifications@github.com Sent: Wednesday, November 6, 2019 10:48:13 AM To: wp-graphql/wp-graphql-acf wp-graphql-acf@noreply.github.com Cc: lloan alas lloanalas@outlook.com; Comment comment@noreply.github.com Subject: Re: [wp-graphql/wp-graphql-acf] Adds Options page support. (#66) Doh. This makes so much sense and worked perfectly. Thanks :) — You are receiving this because you commented. Reply to this email directly, view it on GitHub<#66?email_source=notifications&email_token=AA56H7TA4WUIOPAX2O4QIULQSMGO3A5CNFSM4I5ZJWCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDHSWLQ#issuecomment-550447918>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA56H7QDYUUF5C3BC6UM23DQSMGO3ANCNFSM4I5ZJWCA.

It is not in the documentation yet, but have gotten confirmation it will be added soon.

@henrikwirth

Copy link
Copy Markdown
Collaborator

@lloan just added this to the docs here: wp-graphql/wp-graphql#1010

@jasonbahl jasonbahl mentioned this pull request Mar 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants