monsterinsights_render_field

The Google Analytics for WordPress by MonsterInsights monsterinsights render field function.

Description

monsterinsights_render_field( $args ); 

Parameters (1)

0. $args
The args.

Usage

  1. if ( !function_exists( 'monsterinsights_render_field' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-analytics-for-wordpress-by-monsterinsights/includes/admin/settings/settings-api.php'; 
  3.  
  4. // The args. 
  5. $args = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = monsterinsights_render_field($args); 
  9.  

Defined (1)

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

/includes/admin/settings/settings-api.php  
  1. function monsterinsights_render_field( $args ) { 
  2. $output = ''; 
  3. $output .='<tr id="monsterinsights-input-' . monsterinsights_sanitize_key( $args['id'] ) .'">'; 
  4. if ( ! empty( $args['name'] ) ) { 
  5. $output .= '<th scope="row">'; 
  6. $output .='<label for="monsterinsights_settings[' . monsterinsights_sanitize_key( $args['id'] ) . ']">' . esc_html( $args["name"] ) . '</label>'; 
  7. $output .= '</th>'; 
  8. $output .= '<td>'; 
  9. $render = ! empty( $args['type'] ) && function_exists( 'monsterinsights_' . $args['type'] . '_callback' ) ? 'monsterinsights_' . $args['type'] . '_callback' : 'monsterinsights_missing_callback'; 
  10. $output .= call_user_func( $render, $args ); 
  11. $output .= '</td>'; 
  12. $output .= '</tr>'; 
  13. return $output;