24, 'height' => 24, 'class' => 'rooster-feature-card__icon' ] ); $layout = 'row' === (string) ( $attributes['layout'] ?? '' ) && '' !== $icon ? 'row' : 'stack'; $rule = 'side' === (string) ( $attributes['rule'] ?? '' ) ? ' has-rule-side' : ''; $border = in_array( (string) ( $attributes['border'] ?? '' ), [ 'strong', 'accent' ], true ) ? ' has-border-' . $attributes['border'] : ''; $wrapper = AIEO_Engine_Blocks::wrapper( $library, [ 'class' => 'rooster-feature-card rooster-feature-card--' . $layout . ( '' !== $href ? ' has-link' : '' ) . ( ! empty( $attributes['highlighted'] ) ? ' is-highlighted' : '' ) . $rule . $border, 'data-rooster-ui' => 'rooster-one/card', ] ); $inner = ''; if ( '' !== $badge ) { $inner .= '' . esc_html( $badge ) . ''; } if ( '' !== $kicker ) { $inner .= '

' . esc_html( $kicker ) . '

'; } if ( '' !== $title ) { $heading = esc_html( $title ); if ( '' !== $href && '' === $cta ) { $heading = '' . $heading . ''; } $inner .= sprintf( '%2$s', $level, $heading ); } if ( '' !== $price ) { $inner .= '

' . esc_html( $price ) . '

'; } if ( '' !== $text ) { $inner .= AIEO_Engine_Blocks::text_html( $text, 'rooster-feature-card__text', 'rooster-feature-card__list', [ 'links' => '' === $href || '' !== $cta, 'level' => $level + 1, 'heading' => 'rooster-feature-card__subtitle' ] ); } $chips = trim( (string) ( $attributes['chips'] ?? '' ) ); if ( '' !== $chips ) { $chips_layout = in_array( (string) ( $attributes['chipsLayout'] ?? '' ), [ 'pills', 'lines' ], true ) ? (string) $attributes['chipsLayout'] : 'tiles'; $chips_items = AIEO_Engine_Blocks::chips_items( $chips, $chips_layout ); if ( '' !== $chips_items ) { AIEO_Engine_Blocks::enqueue( 'list', 'chips' ); $inner .= ''; } } if ( '' !== $href && '' !== $cta ) { $inner .= '' . esc_html( $cta ) . ''; } $inner = $icon . ( 'row' === $layout ? '
' . $inner . '
' : $inner ); AIEO_Engine_Blocks::out( sprintf( '
%s
', $wrapper, $inner ) );