Skip to content

Instantly share code, notes, and snippets.

@vvaz
vvaz / travelfantastic.css
Created April 6, 2018 11:12
Aligning images in travelfantastic
.woocommerce-posts-wrapper ul.products li.product img {
margin: 0 auto;
}
@vvaz
vvaz / osx-for-hackers.sh
Created February 24, 2016 10:59 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
<FilesMatch "^(wp-cron\.php)">
Order Allow,Deny
Deny from all
# Below is a list of MailPoet Cron servers
Allow from 178.79.184.115
Allow from 178.79.177.216
Allow from 176.58.113.125
Allow from 212.71.252.46
Allow from 212.111.41.181
Allow from 88.80.184.58
function mailpoet_enable_wpmail(){
if(class_exists('WYSIJA')){
$model_config = WYSIJA::get('config','model');
$model_config->save(array('allow_wpmail' => true));
}
}
add_action('init', 'mailpoet_enable_wpmail');
UPDATE wp_wysija_user as A
JOIN (
SELECT user_id
FROM wp_wysija_email_user_stat
GROUP BY user_id
HAVING SUM(status) <= 0
) B ON A.user_id = B.user_id
SET A.status = -1
<?php
/**
* function to return an undo unsbscribe string for MailPoet newsletters
* you could place it in the functions.php of your theme
* @return string
*/
function mpoet_get_undo_unsubscribe(){
if(class_exists('WYSIJA') && !empty($_REQUEST['wysija-key'])){
$undo_paramsurl = array(
jQuery(document).ready(function($) {
var unique = $('.wysija-checkbox');
$(unique).click(function() {
$(unique).prop('checked', false );
$(this).prop('checked', true);
});
});