Skip to content

Commit

Permalink
Wrap core/post-content into div.entry-content.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixarntz authored and epiqueras committed Sep 16, 2019
1 parent ba9ef94 commit 483ee9d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 11 additions & 9 deletions packages/block-library/src/post-content/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,17 @@ export default function PostContentEdit() {
>
{ __( 'Update' ) }
</Button>
<InnerBlocks
value={ blocks }
onChange={ setBlocks }
onInput={ useCallback( () => {
setContent( ( { blocks: blocksForSerialization = [] } ) =>
serializeBlocks( blocksForSerialization )
);
}, [] ) }
/>
<div className="entry-content">
<InnerBlocks
value={ blocks }
onChange={ setBlocks }
onInput={ useCallback( () => {
setContent( ( { blocks: blocksForSerialization = [] } ) =>
serializeBlocks( blocksForSerialization )
);
}, [] ) }
/>
</div>
</>
);
}
2 changes: 1 addition & 1 deletion packages/block-library/src/post-content/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function render_block_core_post_content() {
the_post();
}

return apply_filters( 'the_content', str_replace( ']]>', ']]&gt;', get_the_content() ) );
return '<div class="entry-content">' . apply_filters( 'the_content', str_replace( ']]>', ']]&gt;', get_the_content() ) ) . '</div>';
}

/**
Expand Down

0 comments on commit 483ee9d

Please sign in to comment.