Last active
April 2, 2016 09:30
-
-
Save polevaultweb/8d13b178d1fea22bd83c7e7d9ed97376 to your computer and use it in GitHub Desktop.
WordPress Plugin to change Ninja Forms File Upload directory
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 | |
/** | |
* Plugin Name: Ninja Forms File Uploads Directory Tweak | |
* Plugin URI: http://polevaultweb.com | |
* Description: Tweaks plugin | |
* Version: 1.0 | |
* Author: polevaultweb | |
* Author URI: http://polevaultweb.com | |
*/ | |
add_filter( 'ninja_forms_uploads_dir', 'nf_fu_dir_ninja_forms_uploads_dir' ); | |
function nf_fu_dir_ninja_forms_uploads_dir( $dir ) { | |
$dir = str_replace( 'uploads/ninja-forms', 'plugins/s2member-files', $dir ); | |
return $dir; | |
} | |
add_filter( 'ninja_forms_uploads_url', 'nf_fu_dir_ninja_forms_uploads_url' ); | |
function nf_fu_dir_ninja_forms_uploads_url( $dir ) { | |
$dir = str_replace( 'uploads/ninja-forms', 'plugins/s2member-files', $dir ); | |
return $dir; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment