nf_sub_limit_display_msg

Function that echoes the sub limit reached message if necessary.

Description

nf_sub_limit_display_msg( (string) $form_id ); 

Parameters (1)

0. $form_id (string)
The form id.

Usage

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

Defined (1)

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

/deprecated/includes/display/form/sub-limit.php  
  1. function nf_sub_limit_display_msg( $form_id ) { 
  2. global $ninja_forms_loading; 
  3.  
  4. if ( ! isset( $ninja_forms_loading ) ) 
  5. return false; 
  6.  
  7. if ( $ninja_forms_loading->get_form_setting( 'sub_limit_reached' ) ) { 
  8. $msg = $ninja_forms_loading->get_form_setting( 'sub_limit_msg' ); 
  9. $msg = wpautop( $msg ); 
  10. $msg = do_shortcode( $msg ); 
  11. $msg = '<div class="sub-limit-reached-msg">' . $msg . '</div>'; 
  12. $msg = apply_filters( 'nf_sub_limit_reached_msg', $msg, $form_id ); 
  13. echo $msg; 
  14.