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 cs_add_to_cart_text( $text ) { | |
return __( 'Orçar' ); | |
} | |
// Loop. | |
add_filter( 'woocommerce_product_add_to_cart_text', 'cs_add_to_cart_text' ); | |
// Single. | |
add_filter( 'woocommerce_product_single_add_to_cart_text', 'cs_add_to_cart_text' ); |
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 custom_variable_price_html( $price, $product ) { | |
$price = ''; | |
if ( ! $product->min_variation_price || $product->min_variation_price !== $product->max_variation_price ) { | |
$price .= '<span class="from">' . __( 'A partir de' ) . ' </span>'; | |
} | |
$price .= woocommerce_price( $product->get_price() ); | |
if ( $product->max_variation_price && $product->max_variation_price !== $product->min_variation_price ) { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<!-- Generated by: TmTheme-Editor --> | |
<!-- ============================================ --> | |
<!-- app: http://tmtheme-editor.herokuapp.com --> | |
<!-- code: https://github.com/aziz/tmTheme-Editor --> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>Mattia Astorino</string> |
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 | |
//wp_localize_script by default passes everything in as strings so for booleans and integers when being referenced in your javascript you need to do some trickery | |
//Example 1 - passing in booleans as strings | |
$options = get_option('ng_slicknavmenu'); | |
// Add PHP plugin variables to the $params[] array to pass to jQuery | |
$data = array ( | |
'ng_slicknav_menu' => $options['ng_slicknav_menu'], | |
'ng_slicknav_position' => $options['ng_slicknav_position'], |
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
/** | |
* Helper function for responsive jQuery Spectragram | |
* @require - jquery-spectragram.js plugin - https://github.com/adrianengine/jquery-spectragram | |
*/ | |
// Target the spectragram's wrapper as per the plugin's docs: | |
var insta = jQuery('#instagram_feed'); | |
// Check for the wrapper's presence in the DOM | |
if (insta.length) { | |
!function(a){jQuery.fn.responsiveInstagram=function(b){var c,d,e,f=a(this),g=a(window).width();return e={width:610,extraHeight:80,breakpoint:620},b=a.extend(e,b),g<=b.breakpoint?f.css("width","100%"):f.css("width",b.width.toString(10)+"px"),c=f.width(),d=Math.round(c+b.extraHeight),f.css("height",d.toString(10)+"px"),this}}(jQuery); |
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 | |
/** | |
* Shortcodes class | |
* | |
* @author Your Inspiration Themes | |
* @package YITH WooCommerce Wishlist | |
* @version 1.1.5 | |
*/ | |
if ( ! defined( 'YITH_WCWL' ) ) { exit; } // Exit if accessed directly |
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 echo file_get_contents( get_stylesheet_directory_uri() . '/img/icons/your-logo-file.svg' ); ?> |
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 media query that captures: */ | |
/* */ | |
/* - Retina iOS devices */ | |
/* - Retina Macs running Safari */ | |
/* - High DPI Windows PCs running IE 8 and above */ | |
/* - Low DPI Windows PCs running IE, zoomed in */ | |
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */ | |
/* - Android hdpi devices and above */ |
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 | |
/** | |
* Custom nav walker | |
* | |
* Custom nav walker to assign icons to menu items. | |
*/ | |
class FA_Icon_Walker extends Walker_Nav_Menu | |
{ | |
/** |
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 | |
add_filter( 'woocommerce_available_payment_gateways', 'filter_gateways', 1); | |
function filter_gateways( $gateways ) { | |
$method = WC()->session->get( 'chosen_shipping_methods' ); | |
// get the value of the radio button on the checkout page | |
if ( 'flat_rate:1' != $method[0] ) { | |
unset( $gateways['paypal'] ); | |
} |