A Pen by Kunsang Norbu Tsering on CodePen.
This file contains hidden or 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
| https://timber.github.io/docs/v2/guides/context/ | |
| - The context in Timber for WordPress refers to the set of variables passed to the Twig template. | |
| - The $data array in the example contains variables that will be available in the Twig template. | |
| - Timber::context() provides a set of useful default variables that can be used in the template. | |
| - Additional variables can be added or existing ones overwritten in the context. | |
| - The global context is cached and can be accessed using Timber::context_global(). | |
| - The global context can be extended using the timber/context filter to add custom data. | |
| - Timber automatically populates the context with variables like post, posts, term, terms, or author based on the template type. | |
| - The post variable in singular templates and the posts variable in archive templates provide access to the relevant content. |
This file contains hidden or 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
| #!/bin/bash -e | |
| clear | |
| echo "============================================" | |
| echo "WordPress Install Script" | |
| echo "============================================" | |
| echo "Database Name: " | |
| read -e dbname | |
| echo "Database User: " | |
| read -e dbuser | |
| echo "Database Password: " |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <!-- Generated by: TmTheme-Editor --> | |
| <!-- ============================================ --> | |
| <!-- app: http://tmtheme-editor.herokuapp.com --> | |
| <!-- code: https://github.com/aziz/tmTheme-Editor --> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>name</key> | |
| <string>Perv Orange Moonlight</string> |
This file contains hidden or 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
| /*-----------------------------------------------------------------------------------*/ | |
| /* Adds new body classes | |
| /*-----------------------------------------------------------------------------------*/ | |
| add_filter('body_class', 'add_browser_classes'); | |
| function add_browser_classes($classes){ | |
| if(is_singular()) { | |
| global $post; | |
| $classes[] = $post->post_name; | |
| } |