Skip to content

Commit

Permalink
2024 Theme: fix alignment of learning pathways cards message
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwoodnz committed Jun 6, 2024
1 parent 0574fe2 commit 88c5b7c
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ function render( $attributes, $content, $block ) {
$is_mini = isset( $attributes['isMini'] ) && $attributes['isMini'];

if ( empty( $learning_pathways ) || is_wp_error( $learning_pathways ) ) {
return __( 'No learning pathways found.', 'wporg-learn' );
}
$content = __( 'No learning pathways found.', 'wporg-learn' );
} else {
$content = '<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|50"}},"className":"is-style-cards-grid","layout":{"type":"grid","columnCount":null,"minimumColumnWidth":"350px"}} --><div class="wp-block-group is-style-cards-grid">';

$content = '<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|50"}},"className":"is-style-cards-grid","layout":{"type":"grid","columnCount":null,"minimumColumnWidth":"350px"}} --><div class="wp-block-group is-style-cards-grid">';
foreach ( $learning_pathways as $learning_pathway ) {
$content .= $is_mini ? render_mini_card( $learning_pathway ) : render_full_card( $learning_pathway );
}

foreach ( $learning_pathways as $learning_pathway ) {
$content .= $is_mini ? render_mini_card( $learning_pathway ) : render_full_card( $learning_pathway );
$content .= '</div><!-- /wp:group -->';
}

$content .= '</div><!-- /wp:group -->';

$wrapper_attributes = get_block_wrapper_attributes();
return sprintf(
'<div %1$s>%2$s</div>',
Expand Down

0 comments on commit 88c5b7c

Please sign in to comment.