Skip to content

Commit

Permalink
Latest Posts: Remove wrapper div and apply consistent class (#60728)
Browse files Browse the repository at this point in the history
Unlinked contributors: dero, adrianahdez.

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: AkmElias <[email protected]>
  • Loading branch information
4 people authored Apr 16, 2024
1 parent 2f92336 commit 9edfc4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/block-library/src/latest-posts/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
const dateFormat = getSettings().formats.date;

return (
<div>
<>
{ inspectorControls }
<BlockControls>
<ToolbarGroup controls={ layoutControls } />
Expand Down Expand Up @@ -518,7 +518,6 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
<div className={ imageClasses }>
{ addLinkToFeaturedImage ? (
<a
className="wp-block-latest-posts__post-title"
href={ post.link }
rel="noreferrer noopener"
onClick={
Expand All @@ -533,6 +532,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
</div>
) }
<a
className="wp-block-latest-posts__post-title"
href={ post.link }
rel="noreferrer noopener"
dangerouslySetInnerHTML={
Expand Down Expand Up @@ -582,6 +582,6 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
);
} ) }
</ul>
</div>
</>
);
}
2 changes: 1 addition & 1 deletion packages/block-library/src/latest-posts/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ function render_block_core_latest_posts( $attributes ) {
$trimmed_excerpt = substr( $trimmed_excerpt, 0, -11 );
$trimmed_excerpt .= sprintf(
/* translators: 1: A URL to a post, 2: Hidden accessibility text: Post title */
__( '… <a href="%1$s" rel="noopener noreferrer">Read more<span class="screen-reader-text">: %2$s</span></a>' ),
__( '… <a class="wp-block-latest-posts__read-more" href="%1$s" rel="noopener noreferrer">Read more<span class="screen-reader-text">: %2$s</span></a>' ),
esc_url( $post_link ),
esc_html( $title )
);
Expand Down

0 comments on commit 9edfc4c

Please sign in to comment.