/deprecated/includes/fields/hr.php

  1. <?php if ( ! defined( 'ABSPATH' ) ) exit; 
  2. function ninja_forms_register_field_hr() { 
  3. $args = array( 
  4. 'name' => __( 'hr', 'ninja-forms' ),  
  5. 'sidebar' => 'layout_fields',  
  6. 'edit_function' => '',  
  7. 'display_function' => 'ninja_forms_field_hr_display',  
  8. 'group' => 'layout_elements',  
  9. 'display_label' => false,  
  10. 'display_wrap' => false,  
  11. 'edit_label' => false,  
  12. 'edit_label_pos' => false,  
  13. 'edit_req' => false,  
  14. 'edit_custom_class' => true,  
  15. 'edit_help' => false,  
  16. 'edit_meta' => false,  
  17. 'edit_conditional' => true,  
  18. 'process_field' => false,  
  19. ); 
  20.  
  21. ninja_forms_register_field('_hr', $args); 
  22.  
  23. add_action('init', 'ninja_forms_register_field_hr'); 
  24.  
  25. function ninja_forms_field_hr_display( $field_id, $data, $form_id = '' ) { 
  26. if( isset( $data['display_style'] ) ) { 
  27. $display_style = $data['display_style']; 
  28. }else{ 
  29. $display_style = ''; 
  30.  
  31. $field_class = ninja_forms_get_field_class( $field_id, $form_id ); 
  32. ?> 
  33. <hr class="<?php echo $field_class;?>" style="<?php echo $display_style;?>" id="ninja_forms_field_<?php echo $field_id;?>_div_wrap" rel="<?php echo $field_id;?>" /> 
  34. <?php 
  35.  
.