ninja_forms_inner_custom_box

Prints the box content.

Description

ninja_forms_inner_custom_box(); 

Usage

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

Defined (1)

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

/deprecated/includes/admin/post-metabox.php  
  1. function ninja_forms_inner_custom_box() { 
  2.  
  3. $post_id = ! empty( $_REQUEST['post'] ) ? absint( $_REQUEST['post'] ) : 0; 
  4.  
  5. // Use nonce for verification 
  6. wp_nonce_field( 'ninja_forms_append_form', 'nf_append_form' ); 
  7.  
  8. // The actual fields for data entry 
  9. ?> 
  10. <select id="ninja_form_select" name="ninja_form_select"> 
  11. <option value="0">-- <?php _e('None', 'ninja-forms');?></option> 
  12. <?php 
  13. $all_forms = ninja_forms_get_all_forms(); 
  14. $form_id = get_post_meta( $post_id, 'ninja_forms_form', true ); 
  15. foreach( $all_forms as $form ) { 
  16. $title = $form['data']['form_title']; 
  17. $id = $form['id']; 
  18. ?> 
  19. <option value="<?php echo esc_attr( $id );?>"<?php selected( $id, $form_id );?>> 
  20. <?php echo $title;?> 
  21. </option> 
  22. <?php 
  23. ?> 
  24. </select> 
  25. <?php