This file contains 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 | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
This file contains 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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Redirect</title> | |
<script type="text/javascript"> // <![CDATA[ | |
//iPhone Version: | |
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) { | |
window.location = "http://goo.gl/IWd7J"; | |
} |
This file contains 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
//* Make Font Awesome available | |
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' ); | |
function enqueue_font_awesome() { | |
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css' ); | |
} | |
/** | |
* Place a cart icon with number of items and total cost in the menu bar. |
This file contains 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
/** | |
* Auto update cart after quantity change | |
* | |
* @return string | |
**/ | |
add_action( 'woocommerce_after_cart', 'custom_after_cart' ); | |
function custom_after_cart() { | |
echo '<script> | |
jQuery(document).ready(function($) { |
This file contains 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 | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/* Create a Yoast SEO sitemap for a custom post type | |
* Credit: Team Yoast | |
* Last Tested: Unknown | |
* Documentation: https://developer.yoast.com/features/xml-sitemaps/api/#add-a-custom-post-type | |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | |
* HOW TO USE | |
* Replace TYPE with your custom type |
This file contains 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 | |
/* | |
Support WPML - 25/02/2019 | |
/* | |
function devvn_product_category_base_same_shop_base( $flash = false ){ | |
global $sitepress; | |
$languages = icl_get_languages('skip_missing=0&orderby=code'); | |
if($languages && !empty($languages)){ | |
$original_lang = ICL_LANGUAGE_CODE; | |
foreach($languages as $key=>$lang) { |