Skip to content

Instantly share code, notes, and snippets.

@mikemanger
mikemanger / th_shipping_options.php
Last active March 12, 2018 15:50 — forked from VjWoo/th_shipping_options.php
Shipping Options plugin
<?php
/*
Plugin Name: TH Shipping Options
Plugin URI: NA
Description: TH Shipping Options plugin
Version: 1.0.0
Author: Vj
Author URI: www.wooforce.com
*/
@mikemanger
mikemanger / typekit.editor.php
Last active March 8, 2020 00:39 — forked from tomjn/typekit.editor.php
Add a TypeKit font to the TinyMCE editor in WordPress.
add_filter( 'mce_external_plugins', 'my_theme_mce_external_plugins' );
function my_theme_mce_external_plugins( $plugin_array ) {
$plugin_array['typekit'] = get_template_directory_uri() . '/typekit.tinymce.js';
return $plugin_array;
}
@mikemanger
mikemanger / .maintenance
Last active September 14, 2021 02:26
Example WordPress .maintenance file. maintenance.php is optional but useful for styling the message the public will see (it is also used when updating WordPress conponments), drop it in your wp-content folder.
<?php
function is_user_logged_in() {
$loggedin = false;
foreach ( (array) $_COOKIE as $cookie => $value ) {
if ( stristr( $cookie, 'wordpress_logged_in_' ) ) {
$loggedin = true;
}
}
return $loggedin;
}
@mikemanger
mikemanger / YTD Strava Metrics
Last active May 3, 2024 01:03
YTD Strava Metrics
Running 470.86 km ████████████▌░░░░░░ 10.93/h
Cycling 239.39 km ██████▍░░░░░░░░░░░░ 25.15/h