przemekhernik / footmate.pro

Other
13 stars 0 forks source link

feature/change resources path #25

Closed przemekhernik closed 3 months ago

przemekhernik commented 3 months ago

This PR improves the default WordPress template hierarchy, because the custom templates didn't work.

Explanation

MORE INFORMATION

Relocation FIX

The FM\Templates\Resolver::relocate function simply takes the default WordPress templates paths relative to the theme root:

Array
(
    [0] => views/template-custom.blade.php
    [1] => page-test.php
    [2] => page-28.php
    [3] => page.php
)

and changes to the correct paths to our blade files:

Array
(
    [0] => views/template-custom.blade.php
    [1] => views/page-test.blade.php
    [2] => views/page-28.blade.php
    [3] => views/page.blade.php
)

This way, we fix the problem with custom templates. Previously the custom templates paths were resolved incorrectly.