Skip to content

Commit

Permalink
Fix incorrect case format
Browse files Browse the repository at this point in the history
  • Loading branch information
Copons committed Jul 21, 2020
1 parent 18f8164 commit 6418c3b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/block-library/src/post-categories/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ function render_block_core_post_categories( $attributes, $content, $block ) {

$align_class_name = empty( $attributes['textAlign'] ) ? '' : ' ' . "has-text-align-{$attributes['textAlign']}";

$categoryLinks = '';
$category_links = '';
foreach ( $post_categories as $category ) {
$categoryLinks .= sprintf(
$category_links .= sprintf(
'<a href="%1$s">%2$s</a> | ',
get_category_link( $category->term_id ),
esc_html( $category->name )
);
}
$categoryLinks = trim( $categoryLinks, ' | ' );
$category_links = trim( $category_links, ' | ' );

return sprintf(
'<div class="%1$s">%2$s</div>',
'wp-block-post-categories' . esc_attr( $align_class_name ),
$categoryLinks
$category_links
);
}

Expand Down

0 comments on commit 6418c3b

Please sign in to comment.