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
| // Requires Gulp v4. | |
| // $ npm uninstall --global gulp gulp-cli | |
| // $ rm /usr/local/share/man/man1/gulp.1 | |
| // $ npm install --global gulp-cli | |
| // $ npm install | |
| const { src, dest, watch, series, parallel } = require('gulp'); | |
| const browsersync = require('browser-sync').create(); | |
| const sass = require('gulp-sass'); | |
| const autoprefixer = require('gulp-autoprefixer'); | |
| const sourcemaps = require('gulp-sourcemaps'); |
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 | |
| /** | |
| * Plugin Name: WooCommerce Settings Tab Demo | |
| * Plugin URI: https://gist.github.com/BFTrick/b5e3afa6f4f83ba2e54a | |
| * Description: A plugin demonstrating how to add a WooCommerce settings tab. | |
| * Author: Patrick Rauland | |
| * Author URI: http://speakinginbytes.com/ | |
| * Version: 1.0 | |
| * | |
| * This program is free software: you can redistribute it and/or modify |
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
| $(document).on('click', '#am_posts_navigation aa', function (e) { | |
| e.preventDefault(); | |
| var $this = $(this); | |
| var paged = parseInt($this.text()); | |
| var href = $this.attr('href'); | |
| var data = { | |
| action: 'wt_ajax_tour_search', |
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 get_posts_for_pagination() { | |
| $html = ''; | |
| $paged = ( $_GET['page'] ) ? $_GET['page'] : 1; | |
| $post_type = $_GET['posttype']; | |
| if ( empty($post_type) ) { | |
| return ''; | |
| } | |
| if( filter_var( intval( $paged ), FILTER_VALIDATE_INT ) ) { |
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 | |
| /** | |
| * Adding a "Copyright" field to the media uploader $form_fields array | |
| * | |
| * @param array $form_fields | |
| * @param object $post | |
| * | |
| * @return array | |
| */ | |
| function add_copyright_field_to_media_uploader( $form_fields, $post ) { |
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
| // body auto scale | |
| jQuery(document).ready(function($){ | |
| if( window.outerWidth > 767 ){ | |
| $(window).on('resize',function(){ | |
| var baseW = 1920; | |
| var docW = window.outerWidth; | |
| var docH = $(document).height(); | |
| var ePos = $('.footerend').position().top; |
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
| // FullWidth Container JS | |
| function fullwidthInit(selector){ | |
| function fullWidth(selector){ | |
| $(selector).each(function(){ | |
| $(this).width("100%").css({ marginLeft : "-0px" }); | |
| var window_width = $(window).width(); | |
| var left_margin = "-"+$(this).offset().left+"px"; |
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 cart_empty_redirect_to_shop() { | |
| global $woocommerce; | |
| if ( is_page('cart') and !sizeof($woocommerce->cart->cart_contents) ) { | |
| wp_redirect( get_permalink( wc_get_page_id( 'shop' ) ) ); exit; | |
| } | |
| } | |
| add_action('template_redirect', 'cart_empty_redirect_to_shop'); |
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
| /*Responsive*/ | |
| /* | |
| ##Device = Desktops | |
| ##Screen = 1281px to higher resolution desktops | |
| */ | |
| @media (min-width: 1281px) { | |
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
| Afghanistan | |
| Albania | |
| Algeria | |
| Andorra | |
| Angola | |
| Antigua and Barbuda | |
| Argentina | |
| Armenia | |
| Australia | |
| Austria |