/deprecated/includes/display/form/form-wrap.php

  1. <?php if ( ! defined( 'ABSPATH' ) ) exit; 
  2. /** 
  3. * Outputs the HTML of the form wrap. 
  4. * 
  5. **/ 
  6. add_action('init', 'ninja_forms_register_display_open_form_wrap'); 
  7. function ninja_forms_register_display_open_form_wrap() { 
  8. add_action('ninja_forms_display_open_form_wrap', 'ninja_forms_display_open_form_wrap'); 
  9.  
  10. function ninja_forms_display_open_form_wrap($form_id) { 
  11. global $ninja_forms_processing; 
  12. //Check to see if the form_id has been sent. 
  13. if($form_id == '') { 
  14. if(isset($_REQUEST['form_id'])) { //If it hasn't, set it to our requested form_id. Sometimes this function can be called without an expressly passed form_id. 
  15. $form_id = absint( $_REQUEST['form_id'] ); 
  16.  
  17. $wrap_class = ''; 
  18.  
  19. $wrap_class = apply_filters( 'ninja_forms_form_wrap_class', $wrap_class, $form_id ); 
  20.  
  21. ?> 
  22. <div id="ninja_forms_form_<?php echo $form_id;?>_wrap" class="ninja-forms-form-wrap<?php echo $wrap_class; ?>"> 
  23. <?php 
  24.  
  25. add_action('ninja_forms_display_close_form_wrap', 'ninja_forms_display_close_form_wrap'); 
  26. function ninja_forms_display_close_form_wrap($form_id) { 
  27. ?> 
  28. </div> 
  29. <?php 
.