ninja_forms_append_to_page

The Ninja Forms ninja forms append to page function.

Description

ninja_forms_append_to_page( $content ); 

Parameters (1)

0. $content
The content.

Usage

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

Defined (1)

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

/deprecated/includes/display/form/display-form.php  
  1. function ninja_forms_append_to_page($content) { 
  2. global $ninja_forms_append_page_form_id; 
  3.  
  4. if( !is_admin() && is_main_query() && ( is_page() OR is_single() ) ) { 
  5. $form = ''; 
  6. if(is_array($ninja_forms_append_page_form_id) && !empty($ninja_forms_append_page_form_id)) { 
  7. foreach($ninja_forms_append_page_form_id as $form_id) { 
  8. $form .= ninja_forms_return_echo('ninja_forms_display_form', $form_id); 
  9. }else{ 
  10. $form = ninja_forms_return_echo('ninja_forms_display_form', $ninja_forms_append_page_form_id); 
  11. $content .= $form; 
  12. return $content;