nf_sub_limit_display_filter

Function that filters the display variable and returns false if sub limit has been reached.

Description

(string) nf_sub_limit_display_filter( (bool) $display, (string) $form_id ); 

Returns (string)

$display

Parameters (2)

0. $display (bool)
The display.
1. $form_id (string)
The form id.

Usage

  1. if ( !function_exists( 'nf_sub_limit_display_filter' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/display/form/sub-limit.php'; 
  3.  
  4. // The display. 
  5. $display = true; 
  6.  
  7. // The form id. 
  8. $form_id = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = nf_sub_limit_display_filter($display, $form_id); 
  12.  

Defined (1)

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

/deprecated/includes/display/form/sub-limit.php  
  1. function nf_sub_limit_display_filter( $display, $form_id ) { 
  2. global $ninja_forms_loading; 
  3.  
  4. if ( ! isset( $ninja_forms_loading ) ) 
  5. return $display; 
  6.  
  7. if ( $ninja_forms_loading->get_form_setting( 'sub_limit_reached' ) ) { 
  8. $display = 0; 
  9. return $display;