Commit a55d7642 authored by Kevin Cristiano's avatar Kevin Cristiano 🌎

Rename plugin to cfc-fixes. Add filter to fix user:id magic tag

parent 689017ec
<?php
/*
Plugin Name: Fix Json Uploads
Version: 1.0
Plugin URI: https://gist.github.com/christianwach/edebf9cb3cf1b412fb835dff73f09357
Description: Fix json uploads
Author: Christian Wach
Author URI: https://haystack.co.uk
Plugin Name: CFC Fixes
Version: 1.0.1
Plugin URI: https://develop.tadpole.cc/plugins/cfc-fixes
Description: Fix json uploads, fix contact processor order
Author: Christian Wach and Andrei Mondoc
Author URI: https://develop.tadpole.cc/plugins/cfc-fixes
*/
......@@ -13,6 +13,7 @@ Author URI: https://haystack.co.uk
/**
* Populate file info for JSON files.
*
* @ source https://gist.github.com/christianwach/edebf9cb3cf1b412fb835dff73f09357
* @see https://core.trac.wordpress.org/ticket/45633
*
* @param array $info The existing file data array.
......@@ -54,3 +55,13 @@ function my_add_json_mime_types( $info, $file, $filename, $mimes, $real_mime ) {
// Add filter for the above.
add_filter( 'wp_check_filetype_and_ext', 'my_add_json_mime_types', 10, 5 );
// Fix for reordering of processors so {user:id} magic tag works
// https://chat.tadpole.cc/tadpole/pl/azq8ijrb43yfik6wpmwuproyay
add_filter( 'caldera_forms_get_form', function( $config ) {
remove_filter( 'caldera_forms_presave_form', [ caldera_forms_civicrm()->forms, 'reorder_contact_processors' ], 20 );
return $config;
} );
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment