-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Site Editor: Navigation templates #25739
Changes from all commits
da18be9
186b244
6c720c2
dd60398
790ac20
5921992
4036921
5b76047
9e74cc1
4195108
8cb3123
b9b2c02
3d6a135
637354a
f34fc16
af092c0
06faa7c
3ba796d
969ff62
6e1c693
c40e390
9c6e04a
9e2b8e8
88e3f45
485f5fb
1608e3a
0817526
0d8ab08
e694a7b
e5711c2
1a56595
ba847e8
c6b07a0
4f7c00a
6ba556d
976ed93
e72bba7
4e3b47b
d4873a6
1218680
086e39e
c8b1d4c
71ceb5b
7990a9b
bf02206
a081994
24d2293
d239fbb
7a2600d
38c4ce5
787e076
2cc0c62
a369fd7
34d5078
83b3597
d74ae61
51c9075
abfcfa5
41c0bd3
6a4d721
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
export const TEMPLATES_DEFAULT_DETAILS = { | ||
// General | ||
'front-page': { | ||
title: 'Front page', | ||
description: '', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could've added "Display the contents of your Front Page" here, or something along the similar lines. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @david-szabo97 @vindl — Let's not forget i18n. Constants files like this should be i18n-ready from the start, otherwise getting everything ready for a testable Site Editor around WP 5.6 will be much more difficult. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mcsf My fault, I should have caught this in review! |
||
}, | ||
archive: { | ||
title: 'Archive', | ||
description: | ||
'Displays the content lists when no other template is found', | ||
}, | ||
single: { | ||
title: 'Single', | ||
description: 'Displays the content of a single post', | ||
}, | ||
singular: { | ||
title: 'Singular', | ||
description: 'Displays the content of a single page', | ||
}, | ||
index: { | ||
title: 'Default (index)', | ||
description: 'Displays the content of a single page', | ||
}, | ||
search: { | ||
title: 'Search results', | ||
description: '', | ||
}, | ||
'404': { | ||
title: '404', | ||
description: 'Displayed when a non-existing page requested', | ||
}, | ||
|
||
// Pages | ||
page: { | ||
title: 'Default (Page)', | ||
description: 'Displays the content of a single page', | ||
}, | ||
|
||
// Posts | ||
home: { | ||
title: 'Posts (home)', | ||
description: 'Displayed on your homepage', | ||
}, | ||
'archive-post': { | ||
title: 'Default (Post archive)', | ||
description: 'Displays a list of posts', | ||
}, | ||
'single-post': { | ||
title: 'Default (Single post)', | ||
description: 'Displays the content of a single post', | ||
}, | ||
}; | ||
|
||
export const TEMPLATES_GENERAL = [ | ||
'front-page', | ||
'archive', | ||
'single', | ||
'singular', | ||
'index', | ||
'search', | ||
'404', | ||
]; | ||
|
||
export const TEMPLATES_POSTS = [ 'single-post', 'archive-post', 'home' ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As already mentioned, accessing these files on each request is going to have a negative impact on performance. We can probably store this info once on theme activation and we'll also need it after theme updates.