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
// Adding Custom Redirection field in LD Courses | |
add_filter( 'learndash_post_args', 'add_topic_option' ); | |
function add_topic_option( $post_args ) { | |
// New Course field to add redirection link. | |
$redirect_on_completion = array( | |
'redirect_on_completion' => array( | |
'name' => __( 'Redirect on Completion', 'learndash' ), | |
'type' => 'text', | |
'initial_options' => '', |
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 new custom font to Font Family selection in icon box module | |
function zeckart_add_new_icon_set_to_iconbox( ) { | |
$param = WPBMap::getParam( 'vc_icon', 'type' ); | |
$param['value'][__( 'IcoMoon', 'total' )] = 'icomoon'; | |
vc_update_shortcode_param( 'vc_icon', $param ); | |
} | |
add_filter( 'init', 'zeckart_add_new_icon_set_to_iconbox', 40 ); |
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
/* warning not yet stable.. messed up on video results pages.. need to fix.. */ | |
div.g .r a { | |
pointer-events:none | |
} | |
div.g a h3 { | |
pointer-events:all!important | |
} | |
div.g h3 { | |
transform:translateY(-22px) translateX(-1px); |
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
/** | |
* Filter the home page posts, and remove any featured post ID's from it. Hooked | |
* onto the 'pre_get_posts' action, this changes the parameters of the query | |
* before it gets any posts. | |
* | |
* @global array $featured_post_id | |
* @param WP_Query $query | |
* @return WP_Query Possibly modified WP_query | |
* http://developer.wordpress.com/2012/05/14/querying-posts-without-query_posts/ | |
*/ |
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
// Font Smoothie copyright 2013,14,15 Torben Haase <http://pixelsvsbytes.com> | |
// Source-URL <https://gist.github.com/letorbi/5177771> | |
// | |
// Font Smoothie is free software: you can redistribute it and/or modify it under | |
// the terms of the GNU Lesser General Public License as published by the Free | |
// Software Foundation, either version 3 of the License, or (at your option) any | |
// later version. | |
// | |
// Font Smoothie is distributed in the hope that it will be useful, but WITHOUT | |
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
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 the options +tags to the listed products attributes --> | |
{% if p.options[0] == 'Color' %}{% capture colours %}{% for variant in p.variants %}{% unless forloop.first %},{% endunless %}{{ variant.options[0] }}{% endfor %}{% endcapture %}{% endif %} | |
{% if p.options[1] == 'Material' %}{% capture materials %}{% for variant in p.variants %}{% unless forloop.first %},{% endunless %}{{ variant.options[1] }}{% endfor %}{% endcapture %}{% endif %} | |
{% if p.options[2] == 'Style' %}{% capture styles %}{% for variant in p.variants %}{% unless forloop.first %},{% endunless %}{{ variant.options[2] }}{% endfor %}{% endcapture %}{% endif %} | |
{% if p.tags %}{% capture tagg %}{% for tag in p.tags %}{% if tag contains 'recommended:' %}{% unless forloop.first %},{% endunless %}{{ tag | replace: 'recommended:', '' }}{% endif %}{% endfor %}{% endcapture %}{% endif %} | |
<div class="product" data-colours="{{ colours | escape }}" data-materials="{{ materials | escape }}" data-styles="{{ styles | escape }}" data-tags="{{ tagg | esc |
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 to head of your theme.liquid after moving the files into the assets folder | https://www.woothemes.com/flexslider/ --> | |
<!-- add only if you theme is not already including Jquery--> | |
{{ '//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js' | script_tag }} | |
<!-- FLEX Slider css and .js --> | |
{{ 'flexslider.css' | asset_url | stylesheet_tag }} | |
{{ 'jquery.flexslider.js' | asset_url | script_tag }} | |
<!-- | |
add to schema json |
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 tooltip to cvc field | |
function custom_credit_card_fields_cis_cc ($cc_fields , $payment_id){ | |
$cc_fields['card-cvc-field'] = str_replace('<p class="form-row form-row-last">','<p class="form-row form-row-last" title="3-digit security code usually found on the back of your card. American Express cards have a 4-digit code located on the front.">',$cc_fields['card-cvc-field']); | |
return $cc_fields; | |
} | |
add_filter( 'woocommerce_credit_card_form_fields' , 'custom_credit_card_fields_cis_cc' , 10, 2 ); |
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
/** | |
* Luhn algorithm in JavaScript: validate credit card number supplied as string of numbers | |
* @author ShirtlessKirk. Copyright (c) 2012. | |
* @license WTFPL (http://www.wtfpl.net/txt/copying) | |
*/ | |
var luhnChk = (function (arr) { | |
return function (ccNum) { | |
var | |
len = ccNum.length, | |
bit = 1, |
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 | |
/** | |
* [list_searcheable_acf list all the custom fields we want to include in our search query] | |
* @return [array] [list of custom fields] | |
*/ | |
function list_searcheable_acf(){ | |
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF"); | |
return $list_searcheable_acf; | |
} |
NewerOlder