Skip to content

Instantly share code, notes, and snippets.

Dalton Rooney daltonrooney

Block or report user

Report or block daltonrooney

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
daltonrooney / email.js
Created Nov 4, 2019
Email mailto link for Redactor
View email.js
//Based on with small improvements
(function ($R) {
$R.add('plugin', 'email', {
modals: {
// this is variable with modal HTML body
'emailmodal': '<form action=""><div class="form-item"><label>Email Address</label><input type="text" name="emailaddress"><label>Text</label><input type="text" name="anchortext"></div></form>'
// set translations
translations: {
en: {
daltonrooney / timezoneField.json
Created Oct 28, 2019
Craft CMS Field Manager Time Zone import
View timezoneField.json
"name":"Time Zone",
daltonrooney / form.js
Last active Sep 24, 2019
Craft CMS + Mailchimp signup form in Vue.js
View form.js
import Vue from 'vue'
import axios from 'axios'
const apiClient = axios.create({
baseURL: '',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
daltonrooney / calendar.js
Created Sep 6, 2019
Output calendar links from event in Vue.js
View calendar.js
var MS_IN_MINUTES = 60 * 1000;
var formatTime = function (date) {
date = new Date(date * 1000);
return date.toISOString().replace(/-|:|\.\d\d\d/g, "")
var calendarGenerators = {
google: function (event) {
var startTime = formatTime(event.start);
daltonrooney / change-class-on-scroll.html
Last active Dec 6, 2018 — forked from ohiosveryown/change-class-on-scroll.html
Vanilla JS – change/add class based on scroll position.
View change-class-on-scroll.html
// layout
// style
body { min-height: 200vh; }
nav {
daltonrooney / .htaccess
Created Sep 6, 2018 — forked from zulfajuniadi/.htaccess
Enable CORS via htaccess.
View .htaccess
Header add Content-Type "application/json"
Header add Access-Control-Allow-Methods "GET,HEAD,POST,PUT,DELETE,OPTIONS"
Header add Access-Control-Allow-Headers "Auth-Token,Content-Type"
Header add Access-Control-Allow-Origin "*"
daltonrooney / typekit.editor.php
Created Apr 17, 2017 — forked from mikemanger/typekit.editor.php
Add a TypeKit font to the TinyMCE editor in WordPress.
View typekit.editor.php
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;
daltonrooney / acf-migrate-db-pro.php
Last active Sep 19, 2019
Prevent ACF Pro license key from being overwritten during WP Migrate DB Pro migration
View acf-migrate-db-pro.php
Based on
class ACF_WP_Migrate_DB_Pro_Tweaks {
function __construct() {
add_filter( 'wpmdb_preserved_options', array( $this, 'preserved_options' ) );
daltonrooney / twig_file_date_extension.php
Created Feb 8, 2017 — forked from Stoffo/twig_file_date_extension.php
Twig Function to get the file mtime in template for HTTP Caching
View twig_file_date_extension.php
$function_filedate = new Twig_SimpleFunction(
* @param $file_path
* This function generates a new file path with the last date of filechange
* to support better better client caching via Expires header:
* i.e:
daltonrooney / gist:a68fd2d49f2e65cde83297b2484f6564
Created Jan 5, 2017 — forked from jchristopher/gist:9939849
SearchWP's list of common words (stopwords)
View gist:a68fd2d49f2e65cde83297b2484f6564
array( "a", "able", "above", "across", "after", "afterwards", "again", "against", "ago", "all",
"almost", "alone", "along", "already", "also", "although", "always", "am", "among", "amongst", "amoungst",
"amount", "an", "and", "another", "any", "anyhow", "anyone", "anything", "anyway", "anywhere", "are", "aren't",
"around", "as", "at", "back", "be", "became", "because", "become", "becomes", "becoming", "been", "before",
"beforehand", "behind", "being", "below", "beside", "besides", "between", "beyond", "both", "bottom", "but",
"by", "call", "can", "can't", "cannot", "cant", "co", "con", "could", "couldn't", "couldnt", "de", "did", "do",
"does", "don't", "done", "dont", "down", "due", "during", "each", "eg", "eight", "either", "eleven", "else",
"elsewhere", "empty", "enough", "etc", "etc.", "even", "ever", "every", "everyone", "everything", "everywhere",
You can’t perform that action at this time.