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 | |
function ninja_forms_credit_card_number_desc_change_func ( $string ) { | |
$string = 'change this'; | |
return $string; | |
} | |
function ninja_forms_credit_card_number_label_change_func ( $string ) { | |
$string = 'change this'; | |
return $string; |
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 | |
function example_group_open_wrap( $field_id, $data ) { | |
if( $data['class'] == 'class1' ) { | |
echo '<div class="my-fields-group">'; | |
} | |
} | |
add_action ( 'ninja_forms_display_before_field', 'example_group_open_wrap', 1, 2 ); | |
function example_group_close_wrap( $field_id, $data ) { | |
if( $data['class'] == 'class2' ) { |
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 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 ) { |
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
function customnf_success_msg( $content ) { | |
global $ninja_forms_processing; | |
if( ! isset( $ninja_forms_processing ) ) | |
return $content; | |
$success = ''; | |
if( $success = $ninja_forms_processing->get_all_success_msgs() ) { | |
foreach( $success AS $id => $msg ) { | |
$success .= $msg . '<br />'; |
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 | |
function nf_change_user_email_value( $email ) { | |
$original = array('checked','unchecked') | |
$replace = array('yes','no') | |
return str_replace( $original, $replace, $email ); | |
} | |
add_filter( 'ninja_forms_email_user_value', 'nf_change_user_email_value' ); |
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 | |
function nf_change_uploads_dir( $upload_dir ) { | |
global $ninja_forms_processing; | |
$upload_dir = '/my/directory/here'; | |
return $upload_dir; | |
} | |
add_filter( 'ninja_forms_uploads_dir', 'nf_change_uploads_dir' ); |
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 | |
function nf_change_admin_email_title( $title ) { | |
global $ninja_forms_processing; | |
if ( 1 == $ninja_forms_processing->get_form_ID() ) { | |
$title = 'Here is some stuff'; | |
} | |
return $title; | |
} | |
add_filter( 'nf_email_user_values_title', 'nf_change_admin_email_title' ); |
NewerOlder