epm_radio_callback

Radio Callback.

Description

epm_radio_callback( $args ); 

Parameters (1)

0. $args
The args.

Usage

  1. if ( !function_exists( 'epm_radio_callback' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'easy-peasy-mailchimp-ajax-form/includes/admin/settings/register-settings.php'; 
  3.  
  4. // The args. 
  5. $args = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = epm_radio_callback($args); 
  9.  

Defined (1)

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

/includes/admin/settings/register-settings.php  
  1. function epm_radio_callback( $args ) { 
  2. global $epm_options; 
  3.  
  4. foreach ( $args['options'] as $key => $option ) : 
  5. $checked = false; 
  6.  
  7. if ( isset( $epm_options[ $args['id'] ] ) && $epm_options[ $args['id'] ] == $key ) 
  8. $checked = true; 
  9. elseif( isset( $args['std'] ) && $args['std'] == $key && ! isset( $epm_options[ $args['id'] ] ) ) 
  10. $checked = true; 
  11.  
  12. echo '<input name="epm_settings[' . $args['id'] . ']"" id="epm_settings[' . $args['id'] . '][' . $key . ']" type="radio" value="' . $key . '" ' . checked(true, $checked, false) . '/> '; 
  13. echo '<label for="epm_settings[' . $args['id'] . '][' . $key . ']">' . $option . '</label><br/>'; 
  14. endforeach; 
  15.  
  16. echo '<p class="description">' . $args['desc'] . '</p>';