Skip to content

Commit

Permalink
Read More: Add example preview (WordPress#68288)
Browse files Browse the repository at this point in the history
* Read More: Add example preview

* Read More: Update example to use localized text

* refactor: remove the usage of context

Co-authored-by: Aki Hamano <[email protected]>

* fix: replace `_x` with `__`

---------

Co-authored-by: yogeshbhutkar <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: ramonjd <[email protected]>
  • Loading branch information
4 people authored Dec 30, 2024
1 parent d0440b9 commit d463dbb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/block-library/src/read-more/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { link as icon } from '@wordpress/icons';

/**
Expand All @@ -16,6 +17,11 @@ export { metadata, name };
export const settings = {
icon,
edit,
example: {
attributes: {
content: __( 'Read more' ),
},
},
};

export const init = () => initBlock( { name, metadata, settings } );

0 comments on commit d463dbb

Please sign in to comment.