Last active
August 29, 2015 14:06
-
-
Save zachskaggs/39ab2faa931c5708dada to your computer and use it in GitHub Desktop.
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 Logged Out Hidden Form Error | |
Plugin URI: http://wpninjas.net | |
Description: This plugin adds an error message letting a user know they must log in to see forms with the "User must be logged in to see forms" option checked | |
Version: 1.0 | |
Author: WPN Zach | |
Author URI: http://zachskaggs.com | |
*/ | |
function nf_logged_out_display_msg( $form_id ) { | |
echo do_shortcode('[PUT_SHORTCODE_HERE]'); | |
} | |
add_action( 'ninja_forms_display_user_not_logged_in', 'nf_logged_out_display_msg', 10 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment