This file contains 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
add_filter( | |
'wpgraphql_acf_register_graphql_field', | |
function ($field_config, $type_name, $field_name, $config) { | |
if (isset($config['acf_field']['type']) && 'forms' === $config['acf_field']['type']) { | |
$field_config['type'] = 'GravityFormsForm'; | |
$field_config['resolve'] = function ($root, $args, $context, $info) { | |
$formRaw = GFAPI::get_form($root['field_5f90411866d06']); // ACF gravity form field ID here | |
$fieldManipulator = new WPGraphQLGravityForms\DataManipulators\FieldsDataManipulator($formRaw['fields']); | |
$formManipulator = new WPGraphQLGravityForms\DataManipulators\FormDataManipulator($fieldManipulator); | |
$formattedData = $formManipulator->manipulate($formRaw); |
This file contains 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
#CHRISTIAN DUBUCHE | |
####[email protected] | bit.ly/cdubuche | github.com/ChrisDubuche | 516.967.9472 | |
###SUMMARY | |
Software developer, possessing the skills, passion, and creativity to building scalable solutions to complex problems. I am intuitive and resourceful, with the interpersonal skills to collaborate and communicate with both technical and non-technical audiences. | |
###DEVELOPMENT EXPERIENCE |
This file contains 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( "gravityflow_user_field", "gflow_request_manager", 10, 3 ); | |
function gflow_request_manager( $choices, $form_id, $field ) { | |
if ( $form_id == 1 && $field->id == 15 ) { | |
$manager = get_user_by('email', get_user_meta(get_current_user_id(), "manager_email", true) ); | |
if( false !== $manager ) { | |
$choices = array( | |
array('value' => $manager->ID, 'text' => $manager->first_name . ' ' . $manager->last_name) |
This file contains 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
// Parse parameters in URL | |
$.urlParam = function(name){ | |
var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href); | |
var checkNull = results == null ? '' : results[1] || 0; | |
return checkNull; | |
} | |
// Create hidden input elems and add them to form | |
function addFormElem(paramName, fieldName) { |
This file contains 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 | |
/** | |
* Get the page/post IDs or taxonomy term IDs for restricted content | |
* for chosen WooCommerce Memberships levels which have been assigned to a post or page. | |
* | |
* @param string $content_type | accepts either 'taxonomy' or 'post_type' object keys | |
* @param int $post_id The ID of the post or page | |
* @return array post/pageID's or taxonomy term ID's | |
*/ | |
function wc_get_membership_term_ids( $content_type, $post_id ) { |