Created
August 6, 2015 16:26
-
-
Save kjohnson/7bac9077356d96fc91c5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 - Webhooks Auth Headers | |
*/ | |
add_filter( 'nf_remote_post_args', 'nf_wh_add_auth' ); | |
function nf_wh_add_auth( $args ){ | |
$headers = array( | |
'headers' => array( | |
'Authorization' => 'Basic ' . base64_encode( YOUR_USERNAME . ':' . YOUR_PASSWORD ) | |
) | |
); | |
$args = array_merge( $args, $headers ); | |
return $args; | |
} |
Looks like it isn't valid for NF3. I am also looking for the ability of adding header parameters.
thanks.
/chris
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello KJohnson,
i'd like to extend my nf wh addon with the ability of adding one or more header paratmeters. Is that code above still valid for nf 3?
also i have some other suggestions of extending the wh addon.
Erich