Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove rendered Blades on theme install/uninstall #2121

Closed
wants to merge 3 commits into from

Conversation

alwaysblank
Copy link
Member

This PR would address some of the concerns in #1987. It doesn't add a command-line function for manipulating Blades, but it does make Sage a slightly kinder WordPress citizen by cleaning up Blades when installed/uninstalled, and provides some helper methods for doing that at other times. It endeavors to be relatively careful, and only delete the files it needs to delete, leaving other files alone.

The reason it doesn't examine existing Blade templates to find their rendered versions and delete those is because part of the ostensible purpose is to clean up unnecessary Blades when changing themes: If the original Blade templates have been changed or removed during development, the "orphaned" rendered files would not be found.

I considered adding the a "build all Blades on install" feature, but felt that was a little too presumptuous and could theoretically lead to significantly increased load when activating a theme if there are a lot of Blades to render. I'd be happy to modify the PR to add that feature, though.

@retlehs
Copy link
Member

retlehs commented May 1, 2019

i know this is old, but can we re-do this for sage 10?

@Log1x
Copy link
Member

Log1x commented Jun 18, 2019

No longer needed as of #2174

@Log1x Log1x closed this Jun 18, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants