-
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
Change the prefix for custom templates #30467
Merged
aristath
merged 2 commits into
add/template-support-classic-themes
from
fix/custom-template-prefix
Apr 2, 2021
Merged
Change the prefix for custom templates #30467
aristath
merged 2 commits into
add/template-support-classic-themes
from
fix/custom-template-prefix
Apr 2, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Size Change: +2 B (0%) Total Size: 1.42 MB
ℹ️ View Unchanged
|
youknowriad
reviewed
Apr 2, 2021
youknowriad
approved these changes
Apr 2, 2021
aristath
added a commit
that referenced
this pull request
Apr 8, 2021
* Allow creating custom block templates in classic themes * Fix template fetching * Restore PHP callback * Take into account custom templates (#30464) * Change the prefix for custom templates (#30467) * Change the prefix for custom templates * Update comment * Add gutenberg_supports_block_templates (#30465) * Introduce gutenberg_is_fse_enabled * typo & reverse logic * update filter name * Remove filter * Rename function * don't use "disable"theme-supports * rename theme-support * Missed renaming the theme-support * Add a modal to edit the template's title before creating it * Fix design and enable for FSE themes * Add e2e test * Add documentation * Add some site blocks to the default template Co-authored-by: Ari Stathopoulos <aristath@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As discussed 1-on-1 with @youknowriad, this PR changes the prefix for custom templates to make it a bit more unique by adding
wp-
at the front.Using
custom-template-
has the potential to return some false positives in 91b24b6#diff-b549790920c5dba823bd76cf7f7b1ef68fa0d89f9f66f3579dc9daa68767b646R75. By adding thewp-
prefix we ensure that the template was one generated by WP and not a file calledcustom-template-something