nf_edit_sub_username

The Ninja Forms nf edit sub username hook.

Description

apply_filters( 'nf_edit_sub_username', (string) $sub_get_user_data_user_nicename, (unknown) $post_post_author ); 

Parameters (2)

0. $sub_get_user_data_user_nicename (string)
The sub get user data user nicename.
1. $post_post_author (unknown)
The post post author.

Usage

To run the hook, copy the example below.
  1. $sub_get_user_data_user_nicename = apply_filters( 'nf_edit_sub_username', $sub_get_user_data_user_nicename, $post_post_author ); 
  2.  
  3. if ( !empty( $sub_get_user_data_user_nicename ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the nf_edit_sub_username callback 
  2. function filter_nf_edit_sub_username( $sub_get_user_data_user_nicename, $post_post_author ) { 
  3. // make filter magic happen here... 
  4. return $sub_get_user_data_user_nicename
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'nf_edit_sub_username', 'filter_nf_edit_sub_username', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'nf_edit_sub_username', 'filter_nf_edit_sub_username', 10, 2 ); 

Defined (2)

The filter is defined in the following location(s).

/includes/Admin/CPT/Submission.php  
  1. $user = apply_filters( 'nf_edit_sub_username', $sub->get_user()->data->user_nicename, $post->post_author ); 
/deprecated/classes/subs-cpt.php  
  1. $name = apply_filters( 'nf_edit_sub_username', $name, $post->post_author );