View wc-block-product.php
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
// Source: https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/891#issuecomment-568752116 | |
// ========================================= | |
function _wc_get_template_part_str($template_name, $part_name=null) { | |
ob_start(); | |
wc_get_template_part($template_name, $part_name); | |
$var = ob_get_contents(); | |
ob_end_clean(); | |
return $var; | |
} |
View SVGicon.js
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
import React from "react"; | |
const getPath = (name, props) => { | |
switch (name) { | |
case "user": | |
return ( | |
<path | |
{...props} | |
d="M12 2C9.243 2 7 4.243 7 7s2.243 5 5 5 5-2.243 5-5S14.757 2 12 2zM12 10c-1.654 0-3-1.346-3-3s1.346-3 3-3 3 1.346 3 3S13.654 10 12 10zM21 21v-1c0-3.859-3.141-7-7-7h-4c-3.86 0-7 3.141-7 7v1h2v-1c0-2.757 2.243-5 5-5h4c2.757 0 5 2.243 5 5v1H21z" | |
/> |
View add-remove-hover.js
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
// Source: https://css-tricks.com/snippets/jquery/addingremoving-class-on-hover/ | |
$('#elm').hover( | |
function(){ $(this).addClass('hover') }, | |
function(){ $(this).removeClass('hover') } | |
) |
View SassMeister-input.scss
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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
@import 'susy'; | |
$susy: ( | |
columns: 12, | |
column-width: 5em, | |
); |