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
| <?php | |
| /* Add Image Upload to Series Taxonomy */ | |
| // Add Upload fields to "Add New Taxonomy" form | |
| function add_series_image_field() { | |
| // this will add the custom meta field to the add new term page | |
| ?> | |
| <div class="form-field"> | |
| <label for="series_image"><?php _e( 'Series Image:', 'journey' ); ?></label> |
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
| html { | |
| font-size: 17px; | |
| } | |
| @base: 1rem; | |
| .nav-toggle { | |
| display: block; | |
| position: relative; |
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
| /* | |
| * Tiny mobile detection script, courtesy of | |
| * https://github.com/markdalgleish/stellar.js/issues/37 | |
| */ | |
| var isMobile = { | |
| Android: function() { | |
| return navigator.userAgent.match(/Android/i); | |
| }, | |
| BlackBerry: function() { | |
| return navigator.userAgent.match(/BlackBerry/i); |
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
| .abs-pos-img-div { | |
| position: absolute; | |
| top:0; | |
| left:0; | |
| width:100%; | |
| height:100%; | |
| background-size:cover; | |
| background-position:center center; | |
| z-index: 0; | |
| .translate3d(0, 0, 0); |
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
| <?php | |
| /** | |
| * Helper function for including templates | |
| * | |
| * @param $template | |
| */ | |
| function include_template($template, $args) | |
| { | |
| extract($args); |
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
| function wip_login_redirect( $url, $request, $user ){ | |
| // Define referrer | |
| $slug = $_SERVER["REQUEST_URI"]; | |
| // Define slugs of any referrers you want here | |
| // For example, if they page you want to target | |
| // is www.testsite.com/hello-world | |
| // you'll want this: | |
| // $islogin = strpos($slug, 'hello-world'); | |
| $islogin = strpos($slug, 'log-in'); |
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
| /* Change the 'Only # left in stock' message on the WooCommerce product page to | |
| * simply show 'Low Stock'. | |
| * Add to your theme's functions.php file | |
| */ | |
| function custom_stock_totals($availability_html, $availability_text, $product) { | |
| if (substr($availability_text,0, 4)=="Only") { | |
| $availability_text = "Low Stock"; | |
| } | |
| $availability_html = '<p class="stock ' . esc_attr( $availability['class'] ) . '">' . esc_html( $availability_text ) . '</p>'; | |
| return $availability_html; |
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
| <?php | |
| /** | |
| * Custom WordImpress RSS2 Feed | |
| * Integrates Featured Image as "Enclosure" | |
| * See http://www.rssboard.org/rss-2-0-1#ltenclosuregtSubelementOfLtitemgt | |
| * for RSS 2.0 specs | |
| * @package WordPress | |
| */ | |
| header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); |
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
| <?php | |
| /** | |
| * Sends user to the start page on first activation, as well as each time the | |
| * plugin is upgraded to a new version | |
| * | |
| * @access public | |
| * @since 1.1 | |
| * @return void | |
| */ |
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
| <?php | |
| /* | |
| * This asks first for a Yoast SEO meta description, | |
| * If that's not present, then it asks for the excerpt of the post, | |
| * If that's not present, then it strips the content | |
| * In this case, I have an excerpt length setting in the Customizer | |
| * Both the excerpt and content stripping, also strip shortcodes | |
| * @author Matt Cromwell <reachme@mattcromwell.com> | |
| * @copyright Copyright (c) 2014, Matt Cromwell | |
| * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |