Skip to content

Instantly share code, notes, and snippets.

View haet's full-sized avatar

Hannes Etzelstorfer haet

View GitHub Profile
@haet
haet / demo.php
Created June 25, 2012 13:19
sneak.vu php-curl api
<?php
require_once('sneakvu.php');
?>
<html>
<head>
<title>
sneak.vu demo page
</title>
#!/bin/bash
# Install script for Latest WordPress by Johnathan Williamson - extended by Don Gilbert
# Disclaimer: It might not bloody work
# Disclaimer 2: I'm not responsible for any screwups ... :)
# DB Variables
echo "MySQL Host:"
read mysqlhost
export mysqlhost
@haet
haet / de.po
Created June 20, 2014 09:14
Paid membership Pro German translation
# This file was generated by WPML
# WPML is a WordPress plugin that can turn any WordPress or WordPressMU site into a full featured multilingual content management system.
# https://wpml.org
msgid ""
msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
<?php session_start(); ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CleverReach Salutation</title>
<!-- Latest compiled and minified CSS -->
@haet
haet / functions.php
Last active March 21, 2019 13:39
Add custom Placeholder / Shortcode to Mailbuilder
<?php
add_filter( 'haet_mail_placeholder_menu', 'add_mailbuilder_placeholder' );
add_filter( 'haet_mail_order_placeholders', 'populate_mailbuilder_placeholder', 10, 3 );
function add_mailbuilder_placeholder( $placeholder_menu ){
if( is_array( $placeholder_menu ) ){
$placeholder_menu[] = array(
'text' => 'My Placholder Name',
'tooltip' => '[MY_PLACEHOLDER]',
);
@haet
haet / functions.php
Last active October 4, 2018 09:29
Add custom CSS to WP HTML Mail WordPress E-Mails
/**
* Add custom CSS to WP HTML Mail WordPress E-Mails
*/
add_filter( 'haet_mail_modify_styled_mail', function( $email_html ){
$custom_css = '
.container-padding{
padding-left: 60px;
padding-right: 0;
}
@haet
haet / functions.php
Created March 21, 2019 14:07
Add coupons codes to your WooCommerce emails using WP HTML Mail
add_filter( 'haet_mail_placeholder_menu', 'add_mailbuilder_coupons_placeholder' );
add_filter( 'haet_mail_order_placeholders', 'populate_mailbuilder_coupons_placeholder', 10, 3 );
function add_mailbuilder_coupons_placeholder( $placeholder_menu ){
if( is_array( $placeholder_menu ) ){
$placeholder_menu[] = array(
'text' => 'Coupons',
'tooltip' => '[COUPONS]',
);
}
return $placeholder_menu;
@haet
haet / functions.php
Created March 27, 2019 14:25
disable email template for multiple subjects
add_filter( 'haet_mail_use_template', 'customize_template_usage', 10, 2 );
function customize_template_usage( $use_template, $mail ){
if( strpos( $mail['subject'], 'Subject 1' ) !== false
|| strpos( $mail['subject'], 'Subject 2' ) !== false
|| strpos( $mail['subject'], 'Subject 3' ) !== false )
return false;
return $use_template;
}
// if you know the exact subject line you can also use == instead of strpos():