Skip to content

Commit

Permalink
Base api_key field added #1540
Browse files Browse the repository at this point in the history
  • Loading branch information
Devin Walker committed Feb 23, 2017
1 parent cb35e0c commit a543df0
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions includes/admin/class-admin-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,29 @@ class="give-input-field<?php echo esc_attr( isset( $value['class'] ) ? ' ' . $va
echo $description;
break;

// Custom: Gateway API key.
case 'api_key' :
$option_value = self::get_option( $option_name, $value['id'], $value['default'] );
$type = !empty($option_name) ? 'password' : 'text';
?>
<tr valign="top" <?php echo ! empty( $value['wrapper_class'] ) ? 'class="' . $value['wrapper_class'] . '"' : '' ?>>
<th scope="row" class="titledesc">
<label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo self::get_field_title( $value ); ?></label>
</th>
<td class="give-forminp give-forminp-<?php echo sanitize_title( $value['type'] ) ?>">
<input
name="<?php echo esc_attr( $value['id'] ); ?>"
id="<?php echo esc_attr( $value['id'] ); ?>"
type="<?php echo esc_attr( $type ); ?>"
style="<?php echo esc_attr( $value['css'] ); ?>"
value="<?php echo esc_attr( $option_value ); ?>"
class="give-input-field<?php echo( empty( $value['class'] ) ? '' : ' ' . esc_attr( $value['class'] ) ); ?>"
<?php echo implode( ' ', $custom_attributes ); ?>
/> <?php echo $description; ?>
</td>
</tr><?php
break;

// Custom: Log field.
case 'logs' :
// Note: there are no need to check for html field param because we want custom html to this field.
Expand Down

0 comments on commit a543df0

Please sign in to comment.