This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!defined('ABSPATH')) { | |
exit; | |
} | |
add_filter('wpgraphql_acf_supported_fields', function ($supported_fields) { | |
$supported_fields[] = 'forms'; | |
return $supported_fields; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'register_post_type_args', function( $args, $post_type ) { | |
if ( 'sfwd-courses' === $post_type ) { | |
$args['show_in_graphql'] = true; | |
$args['graphql_single_name'] = 'course'; | |
$args['graphql_plural_name'] = 'courses'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PropTypes from 'prop-types' | |
import React from 'react' | |
import Fieldset from 'part:@sanity/components/fieldsets/default' | |
import {setIfMissing} from 'part:@sanity/form-builder/patch-event' | |
// FormBuilderInput automatically generates fields from a schema | |
import {FormBuilderInput} from 'part:@sanity/form-builder' | |
// a Higher Order Component that passes document values as props | |
import {withDocument} from 'part:@sanity/form-builder' | |
class confitionalFields extends React.PureComponent { | |
static propTypes = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.sexy-box-shadow { | |
box-shadow: 0 50px 100px rgba(50,50,93,.1), 0 15px 35px rgba(50,50,93,.15), 0 5px 15px rgba(0,0,0,.1); | |
} |