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
| const path = require('path'); | |
| const config = require('./config'); | |
| const webpack = require('webpack'); | |
| const merge = require('webpack-merge'); | |
| const CleanWebpackPlugin = require('clean-webpack-plugin'); | |
| const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin'); | |
| const BrowserSyncPlugin = require('browser-sync-webpack-plugin'); | |
| const hotMiddlewareScript = require('webpack-hot-middleware'); | |
| /** |
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
| const path = require('path'); | |
| const config = require('./config'); | |
| const webpack = require('webpack'); | |
| const merge = require('webpack-merge'); | |
| const BrowserSyncPlugin = require('browser-sync-webpack-plugin'); | |
| const CleanWebpackPlugin = require('clean-webpack-plugin'); | |
| const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin'); | |
| const HtmlWebpackPlugin = require('html-webpack-plugin'); |
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 | |
| /** | |
| * Display errors | |
| */ | |
| if ( ! function_exists('debug_wpmail') ) : | |
| function debug_wpmail( $result = false ) { | |
| if ( $result ) | |
| return; |
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 | |
| /** | |
| * WooCommerce 3.0 gallery fix | |
| */ | |
| add_action( 'after_setup_theme', function () { | |
| add_theme_support( 'wc-product-gallery-zoom' ); | |
| add_theme_support( 'wc-product-gallery-lightbox' ); | |
| add_theme_support( 'wc-product-gallery-slider' ); | |
| }); |
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 | |
| /** | |
| * Place this part of code somewhere in functions.php | |
| */ | |
| add_filter( 'posts_where' , function($q) { | |
| global $wpdb; | |
| $r = "AND ({$wpdb->posts}.post_password = '')"; | |
| $q = str_replace($r, '', $q); |
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
| $('.play').click( function(event) { | |
| if(event.preventDefault) { event.preventDefault(); } | |
| $video = $(this).closest('iframe'); | |
| if ( $video.hasClass('wistia_embed') ) { | |
| window._wq = window._wq || []; | |
| $video_id = /[^/]*$/.exec( $video.attr('src') )[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
| add_action( 'init', function () { | |
| wp_oembed_add_provider( '/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/.*/', 'http://fast.wistia.net/oembed', 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 | |
| /** | |
| * Pre-populate Woocommerce checkout fields | |
| * Note that this filter populates shipping_ and billing_ fields with a different meta field eg 'first_name' | |
| */ | |
| add_filter('woocommerce_checkout_get_value', function($input, $key ) { | |
| global $current_user; | |
| switch ($key) : |
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
| <a href="#toggleMe" data-toggle="toggleMe">Toggle div</a> | |
| <div id="toggleMe" class="toggler"> | |
| Content goes here ... | |
| </div> |
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
| .toggler { | |
| overflow: hidden; | |
| max-height: 0; | |
| transition: max-height .3s ease-in; | |
| } | |
| .toggler.active { | |
| max-height: 2000px; | |
| transition: max-height .3s ease-out; | |
| } |