wp-graphql / wp-graphql

:rocket: GraphQL API for WordPress

Home Page:https://www.wpgraphql.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add WordPress new `Site Icon` feature to generalSettings.

izzygld opened this issue · comments

What problem does this address?

Would love to have the siteIconUrl built in to the generalSettings

Screenshot 2024-04-11 at 16 17 15

What is your proposed solution?

'siteIconUrl'  => get_site_icon_url(),

function register_site_icon_url() {
    $args = [
      'type' => 'MediaItem',
    ];
    register_setting( 'group_settings', 'site_icon_url', $args );
}

add_action( 'init', 'register_site_icon_url' );

What alternatives have you considered?

No response

Additional Context

Happy to open a PR - just show me where the general settings is stored.

Hey @izzygld

The reason you can't find it is that it doesn't exist 🙈, or rather that WPGraphQL currently only autoregisters settings that have a defined schema.

You can see some prior art in #661 , but work on this will probably be blocked until we ship the Experiments API (#3098 ) as part of the upcoming v2.0 release (#3081 )

thank you @justlevine.

Ok. keep us posted,

Happy to help out if needed.