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 | |
add_filter( 'woocommerce_product_tabs', 'choosy_rename_woo_tabs', 98 ); | |
/** | |
* Rename WooCommerce product tabs | |
* | |
* @author Joe Dooley | |
* @param tabs | |
* | |
*/ |
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 | |
add_filter( 'woocommerce_product_tabs', 'choosy_new_woo_product_tab' ); | |
/** | |
* Create new WooCommerce product tabs | |
* | |
* @author Joe Dooley | |
* @param tabs | |
* | |
*/ |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
/** | |
* Optimize WooCommerce Scripts | |
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
*/ | |
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
function child_manage_woocommerce_styles() { | |
//remove generator meta tag |
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
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); |
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
add_filter( 'woocommerce_sale_price_html', 'woocommerce_custom_sales_price', 10, 2 ); | |
function woocommerce_custom_sales_price( $price, $product ) { | |
$percentage = round( ( ( $product->regular_price - $product->sale_price ) / $product->regular_price ) * 100 ); | |
return $price . sprintf( __(' Save %s', 'woocommerce' ), $percentage . '%' ); | |
} |
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
function mw_theme_categories( $context ) | |
{ | |
$args = array( 'taxonomy' => 'product_cat' ); | |
$terms = wp_get_post_terms( $context['post']->ID ,'product_cat', $args ); | |
foreach ($terms as $cat) { | |
if($cat->parent == 0){ | |
$out = '<div class="prodLabel prodLabel--' . strtolower( $cat->name ) . '">'; | |
$out .= "<a href='/product-category/$cat->slug'>$cat->name</a>"; | |
$out .= '</div>'; | |
echo $out; |
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
'use strict'; | |
var gulp = require('gulp'), | |
connect = require('gulp-connect'), | |
gulpLoadPlugins = require('gulp-load-plugins'), | |
cleanhtml = require('gulp-cleanhtml'), | |
dev = require('gulp-dev'), | |
browserSync = require('browser-sync'), | |
plugins = gulpLoadPlugins(), | |
webpack = require('webpack'), |
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 /* Template Name: Login Page AA */ ?> | |
<?php get_header(); ?> | |
<!-- section --> | |
<section class="aa_loginForm"> | |
<?php global $user_login; | |
if(isset($_GET['login']) && $_GET['login'] == 'failed') | |
{ |
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
scss_files: "assets/sass/*.scss" | |
linters: | |
BangFormat: | |
enabled: true | |
space_before_bang: true | |
space_after_bang: false | |
BorderZero: | |
enabled: false | |
convention: zero | |
ColorKeyword: |