ninja_forms_register_sidebar_post_fields

The Ninja Forms ninja forms register sidebar post fields function.

Description

ninja_forms_register_sidebar_post_fields(); 

Usage

  1. if ( !function_exists( 'ninja_forms_register_sidebar_post_fields' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/admin/pages/ninja-forms/tabs/field-settings/sidebars/post-fields.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = ninja_forms_register_sidebar_post_fields(); 
  7.  

Defined (1)

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

/deprecated/includes/admin/pages/ninja-forms/tabs/field-settings/sidebars/post-fields.php  
  1. function ninja_forms_register_sidebar_post_fields() { 
  2. $add_field = apply_filters( 'ninja_forms_use_post_fields', false ); 
  3. if ( !$add_field ) 
  4. return false; 
  5.  
  6. if(isset($_REQUEST['form_id'])) { 
  7. $form_id = absint( $_REQUEST['form_id'] ); 
  8. }else{ 
  9. $form_id = ''; 
  10. if( function_exists( 'ninja_forms_get_current_tab' ) ) { 
  11. $current_tab = ninja_forms_get_current_tab(); 
  12. if($form_id != '' AND $current_tab == 'fields') { 
  13. $form_row = ninja_forms_get_form_by_id($form_id); 
  14. if(is_array($form_row) AND !empty($form_row)) { 
  15. $form_data = $form_row['data']; 
  16. if( isset( $form_data['create_post'] ) ) { 
  17. $create_post = $form_data['create_post']; 
  18. }else{ 
  19. $create_post = ''; 
  20.  
  21. }else{ 
  22. $create_post = ''; 
  23. }else{ 
  24. $create_post = ''; 
  25. $args = array( 
  26. 'name' => 'Post Creation Fields',  
  27. 'page' => 'ninja-forms',  
  28. 'tab' => 'builder',  
  29. 'display_function' => 'ninja_forms_sidebar_display_fields
  30. ); 
  31. if($create_post == 1) { 
  32. if( function_exists( 'ninja_forms_register_sidebar' ) ) { 
  33. ninja_forms_register_sidebar('post_fields', $args);