Grid, flex & background patterns
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 | |
/** | |
* By default, cURL sends the "Expect" header all the time which severely impacts | |
* performance. Instead, we'll send it if the body is larger than 1 mb like | |
* Guzzle does. | |
*/ | |
function add_expect_header(array $arguments) | |
{ | |
$arguments['headers']['expect'] = !empty($arguments['body']) && strlen($arguments['body']) > 1048576 ? '100-Continue' : ''; |
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
<section class="pen"> | |
<div class="panel top"> | |
<h1>Animate: background-position</h1> | |
</div> | |
<div class="panel bottom"> | |
<h1>Animate: translate3d</h1> | |
<div class="scroll"></div> | |
</div> | |
</section> |
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
.container | |
img(src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/221808/sky.jpg").background | |
p.message all your dreams can come true<br>if you have the courage to pursue them | |
- for (i = 1; i <= 100; i++) | |
.circle-container | |
.circle |
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
<div class="bg"></div> | |
<div class="bg bg2"></div> | |
<div class="bg bg3"></div> | |
<div class="content"> | |
<h1>Sliding Diagonals Background Effect</h1> | |
</div> |
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
define('WP_HOME', 'http://www.example.com'); | |
define('WP_SITEURL', 'http://www.example.com');` | |
define('FS_CHMOD_FILE', 0644); | |
define('FS_CHMOD_DIR', 0755); ` | |
define( 'WP_DEBUG', false); | |
//define( 'WP_DEBUG_LOG', true ); | |
//define( 'WP_DEBUG_DISPLAY', 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
//* http://gasolicious.com/remove-tabs-keep-product-description-woocommerce/ | |
// Location: add to functions.php | |
// Output: removes woocommerce tabs | |
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 ); |
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_get_price_html', 'bdev_display_sale_price_and_percentage_html', 10, 2 ); | |
function bdev_display_sale_price_and_percentage_html( $price, $product ) { | |
// sale products on frontend excluding variable products | |
if( $product->is_on_sale() && ! is_admin() && $product->is_type('simple')) { | |
// product prices | |
$regular_price = (float) $product->get_regular_price(); | |
$sale_price = (float) $product->get_price(); |
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_action( 'woocommerce_variation_options_pricing', 'bdev_add_variation_msrp', 11, 3 ); | |
function bdev_add_variation_msrp( $loop, $variation_data, $variation ){ | |
woocommerce_wp_text_input( array( | |
'id' => '_msrp_'.$loop, | |
'wrapper_class' => 'form-row form-row-first', | |
'class' => 'short wc_input_price', | |
'label' => __( 'RRP / MSRP', 'woocommerce' ) . ' (' . get_woocommerce_currency_symbol() . ')', | |
'value' => str_replace('.', ',', get_post_meta($variation->ID, '_msrp', true)), | |
'data_type' => 'price', | |
) ); |
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
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 ); | |
remove_action( 'woocommerce_simple_add_to_cart', 'woocommerce_simple_add_to_cart', 30 ); | |
remove_action( 'woocommerce_grouped_add_to_cart', 'woocommerce_grouped_add_to_cart', 30 ); |
NewerOlder