Skip to content

Commit

Permalink
Read More: Update example to use localized text
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshbhutkar committed Dec 30, 2024
1 parent 8ff2773 commit 8c12ee5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 0 additions & 5 deletions packages/block-library/src/read-more/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
"default": "_self"
}
},
"example": {
"attributes": {
"content": "Read More"
}
},
"usesContext": [ "postId" ],
"supports": {
"html": false,
Expand Down
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 { _x } 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: _x( 'Read More', 'Example text for the Read More block' ),
},
},
};

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

0 comments on commit 8c12ee5

Please sign in to comment.