ninja_forms_page_append_check

The Ninja Forms ninja forms page append check function.

Description

ninja_forms_page_append_check(); 

Usage

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

Defined (1)

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

/deprecated/includes/display/form/display-form.php  
  1. function ninja_forms_page_append_check() { 
  2. global $post, $ninja_forms_append_page_form_id; 
  3.  
  4. if ( ! empty ( $_REQUEST['preview'] ) && ! empty ( $_REQUEST['preview'] ) ) { 
  5. if(is_array($ninja_forms_append_page_form_id)) { 
  6. unset($ninja_forms_append_page_form_id); 
  7.  
  8. if(!isset($ninja_forms_append_page_form_id)) { 
  9. $ninja_forms_append_page_form_id = array(); 
  10.  
  11. if ( $post ) { 
  12. $form_ids = ninja_forms_get_form_ids_by_post_id($post->ID); 
  13. if(is_array($form_ids) AND !empty($form_ids)) { 
  14. foreach($form_ids as $form_id) { 
  15. $ninja_forms_append_page_form_id[] = $form_id; 
  16. //remove_filter('the_content', 'wpautop'); 
  17. add_filter( 'the_content', 'ninja_forms_append_to_page', 9999 ); 
  18. }