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.
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
Backport: Block theme previews #4627
Backport: Block theme previews #4627
Changes from all commits
3eef498
fa4b2e5
fce6400
2c48f38
7658703
ea870d3
841c25e
5dc273c
aabf5dc
ebf6909
9aa8b1f
0d4a6f4
7c78729
c0376f7
1270e3e
8339d07
bf1eafa
ffbcbb0
596545c
86be126
4a6581d
e6182be
88c7f9d
4c32603
f260cd5
391e296
a217191
9971a7a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
What is happening here? Is this detecting if the theme has a parent? If so, I remember using
$wp_theme->parent()
.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.
Thanks for looking at this Johnny. This function (
wp_get_theme_preview_path
) is applied on two different filters -stylesheet
andtemplate
. The return value of the function needs to be different depending on whether we are running on thestylesheet
ortemplate
filter. The call tocurrent_filter
is determining which filter we are on so we know which value to return.