Skip to content

Instantly share code, notes, and snippets.

@marcusig
marcusig / current-layer-only.css
Created January 12, 2022 15:44
Only show the image of the currently opened layer
.mkl_pc .mkl_pc_container .mkl_pc_viewer .mkl_pc_layers *:not(.current_layer) {
opacity: 0;
}
@marcusig
marcusig / float-show-price-and-add-to-cart-on-mobile.css
Last active May 16, 2022 05:38
FLOAT - Show price and add to cart on mobile
@media (max-width: 660px) {
.mkl_pc .mkl_pc_container .mkl-pc-show-form {
display: none;
}
.mkl_pc .mkl_pc_container footer .form.form-cart {
position: relative;
padding: 0;
background: transparent;
box-shadow: none;
border-radius: 0;
@kingkool68
kingkool68 / cache-busting-file-src.php
Last active March 25, 2019 08:48
Replace the `ver` query arg with the file's last modified timestamp (WordPress CSS/JS Cache Busting)
<?php
/**
* Replace the `ver` query arg with the file's last modified timestamp
*
* @param string $src URL to a file
* @return string Modified URL to a file
*/
function filter_cache_busting_file_src( $src = '' ) {
global $wp_scripts;
// If $wp_scripts hasn't been initialized then bail.
@bahia0019
bahia0019 / hex-to-rgba.php
Created September 20, 2018 21:23
Convert Hex string to RGBA
<?php
/**
* Take Accent color, and convert it to RGBA, and add an opacity of .75.
*/
$accent = get_theme_mod( 'site_accent_color' );
$accent_string = ltrim( $accent, '#' );
$arr = str_split( $accent_string, '2' );
foreach ( $arr as $value ) {
$new_value = hexdec( $value ) . ', ';