'py-12', 'normal' => 'py-20', 'spacious' => 'py-32' ]; $columns_map = [ '1' => 'grid-cols-1 max-w-2xl mx-auto', '2' => 'grid-cols-1 md:grid-cols-2', '3' => 'grid-cols-1 md:grid-cols-3' ]; $spacing = slbuild_get_field( 'spacing', 'attr' ) ?: 'normal'; $columns = slbuild_get_field( 'columns', 'attr' ) ?: '3'; $style = slbuild_get_field( 'style', 'attr' ) ?: 'card'; $show_avatar = (bool) slbuild_get_field( 'show_avatar', 'attr' ); $show_rating = (bool) slbuild_get_field( 'show_rating', 'attr' ); $cs = slbuild_get_color_scheme( slbuild_get_field( 'color_scheme', 'attr' ) ?: 'white' ); $pad = $spacing_map[ $spacing ] ?? 'py-20'; $col_cls = $columns_map[ $columns ] ?? 'grid-cols-1 md:grid-cols-3'; $blocks = slbuild_get_blocks(); $eyebrow = slbuild_get_field( 'eyebrow' ); $headline = slbuild_get_field( 'headline' ); $tag = slbuild_meta( 'heading_level' ) ?: 'h2'; // Collect rating data for AggregateRating schema $rating_sum = 0; $rating_count = 0; foreach ( $blocks as $b ) { $r = isset( $b['settings']['rating'] ) ? (int) $b['settings']['rating'] : 0; if ( $r > 0 ) { $rating_sum += $r; $rating_count++; } } ?>

< class="text-3xl md:text-4xl font-semibold tracking-tight ">>
set_current_block( $block ); $quote = slbuild_get_block_field( 'quote' ); $name = slbuild_get_block_field( 'name' ); $title = slbuild_get_block_field( 'title' ); $photo_url = slbuild_get_block_field( 'photo', 'url' ); $photo_alt = slbuild_get_block_field( 'photo_alt' ) ?: $name; $rating = (int) ( slbuild_get_block_field( 'rating' ) ?: 5 ); ?>

“

<?php echo esc_attr( $photo_alt ); ?>

""

<?php echo esc_attr( $photo_alt ); ?>

""

<?php echo esc_attr( $photo_alt ); ?>

clear_current_block(); ?>
0 ) { $avg_rating = round( $rating_sum / $rating_count, 1 ); $schema = [ '@context' => 'https://schema.org', '@type' => 'Organization', 'name' => get_bloginfo( 'name' ), 'aggregateRating' => [ '@type' => 'AggregateRating', 'ratingValue' => $avg_rating, 'reviewCount' => $rating_count, 'bestRating' => 5, 'worstRating' => 1, ], ]; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo '' . "\n"; }