inpsyde / modularity

A PSR-11 implementation for WordPress Plugins, Themes or Libraries.
https://inpsyde.github.io/modularity/
GNU General Public License v2.0
44 stars 4 forks source link

Fix child theme base path property #27

Closed o-samaras closed 1 year ago

o-samaras commented 1 year ago

Please check if the PR fulfills these requirements

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.)

codecov[bot] commented 1 year ago

Codecov Report

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

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 ```diff @@ 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](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=inpsyde#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/inpsyde/modularity/pull/27?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=inpsyde) | Coverage Δ | | |---|---|---| | [src/Properties/ThemeProperties.php](https://codecov.io/gh/inpsyde/modularity/pull/27?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=inpsyde#diff-c3JjL1Byb3BlcnRpZXMvVGhlbWVQcm9wZXJ0aWVzLnBocA==) | `91.66% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=inpsyde). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=inpsyde)

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

gmazzap commented 1 year ago

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 commented 1 year ago

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