ninja_forms_from_restriction_settings

The Ninja Forms ninja forms from restriction settings hook.

Description

apply_filters( 'ninja_forms_from_restriction_settings', (callback) $var ); 

Parameters (1)

0. $var — Optional. (callback) => array('logged-in-set' => array( 'name' => 'logged-in-set', 'type' => 'fieldset', 'label' => __( 'Logged In', 'ninja-forms' ), 'width' => 'full', 'group' => 'primary', 'settings' => array('logged_in' => array( 'name' => 'logged_in', 'type' => 'toggle', 'label' => __( 'Require user to be logged in to view form?', 'ninja-forms' ), 'width' => 'one-half', 'group' => 'primary', 'value' => FALSE, 'help' => __( 'Does apply to form preview.', 'ninja-forms' ) ),'not_logged_in_msg' => array( 'name' => 'not_logged_in_msg', 'type' => 'rte', 'label' => __( 'Not Logged-In Message', 'ninja-forms' ), 'width' => 'full', 'group' => 'primary', 'value' => '', ), ) ),'limit-submissions-set' => array( 'name' => 'limit-submissions-set', 'type' => 'fieldset', 'label' => __( 'Limit Submissions', 'ninja-forms' ), 'width' => 'full', 'group' => 'primary', 'settings' => array('sub_limit_number' => array( 'name' => 'sub_limit_number', 'type' => 'number', 'label' => __( 'Submission Limit', 'ninja-forms' ), 'width' => 'one-third', 'group' => 'primary', 'value' => NULL, 'help' => __( 'Does NOT apply to form preview.', 'ninja-forms' )),'sub_limit_msg' => array( 'name' => 'sub_limit_msg', 'type' => 'rte', 'label' => __( 'Limit Reached Message', 'ninja-forms' ), 'width' => 'full', 'group' => 'primary', 'value' => __( 'The Form has reached it\'s submission limit.', 'ninja-forms' )), ) ),)
The array.

Usage

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

Defined (1)

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

/includes/Config/FormRestrictionSettings.php  
  1. return apply_filters( 'ninja_forms_from_restriction_settings', array(