gl_field_text

The Google Locker for WordPress gl field text function.

Description

gl_field_text( $settings_values, $settings_key, $key, (constant) $isColor = false, (constant) $short_desc = null, (constant) $desc = null ); 

Parameters (6)

0. $settings_values
The settings values.
1. $settings_key
The settings key.
2. $key
The key.
3. $iscolor — Optional. (constant) => false
The isColor.
4. $short_desc — Optional. (constant) => null
The short desc.
5. $desc — Optional. (constant) => null
The desc.

Usage

  1. if ( !function_exists( 'gl_field_text' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-locker-for-wordpress/admin/pages.php'; 
  3.  
  4. // The settings values. 
  5. $settings_values = null; 
  6.  
  7. // The settings key. 
  8. $settings_key = null; 
  9.  
  10. // The key. 
  11. $key = null; 
  12.  
  13. // The isColor. 
  14. $iscolor = false; 
  15.  
  16. // The short desc. 
  17. $short_desc = null; 
  18.  
  19. // The desc. 
  20. $desc = null; 
  21.  
  22. // NOTICE! Understand what this does before running. 
  23. $result = gl_field_text($settings_values, $settings_key, $key, $iscolor, $short_desc, $desc); 
  24.  

Defined (1)

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

/admin/pages.php  
  1. function gl_field_text($settings_values, $settings_key, $key, $isColor = false, $short_desc = null, $desc = null) { 
  2. ?> 
  3. <input type="text" name="<?php echo $settings_key; ?>[<?php echo $key; ?>]" value="<?php echo esc_attr( $settings_values[$key] ); ?>" <?php if ( $isColor == true) echo 'class="color-field"'; ?> style="width:350px" /> <?php if ( $short_desc ) echo $short_desc; ?><br><br> 
  4. <span style="color:#999"><em><?php if ( $desc ) echo $desc; ?></em></span> 
  5. <?php