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 | |
| /** simple */ | |
| acf_add_options_page("Site Options"); | |
| /** complex */ | |
| if( function_exists('acf_add_options_page') ) { | |
| acf_add_options_page(array( | |
| 'page_title' => 'Theme General Settings', | |
| 'menu_title' => 'Theme Settings', |
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 if(get_field('gallery_images')): ?> | |
| <?php while(the_repeater_field('gallery_images')): ?> | |
| <img src="<?php the_sub_field('image'); ?>" alt="<?php the_sub_field('alt'); ?>" /> | |
| <?php endwhile; ?> | |
| <?php endif; ?> |
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
| { | |
| "blocks": false, | |
| "brackets": "never", | |
| "colons": "always", | |
| "colors": "always", | |
| "commaSpace": "always", | |
| "commentSpace": "always", | |
| "cssLiteral": "never", | |
| "depthLimit": false, | |
| "duplicates": 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
| #!/bin/sh | |
| # ./make-ssl-keys.sh hello.dev | |
| # | |
| # https://gist.github.com/jed/6147872 | |
| # https://gist.github.com/jimothyGator/5436538 | |
| # | |
| # put hello.dev.crt and hello.dev.key in etc/nginx | |
| # add to nginx server conf for hello.dev 443 | |
| # ssl on; |
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
| /** | |
| * 20px gutter between columns | |
| * using imagesLoaded | |
| **/ | |
| const $grid = $('.js-features'); | |
| $grid.imagesLoaded(() => { | |
| $grid.isotope({ | |
| filter: '.b2b', | |
| itemSelector: '.js-featuresItem', |
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
| @mixin addTopOffsetToVisuallyCenter() { | |
| /** all caps don't look vertically centered, becase height of span (for Lasiver font at least) takes into accoutn descenders, even if they're not used | |
| ** so, that 'top' should counter that | |
| */ | |
| position: relative; top: 0.15em; | |
| } |
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 | |
| function get_term_ultimate_parent($id, $taxonomy) { | |
| $ancestors = get_ancestors($id, $taxonomy); | |
| return get_term(end($ancestors), $taxonomy); | |
| } |
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 | |
| // http://stackoverflow.com/questions/22307013/wordpress-get-current-level-of-taxonomy-in-an-archive-page | |
| function get_tax_level($id, $tax) { | |
| $ancestors = get_ancestors($id, $tax); | |
| return count($ancestors) + 1; | |
| } | |
| $current_term_level = get_tax_level(get_queried_object()->term_id, get_queried_object()->taxonomy); |
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
| require('dotenv').config(); | |
| const email = require('emailjs'); | |
| const _ = require('lodash'); | |
| const smtpUser = process.env.SMTP_USER; | |
| const smtpPassword = process.env.SMTP_PASSWORD; | |
| const smtpHost = process.env.SMTP_HOST; | |
| const smtpFrom = process.env.SMTP_FROM; | |
| const smtpToSales = process.env.SMTP_TO_SALES; |
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
| gulp.task('sass', function () {}); | |
| gulp.task('browserify', function () {}); | |
| // other tasks... | |
| const paths = { | |
| web: './web/', | |
| webAssets: './web/assets/', | |
| webImages: './web/images/', | |
| }; |