-
Notifications
You must be signed in to change notification settings - Fork 0
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
Use Sprig/Twig for Templating #9
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…their own methods Now this can be reused for other scripts and styles registered in other classes. Yay for better modularizing.
We need some dynamic values so this is the only way we can pass dynamic values into a Twig template and still have it appear as part of base.twig.
aka Sprig.
Also convert one render method to use Sprig/Twig.
…llery class. Also renamed `Daddio_Scripts_Styles` class to match the file name.
Just use static methods instead.
…te parts. Less abstract, just as effective, simpler.
Nothing was using it.
Nothing was using it.
… API that we don't use anymore.
We can just output what we need directly.
Prevents showing a count with no heading. Without this the homepage looks weird.
Also need to register the on-this-day script on init so it can be called on the wp_enqueue_scripts action.
`Daddio_On_This_Day::get_switch_date_form()` does the trick.
kingkool68
changed the title
[WIP] Use Sprig/Twig for Templating
Use Sprig/Twig for Templating
Dec 7, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request switches all HTML rendering to Twig via the Sprig for WordPress. Now there is a clearer separation between PHP and HTML.
Other Fixes
Todo
rsvp.php
into a classclass-daddio-instagram-locations.php
class-daddio-instagram.php
class-daddio-media.php
(Handle helper functions)class-daddio-on-this-day.php
class-daddio-post-galleries.php
(Also figure out why it doesn't work anymore)Daddio_Menus::action_daddio_footer()
needs Twigaction_daddio_footer
action_daddio_before_content
404-date-archive.php
404-age-archive.php
archives.php
content-on-this-day-switch-date-form.php