Skip to content

Instantly share code, notes, and snippets.

View kreamweb's full-sized avatar

Emanuela Antonina Castorina kreamweb

  • Kream di Emanuela Castorina
  • Acicatena (CT) - Italy
View GitHub Profile
@kreamweb
kreamweb / form search
Created November 22, 2013 18:24
Wordpress search form + Clear text Field
@kreamweb
kreamweb / gist:7605112
Last active December 29, 2015 03:08
twitter cycle
jQuery('document').ready(function(){
jQuery('#twitter_update_list').cycle({
fx: 'scrollHorz',
timeout: 5000,
prev: '#prev',
next: '#next',
easing: 'easeInOutBack',
cleartypeNoBg: true
});
@kreamweb
kreamweb / functions.php
Created January 14, 2016 08:14
Change text browse list in YITH WooCommerce Request a Quote
<?php
add_filter('ywraq_product_added_view_browse_list', 'ywraq_change_browse_list');
function ywraq_change_browse_list( $text ){
$text = "View the list";
return $text;
}
@kreamweb
kreamweb / functions.php
Created January 19, 2016 09:32
Change text 'Prodcut Added' in YITH WooCommerce Request a Quote
<?php
add_filter('yith_ywraq_product_added_to_list_message', 'ywraq_change_product_added');
function ywraq_change_product_added( $text ){
$text = "Done!";
return $text;
}
@kreamweb
kreamweb / functions.php
Created January 28, 2016 08:54
Keep list in YITH WooCommerce Request a Quote after sent the request
<?php
if( defined( 'YITH_YWRAQ_PREMIUM' ) ){
add_filter( 'ywraq_clear_list_after_send_quote', 'ywraq_clear_list_after_send_quote', 10, 2);
function ywraq_clear_list_after_send_quote( $clear, $raq ){
return false;
}
}
@kreamweb
kreamweb / functions.php
Created January 28, 2016 14:38
YITH WooCommerce Social Login Wp Engine Fix
<?php
function ywsl_process_login_start()
{
setcookie( LOGGED_IN_COOKIE, md5(rand()), time()+15, preg_replace('|https?://[^/]+|i', '', YITH_YWSL_HYBRID_URL ) );
}
add_filter( 'ywsl_process_login_start', 'ywsl_process_login_start' );
?>
@kreamweb
kreamweb / functions.php
Created March 4, 2016 15:25
Change order of search in woocommerce
<?php
add_filter('woocommerce_get_catalog_ordering_args', 'ywcas_woocommerce_catalog_orderby');
function ywcas_woocommerce_catalog_orderby( $args ) {
$args['orderby'] = 'meta_value';
$args['order'] = 'asc';
$args['meta_key'] = '_sku';
return $args;
@kreamweb
kreamweb / functions.php
Last active March 16, 2016 14:41
YITH WooCommerce Subscription add list of all renew in the order status list
<?php
///Renewal subscription
add_filter( 'views_edit-shop_order', 'yith_add_renewal_subscription' );
function yith_add_renewal_subscription( $views ) {
$post_status = wc_get_order_statuses();
$args = array(
'post_type' => 'shop_order',
@kreamweb
kreamweb / functions.php
Created May 11, 2016 09:49
change the label to the button "Quote" in Remy Theme
<?php
add_filter( 'ywraq_product_add_to_quote', 'custom_quote_button_text', 12, 1 );
/**
* Change the label to the button "Quote" in Remy Theme
* @param $default
*
* @return string
*/
@kreamweb
kreamweb / frontend.js
Last active May 26, 2016 12:25
this code fix the problem of update the quantity automatically when the theme use a different quantity field
var request;
$(document).on( 'click', '.product-quantity input', function(e){
if( typeof request !== 'undefined' ){
request.abort();
}
var $t = $(this),
$input_quantity = $t.closest('.product-quantity').find('.input-text.qty'),
name = $input_quantity.attr('name'),