Skip to content

Instantly share code, notes, and snippets.

View CesarBenavides777's full-sized avatar
🚀
To the moon

Cesar Benavides CesarBenavides777

🚀
To the moon
View GitHub Profile
@marek-miotelka
marek-miotelka / gravityform-wpgraphql-acf-support.php
Created October 8, 2022 08:58
Support for Gravity Forms ACF Field in WPGraphQL
<?php
if (!defined('ABSPATH')) {
exit;
}
add_filter('wpgraphql_acf_supported_fields', function ($supported_fields) {
$supported_fields[] = 'forms';
return $supported_fields;
@izzygld
izzygld / learndash-graphql.php
Created August 17, 2020 14:34
Replace REST API with @wpgraphql with @apollographql client.
<?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';
}
@kmelve
kmelve / confitionalFields.js
Created February 7, 2020 06:13
Tim’s conditional fields for Sanity.io
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 = {
@moladukes
moladukes / shadow.scss
Created February 8, 2018 19:13
Sexy Box Shadow
.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);
}