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

Clean up page template names #1939

Closed
wants to merge 2 commits into from
Closed

Clean up page template names #1939

wants to merge 2 commits into from

Conversation

alwaysblank
Copy link
Member

@alwaysblank alwaysblank commented Aug 7, 2017

This pull request should resolve #1936. It does so by cleaning up the names of page templates (which, due to the way WordPress passes those names internally, end up with some duplicated content--the linked issue describes this in greater detail).

As detailed in issue #1936 (#1936),
recent changes to this filter break soberwp/controller in the specific
case of providing controller data to Blades for custom page templates
because WordPress stores the entire template filename (with path) as the
'name' of the template. This information is then duplicated when it runs
through Sage's `App\filter_templates()` function.

This commit simply checks for those redundant items and removes them if
they exist, providing nice, clean names for templates, and allowing
soberwp/controller to work properly.
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.

Custom Templates Hierarchy
2 participants