Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions square/controllers/FrmSquareLiteActionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,6 @@ private static function get_style( $form_id ) {
'backgroundColor' => $settings['bg_color'],
'fontWeight' => $settings['field_weight'],
),
// How does input placeholder work??
'input::placeholder' => array(
'color' => $settings['text_color_disabled'],
),
Expand All @@ -580,7 +579,7 @@ private static function get_style( $form_id ) {
);

if ( ! empty( $settings['font'] ) ) {
$style['input']['fontFamily'] = $settings['font'];
$style['input']['fontFamily'] = self::prepare_font_family_setting( $settings['font'] );
}

/**
Expand All @@ -593,6 +592,23 @@ private static function get_style( $form_id ) {
return apply_filters( 'frm_square_style', $style, $settings, $form_id );
}

/**
* Prepare the font family setting for the Stripe element.
*
* @since x.x
*
* @param string $font
* @return string
*/
private static function prepare_font_family_setting( $font ) {
if ( false === strpos( $font, ',' ) ) {
return $font;
}

$fonts = explode( ',', $font );
return trim( reset( $fonts ) );
}

/**
* Get the border radius for Stripe elements.
*
Expand Down
Loading