1 |
|
2 |
|
3 |
|
4 | import { __ } from '@wordpress/i18n';
|
5 | import { Path, Rect, SVG } from '@wordpress/components';
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | import edit from './edit';
|
11 |
|
12 | export const name = 'core/latest-posts';
|
13 |
|
14 | export const settings = {
|
15 | title: __( 'Latest Posts' ),
|
16 |
|
17 | description: __( 'Display a list of your most recent posts.' ),
|
18 |
|
19 | icon: <SVG viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><Path d="M0,0h24v24H0V0z" fill="none" /><Rect x="11" y="7" width="6" height="2" /><Rect x="11" y="11" width="6" height="2" /><Rect x="11" y="15" width="6" height="2" /><Rect x="7" y="7" width="2" height="2" /><Rect x="7" y="11" width="2" height="2" /><Rect x="7" y="15" width="2" height="2" /><Path d="M20.1,3H3.9C3.4,3,3,3.4,3,3.9v16.2C3,20.5,3.4,21,3.9,21h16.2c0.4,0,0.9-0.5,0.9-0.9V3.9C21,3.4,20.5,3,20.1,3z M19,19H5V5h14V19z" /></SVG>,
|
20 |
|
21 | category: 'widgets',
|
22 |
|
23 | keywords: [ __( 'recent posts' ) ],
|
24 |
|
25 | supports: {
|
26 | html: false,
|
27 | },
|
28 |
|
29 | getEditWrapperProps( attributes ) {
|
30 | const { align } = attributes;
|
31 | if ( [ 'left', 'center', 'right', 'wide', 'full' ].includes( align ) ) {
|
32 | return { 'data-align': align };
|
33 | }
|
34 | },
|
35 |
|
36 | edit,
|
37 |
|
38 | save() {
|
39 | return null;
|
40 | },
|
41 | };
|