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 27, 2020
1 parent 0e1e685 commit 0714e45
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 0714e45

Please sign in to comment.