fca_eoi_text_box_callback

The Mailchimp Forms by Optin Cat fca eoi text box callback function.

Description

fca_eoi_text_box_callback( $args ); 

Parameters (1)

0. $args
The args.

Usage

  1. if ( !function_exists( 'fca_eoi_text_box_callback' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'mailchimp-forms-by-optin-cat/includes/eoi-powerups.php'; 
  3.  
  4. // The args. 
  5. $args = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = fca_eoi_text_box_callback($args); 
  9.  

Defined (1)

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

/includes/eoi-powerups.php  
  1. function fca_eoi_text_box_callback( $args ) { 
  2.  
  3. $option_name = $args[0]; 
  4.  
  5. $placeholder = empty( $args[1] ) ? '' : $args[1]; 
  6.  
  7. $help_text = empty( $args[2] ) ? '' : $args[2]; 
  8.  
  9. $options = get_option( 'fca_eoi_settings' ); 
  10.  
  11. /***** SET TO DEFAULT IF THIS OPTION HAS NEVER BEEN SET *****/ 
  12.  
  13. if ( !isset ( $options[ $option_name ] ) ) { 
  14. $value = $options[ $option_name ] = ''; 
  15. }else { 
  16. $value = esc_textarea( $options[ $option_name ] ); 
  17.  
  18. $html = "<input type='text' class='fca_eoi_settings_text_input' id='fca_eoi_settings[$option_name]' name='fca_eoi_settings[$option_name]' value='$value' placeholder='$placeholder' />";  
  19.  
  20. $html .= "<p class='fca_eoi_help_text'>$help_text</p>"; 
  21.  
  22. echo $html;