$this->field_element( 'row', $field, [ 'slug' => 'icon_size', 'content' => $lbl . $fld, ] ); // Icon color picker. $lbl = $this->field_element( 'label', $field, [ 'slug' => 'icon_color', 'value' => esc_html__( 'Icon Color', 'wpforms-lite' ), 'tooltip' => esc_html__( 'Select the color for the rating icon', 'wpforms-lite' ), ], false ); $icon_color = isset( $field['icon_color'] ) ? wpforms_sanitize_hex_color( $field['icon_color'] ) : ''; $icon_color = empty( $icon_color ) ? $this->get_default_icon_color() : $icon_color; $fld = $this->field_element( 'color', $field, [ 'slug' => 'icon_color', 'value' => $icon_color, 'data' => [ 'fallback-color' => $icon_color, ], ], false ); $this->field_element( 'row', $field, [ 'slug' => 'icon_color', 'content' => $lbl . $fld, 'class' => 'color-picker-row', ] ); // Custom CSS classes. $this->field_option( 'css', $field ); // Hide label. $this->field_option( 'label_hide', $field ); // Options close markup. $this->field_option( 'advanced-options', $field, [ 'markup' => 'close', ] ); } /** * Field preview inside the builder. * * @since 1.9.4 * * @param array $field Field settings. */ public function field_preview( $field ) { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.MaxExceeded // Define data. $scale = ! empty( $field['scale'] ) ? esc_attr( $field['scale'] ) : 5; $icon = ! empty( $field['icon'] ) ? esc_attr( $field['icon'] ) : 'star'; $icon_size = ! empty( $field['icon_size'] ) ? esc_attr( $field['icon_size'] ) : 'medium'; $icon_color = ! empty( $field['icon_color'] ) ? esc_attr( $field['icon_color'] ) : $this->get_default_icon_color(); $icon_class = ''; // Set icon class. switch ( $icon ) { case 'star': $icon_class = 'fa-star'; break; case 'heart': $icon_class = 'fa-heart'; break; case 'thumb': $icon_class = 'fa-thumbs-up'; break; case 'smiley': $icon_class = 'fa-smile-o'; break; } // Set icon size. $icon_size_css = $this->get_icon_size_css( $icon_size ); // Label. $this->field_preview_option( 'label', $field, [ 'label_badge' => $this->get_field_preview_badge(), ] ); // Primary input. for ( $i = 1; $i <= 10; $i++ ) { printf( '', esc_attr( $icon_class ), esc_attr( $icon_size ), esc_attr( $icon_color ), $i <= $scale ? 'inline-block' : 'none', esc_attr( $icon_size_css ) ); } // Description. $this->field_preview_option( 'description', $field ); } /** * Field display on the form front-end. * * @since 1.9.4 * * @param array $field Field settings. * @param array $deprecated Deprecated, don't use. * @param array $form_data Form data and settings. */ public function field_display( $field, $deprecated, $form_data ) { } /** * Get icon size CSS value in pixels. * * @since 1.9.4 * * @param string $icon_size Icon size value. */ protected function get_icon_size_css( $icon_size ): string { $render_engine = wpforms_get_render_engine(); $icon_sizes = [ 'classic' => [ 'small' => '18', 'medium' => '28', 'large' => '38', ], 'modern' => [ 'small' => '16', 'medium' => '24', 'large' => '38', ], ]; $default = $render_engine === 'modern' ? '24' : '28'; return ! empty( $icon_sizes[ $render_engine ][ $icon_size ] ) ? $icon_sizes[ $render_engine ][ $icon_size ] : $default; } /** * Get default icon color. * * @since 1.9.4 * * @return string */ public function get_default_icon_color(): string { $render_engine = wpforms_get_render_engine(); return array_key_exists( $render_engine, self::DEFAULT_ICON_COLOR ) ? self::DEFAULT_ICON_COLOR[ $render_engine ] : self::DEFAULT_ICON_COLOR['modern']; } } Shop | WETBAG

Ergebnisse 469 – 480 von 1041 werden angezeigt

Sort by:

Shop

-33%

LEOEASIY Windeltasche, Wetbag, Nasstasche, Windeltaschen, Nassbeutel

Aktueller Preis ist: 6,59 €. Ursprünglicher Preis war: 9,99 €
-25%

LIBAIDZ Nasstasche Kindergarten, Wetbag Kit, Wäschebeutel Kleinkind

Aktueller Preis ist: 6,49 €. Ursprünglicher Preis war: 8,49 €
8