Skip to content

Instantly share code, notes, and snippets.

View rynoceris's full-sized avatar

Ryan Ours rynoceris

View GitHub Profile
@adamplabarge
adamplabarge / gf-acf-image-attachment-maker.php
Last active October 27, 2016 20:41
GF-ACF image attachment maker
<?php
//* the the default upload path to work in normal WP structure
add_filter("gform_upload_path", "change_upload_path", 20, 2);
function change_upload_path($path_info, $form_id){
$wp_upload_path = wp_upload_dir();
$path_info["path"] = $wp_upload_path['path'] . '/';
$path_info["url"] = $wp_upload_path['url'] . '/';
return $path_info;