<?php
/**
* Gravity Perks // Media Library // Set Upload Directory
* http://gravitywiz.com/documentation/gravity-forms-media-library/
*/
add_filter( 'gpml_media_data', function( $return ) {
add_filter( 'upload_dir', 'gpml_set_upload_dir' );
if( ! function_exists( 'gpml_set_upload_dir' ) ) {
function gpml_set_upload_dir( $upload_dir ) {
$upload_dir['path'] = ABSPATH . 'wp-content/uploads/paramountregistry';
$upload_dir['url'] = get_option( 'site_url' ) . '/wp-content/uploads/paramountregistry';
remove_filter( 'upload_dir', 'gpml_set_upload_dir' );
return $upload_dir;
};
}
return $return;
} );