-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Template activation: improve back compat #72223
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
Changes from 1 commit
18797bb
115d1ad
3ab2657
fd6350c
2532335
3c33645
8d46498
c166ecb
47e3511
5db3f6c
6668287
d53b1c8
2945540
5ebb1f5
d405e56
a2cb82b
272ac55
cd074ae
a6e06b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -336,7 +336,20 @@ export const getEntityRecords = | |
| }; | ||
| } | ||
|
|
||
| const path = addQueryArgs( entityConfig.baseURL, { | ||
| let { baseURL } = entityConfig; | ||
| const { combinedTemplates = true } = query; | ||
|
Contributor
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. Can we document this better?
Member
Author
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. Done :)
Contributor
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. Thanks, it is more understandable now here, although maybe a different variable name could help, like
Member
Author
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. The thing is that it doesn’t just add theme templates. It also combines db templates that are active and omits the rest |
||
|
|
||
| if ( | ||
| kind === 'postType' && | ||
| name === 'wp_template' && | ||
| combinedTemplates | ||
| ) { | ||
| baseURL = | ||
| baseURL.slice( 0, baseURL.lastIndexOf( '/' ) ) + | ||
| '/templates'; | ||
| } | ||
|
|
||
| const path = addQueryArgs( baseURL, { | ||
| ...entityConfig.baseURLParams, | ||
| ...query, | ||
| } ); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.