-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Scan files of parent theme if a child theme is active (#1) #62
Merged
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
bueltge
reviewed
Apr 18, 2020
Hello @stklcode thanks for this enhancement. I leave two comments, maybe you will validate them and get me feedback. PS. I hope it works, I'm on mobile with a app and I need to learn on this view. |
Thanks for the review @bueltge (comments are fine). I've added one change and one comment. |
bueltge
reviewed
Apr 18, 2020
Match commonly used translations for parent/child themes of WP core.
* eliminate default parameter value and call explicitly current theme * trigger recursion unconditionally with break in the very first line
Discussion is kind of stuck, so I refactored the recursion completely to get rid of at least one point. |
bueltge
approved these changes
Apr 19, 2020
Thank you both ❤️ |
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.
The title tells the whole story. (resolves #1)
I've added a trivial recursion while
$theme->parent()
provides a valid theme in the_get_current_theme()
method.false
is only returned if the current theme and the parent theme is empty (probably never happens), but empty child themes (i.e. only CSS changes) are likely to be found in the wild.Later in the
_get_theme_files()
phase the file arrays are flattened.