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 | |
// Add Variation Settings | |
add_action( 'woocommerce_product_after_variable_attributes', 'variation_settings_fields', 10, 3 ); | |
// Save Variation Settings | |
add_action( 'woocommerce_save_product_variation', 'save_variation_settings_fields', 10, 2 ); | |
/** | |
* Create new fields for variations |
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 | |
// Add New Variation Settings | |
add_filter( 'woocommerce_available_variation', 'load_variation_settings_fields' ); | |
/** | |
* Add custom fields for variations | |
* | |
*/ | |
function load_variation_settings_fields( $variations ) { |
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="woocommerce-variation-custom-text-field"> | |
{{{ data.variation.text_field }}} | |
</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
javascript:document.cookie="cookieNameGoesHere=; max-age=-1; path=/;";console.log("Popup cookie removed"); |
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
var args = process.argv.slice(2); | |
var epoch = Number(args[0]); | |
// you can use seconds or milliseconds | |
var length = args[0].toString().length; | |
if (length <= 10) { | |
epoch = epoch * 1000; | |
} | |
var myDate = new Date(epoch); |
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
var newsArticles = document.querySelectorAll('.desktop .newspanel .news-article'); | |
for (var i = 0; i < newsArticles.length; i++) { | |
(function() { | |
var element = newsArticles[i]; | |
element.addEventListener('animationend', function() { | |
var style = window.getComputedStyle(element); | |
var opacity = style.getPropertyValue('opacity'); | |
var selector = '.desktop .btn'; | |
var button = element.querySelector(selector); | |
if (opacity == 0.9) { |
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 | |
add_action( 'admin_bar_menu', 'show_template' ); | |
function show_template() { | |
$is_dev = strpos(getenv('APP_ENV'), 'dev') !== false; | |
if ($is_dev) { | |
global $template; | |
print_r( $template ); | |
} | |
} |
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
#!/bin/bash | |
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --app=http://mixes.beatport.com/dj/deepspacehouse/43 --profile-directory="Profile 1" |
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
update wp_posts set post_content = replace(post_content,'“','“'); | |
update wp_posts set `post_excerpt` = replace(post_excerpt,'“','“'); | |
update wp_postmeta set meta_value = replace(meta_value,'“','“'); | |
update wp_posts set post_content = replace(post_content,'’','’'); | |
update wp_posts set post_excerpt = replace(post_excerpt,'’','’'); | |
update wp_postmeta set meta_value = replace(meta_value,'’','’'); | |
update wp_posts set post_content = replace(post_content,'–','—'); | |
update wp_posts set `post_excerpt` = replace(post_excerpt,'–','—'); |
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
$("iframe.html5anim").load( function() { | |
$("iframe.html5anim").contents().find("head") | |
.append($("<style type='text/css'>#canvas{background-color:red!important;}</style>")); | |
}); |
OlderNewer