Skip to content
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

Fix child theme base path property #27

Merged
merged 2 commits into from
Feb 16, 2023

Conversation

o-samaras
Copy link
Contributor

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Fix

What is the current behavior? (You can also link to an open issue here)
When using a child theme ThemeProperties::basePath() returns the parent theme's path. More information available in #26

What is the new behavior (if this is a feature change)?
Use get_stylesheet_directory() instead of get_template_directory() for retrieving the base path of the proper theme.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No

Other information:
More information regarding the function usage and the difference for when having child themes available here

@o-samaras o-samaras requested review from Chrico and gmazzap February 15, 2023 11:58
@codecov
Copy link

codecov bot commented Feb 15, 2023

Codecov Report

Base: 96.86% // Head: 96.86% // No change to project coverage 👍

Coverage data is based on head (599f28d) compared to base (4e9c659).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##             master      #27   +/-   ##
=========================================
  Coverage     96.86%   96.86%           
  Complexity      177      177           
=========================================
  Files             9        9           
  Lines           510      510           
=========================================
  Hits            494      494           
  Misses           16       16           
Flag Coverage Δ
unittests 96.86% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Properties/ThemeProperties.php 91.66% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@gmazzap
Copy link
Contributor

gmazzap commented Feb 16, 2023

Thanks @o-samaras!

@Chrico the PR looks very fine. If you can have a look and release a patch version that would be great.

@Chrico Chrico merged commit eb14a9b into master Feb 16, 2023
@Chrico Chrico deleted the fix/child-theme-base-path-property branch February 16, 2023 09:37
@Chrico
Copy link
Member

Chrico commented Feb 16, 2023

Thanks 💪🏻 merged and created a 1.6.1 release: https://github.com/inpsyde/modularity/releases/tag/1.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants