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
/** | |
* load csv | |
*/ | |
add_action("init", "download_csv"); | |
function download_csv() { | |
if (isset($_POST['download_csv'])) { | |
function outputCsv( $fileName, $assocDataArray ) { |
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 mail = $('input[type=email]').val(); | |
//username is public API Key | |
var url = "https://bpi.briteverify.com/emails.json?address="+mail+"&username=772454564564564564564563"; | |
$.ajax({ | |
url: url, | |
dataType: "jsonp", | |
success: function(data){ | |
var status = data.status; | |
$('input[type=email]').addClass(status); | |
if(status === 'valid') { |
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
window.history.replaceState({}, document.title, "?variant=" + variant.id); |
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_product_add_to_cart_text' , 'custom_woocommerce_product_add_to_cart_text' ); | |
function custom_woocommerce_product_add_to_cart_text() { | |
global $product; | |
$product_type = $product->get_type(); | |
switch ( $product_type ) { | |
case 'external': | |
return __( 'Take me to their site!', 'woocommerce' ); | |
break; |
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
function mailTo ( $emails, $subject, $message ) { | |
$mail = new PHPMailer; | |
$mail->isSMTP(); | |
$mail->isHTML(true); | |
$mail->setFrom( SITE_EMAIL, SITE_NAME ); | |
$mail->Host = 'smtp.gmail.com'; | |
$mail->SMTPAuth = true; | |
$mail->Username = SMTP_LOGIN; | |
$mail->Password = SMTP_PASS; |
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
// Setting the Post ID in a variable for which the content is required | |
$the_postid = 20; | |
$the_post_content = get_post($the_postid); | |
$content = $the_post_content->post_content; | |
$content = apply_filters('the_content', $content); | |
$content = str_replace(']]>', ']]>', $content); | |
// Print Content data or further use it as required | |
echo $content; |
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 highest_index = 0, | |
elements = document.getElementsByTagName('*'); | |
for (var i = 0; i < elements.length - 1; i++) { | |
if (parseInt(elements[i].style.zIndex) > highest_index) { | |
highest_index = parseInt(elements[i].style.zIndex); | |
}; | |
}; | |
var zIndex = highest_index + 10; |
NewerOlder