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 | |
| /** | |
| * Change Admin URL | |
| * | |
| * Copyright (C) 2010 hakre <http://hakre.wordpress.com/> | |
| * | |
| * This program is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU Affero General Public License as | |
| * published by the Free Software Foundation, either version 3 of the | |
| * License, or (at your option) any later version. |
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 | |
| /** | |
| * Get all type posts | |
| * | |
| * @return void | |
| * @author alispx/dompl | |
| **/ | |
| function alispx_get_type_posts_data($post_type = 'post') | |
| { |
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
| "use strict"; | |
| // Load plugins | |
| const autoprefixer = require("autoprefixer"); | |
| const browsersync = require("browser-sync").create(); | |
| const cp = require("child_process"); | |
| const cssnano = require("cssnano"); | |
| const del = require("del"); | |
| const eslint = require("gulp-eslint"); | |
| const gulp = require("gulp"); |
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 | |
| /** | |
| * Remove WooCommerce flexslider script & product gallery slider | |
| */ | |
| function wpb_wiz_after_theme_setup(){ | |
| remove_theme_support( 'wc-product-gallery-slider' ); | |
| } | |
| add_action( 'after_setup_theme', 'wpb_wiz_after_theme_setup', 99 ); |
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 | |
| /** | |
| * Plugin Name: WooCommerce Remove Billing Fields for Free Virtual Products | |
| * Plugin URI: https://gist.github.com/BFTrick/7873168 | |
| * Description: Remove the billing address fields for free virtual orders | |
| * Author: Patrick Rauland | |
| * Author URI: http://patrickrauland.com/ | |
| * Version: 2.0 | |
| * | |
| * This program is free software: you can redistribute it and/or modify |
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 | |
| /** | |
| * Loop Add to Cart -- with quantity and AJAX | |
| * requires associated JavaScript file qty-add-to-cart.js | |
| * | |
| * @link http://snippets.webaware.com.au/snippets/woocommerce-add-to-cart-with-quantity-and-ajax/ | |
| * @link https://gist.github.com/mikejolley/2793710/ | |
| */ | |
| // add this file to folder "woocommerce/loop" inside theme |
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
| // Ensure cart contents update when products are added to the cart via AJAX (place the following in functions.php). | |
| // Used in conjunction with https://gist.github.com/DanielSantoro/1d0dc206e242239624eb71b2636ab148 | |
| add_filter('add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment'); | |
| function woocommerce_header_add_to_cart_fragment( $fragments ) { | |
| global $woocommerce; | |
| ob_start(); | |
| ?> |
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 class="cart-customlocation" href="<?php echo wc_get_cart_url(); ?>" title="<?php _e( 'View your shopping cart' ); ?>"><?php echo sprintf ( _n( '%d item', '%d items', WC()->cart->get_cart_contents_count() ), WC()->cart->get_cart_contents_count() ); ?> - <?php echo WC()->cart->get_cart_total(); ?></a> |
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
| /** | |
| * Slick | |
| */ | |
| ;(function($) { | |
| $('.slick').slick({ | |
| infinite: false, | |
| dots: true, | |
| customPaging: function(slider, i) { |
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 valueToPlaceHolder(divId){ | |
| // this function creates a placeholder based on the attribute 'value' of this same input text field | |
| //once done, it removes the 'value' attribute | |
| // it is useful for cforms II plugin cos placholder are not available, while default value attr are | |
| // THIS : | |
| // <input xxx value="Prénom - First name" xxx> | |
| // would return : | |
| // <input xxx placeholder="Prénom - First name" xxx> | |
| // see http://stackoverflow.com/questions/11432144/change-value-to-placeholder-input-field | |
| if( document.getElementById(divId) ){ |
NewerOlder