wp-graphql / wp-graphql-acf

WPGraphQL for Advanced Custom Fields
https://wpgraphql.com/acf
626 stars 123 forks source link

Enable formatting for oembed field #320

Closed palmjack closed 11 months ago

palmjack commented 2 years ago

https://github.com/wp-graphql/wp-graphql-acf/blob/365951c16c4f3a9ccc63cfbf462f005005bf2949/src/class-config.php#L436

I think adding the code below would make more sense than returning just the value. This way it can return the entire iframe instead of just the link. If you use oembed_dataparse filter in your theme you can return the modified code that suits your css framework if ( 'oembed' === $acf_field['type'] ) { $format = true; }

TamirHen commented 1 year ago

Major upvote on this one @palmjack thanks for the easy solution!

jeffceriello commented 1 year ago

Does this work with subfields? It doesn't look like it does. have a field that shows correctly the