gde_profile_text

The Google Doc Embedder gde profile text function.

Description

gde_profile_text( $option, $field, (string) $class = '', (string) $size = '', (bool) $enabled = true ); 

Parameters (5)

0. $option
The option.
1. $field
The field.
2. $class — Optional. (string) => ''
The class.
3. $size — Optional. (string) => ''
The size.
4. $enabled — Optional. (bool) => true
The enabled.

Usage

  1. if ( !function_exists( 'gde_profile_text' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-doc-embedder/options.php'; 
  3.  
  4. // The option. 
  5. $option = null; 
  6.  
  7. // The field. 
  8. $field = null; 
  9.  
  10. // The class. 
  11. $class = ''; 
  12.  
  13. // The size. 
  14. $size = ''; 
  15.  
  16. // The enabled. 
  17. $enabled = true; 
  18.  
  19. // NOTICE! Understand what this does before running. 
  20. $result = gde_profile_text($option, $field, $class, $size, $enabled); 
  21.  

Defined (1)

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

/options.php  
  1. function gde_profile_text( $option, $field, $class = '', $size = '', $enabled = true ) { 
  2. echo '<input type="text" id="'.esc_attr($field).'" name="'.esc_attr($field).'" value="'.esc_attr($option).'"'; 
  3. if ( ! empty( $class ) ) { 
  4. echo ' class="'.esc_attr($class).'"'; 
  5. if ( ! empty( $size ) ) { 
  6. echo ' size="'.esc_attr($size).'"'; 
  7. if ( $enabled === false ) { 
  8. echo ' disabled="disabled"'; 
  9. echo ' style="color:#aaa;background-color:#eee;"'; 
  10. echo ">";