Skip to content

Instantly share code, notes, and snippets.

View flymke's full-sized avatar

Michael Schönrock flymke

View GitHub Profile
@flymke
flymke / functions.php
Created August 20, 2019 11:05
Find out file handles in WordPress
<?php
add_action( 'wp_head', 'check_jquery' );
add_action( 'admin_head', 'check_jquery' );
function check_jquery() {
global $wp_scripts;
global $wp_styles;
//foreach ( $wp_scripts->registered as $wp_script ) {
@flymke
flymke / index.html
Last active March 7, 2017 13:23
HTML5 Bootstrap Boilerplate
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang=""> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<?php
/**
* Class for sending tracking emails
* For reference on WC_Emails class see https://docs.woocommerce.com/wc-apidocs/class-WC_Emails.html
* @author: Michael Schönrock (ms@halloecho.de)
*/
class Tracking_Email extends WC_Emails {
public function generate_message($tracking_number, $customer_name) {
<?php
/**
* Script to send a WooCommerce tracking email to the client
* @author: Mike Schoenrock (ms@halloecho.de)
*/
// Load the WordPress Environment
// change that to where your wp-blog-header.php is located
require( dirname( __FILE__ ) . '../../../../../wp-blog-header.php' );
@flymke
flymke / class-statistics-survey.php
Last active November 30, 2015 09:57
Workaround to get array_column() working for older PHP Versions in Bolder Surveys Plugin (http://codecanyon.net/item/bolder-surveys-for-wordpress). The file you need to edit is located under bolder-surveys/includes/admin/class-statistics-survey.php.
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class Bolder_Survey_Statistics_Single {
/*
* Survey ID