ninja_forms_register_field_rating

The Ninja Forms ninja forms register field rating function.

Description

ninja_forms_register_field_rating(); 

Usage

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

Defined (1)

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

/deprecated/includes/fields/rating.php  
  1. function ninja_forms_register_field_rating() { 
  2. $args = array( 
  3. 'name' => __( 'Star Rating', 'ninja-forms' ),  
  4. 'sidebar' => 'template_fields',  
  5. 'display_function' => 'ninja_forms_field_rating_display',  
  6. 'pre_process' => 'ninja_forms_field_rating_pre_process',  
  7. 'group' => 'standard_fields',  
  8. 'edit_options' => array( 
  9. array( 
  10. 'name' => 'rating_stars',  
  11. 'type' => 'text',  
  12. 'label' => __( 'Number of stars', 'ninja-forms' ),  
  13. 'width' => 'thin',  
  14. 'default' => 5,  
  15. ),  
  16. ),  
  17. 'edit_label' => true,  
  18. 'edit_label_pos' => true,  
  19. 'edit_req' => true,  
  20. 'edit_custom_class' => true,  
  21. 'edit_help' => true,  
  22. 'edit_meta' => true,  
  23. 'edit_conditional' => true,  
  24. ); 
  25.  
  26. ninja_forms_register_field('_rating', $args);