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 | |
require dirname(__FILE__).'/wp-blog-header.php'; | |
$wpdb->query("DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%')"); | |
$wpdb->query("DELETE FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%'"); | |
$wpdb->query("DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM wp_term_taxonomy)"); | |
$wpdb->query("DELETE FROM wp_term_relationships WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))"); | |
$wpdb->query("DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))"); | |
$wpdb->query("DELETE FROM wp_posts WHERE post_type IN ('product','product_variation')"); |
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
#in terminal with MAMP | |
/Applications/MAMP/Library/bin/mysql -u root -p {DB_NAME} < {PATH/TO/MYSQL/DUMP/FILE.SQL} |
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 | |
$var = 'test'; | |
include(locate_template( 'template-parts/loop-frontpage.php' )); | |
// then you can use $var in loop-frontpage.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
// helper | |
function throttle(fn, wait) { | |
var time = Date.now(); | |
return function() { | |
if ((time + wait - Date.now()) < 0) { | |
fn(); | |
time = Date.now(); | |
} | |
} | |
} |
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
.sk-circle { | |
margin: 100px auto; | |
width: 40px; | |
height: 40px; | |
position: relative; | |
} | |
.sk-circle .sk-child { | |
width: 100%; | |
height: 100%; | |
position: absolute; |
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="spinner"> | |
<div class="bounce1"></div> | |
<div class="bounce2"></div> | |
<div class="bounce3"></div> | |
</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
<?php | |
// this is the php part of the ajax call | |
// we define the nonce value for security | |
define('WP_FORM_NONCE_STR', 'awefaewf234@#$FSD'); | |
// we define action hooks so that WP knows which function needs to caled | |
// this is for loged in users | |
add_action("wp_ajax_uzl_subscr_form","uzl_subscr_form"); | |
// this is for non loged in users |
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
.dropcap > div:first-child:first-letter{ | |
float: left; | |
font-size: 6.2em; | |
line-height: 1.1em; | |
margin: -.15em .08em -.2em 0; | |
} |
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
@mixin display-grid { | |
display: -ms-grid; | |
display: grid; | |
} | |
@mixin grid-child ($col-start, $col-end, $row-start, $row-end) { | |
-ms-grid-column: $col-start; | |
-ms-grid-column-span: $col-end - $col-start; | |
-ms-grid-row: $row-start; | |
-ms-grid-row-span: $row-end - $row-start; |
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
/* mixins for text underline */ | |
@mixin text-underline-crop($background) { | |
text-shadow: .03em 0 $background, | |
-.03em 0 $background, | |
0 .03em $background, | |
0 -.03em $background, | |
.06em 0 $background, | |
-.06em 0 $background, | |
.09em 0 $background, | |
-.09em 0 $background, |