Skip to content

Instantly share code, notes, and snippets.

@trevorgreenleaf
trevorgreenleaf / tweets.redactor.js
Created January 9, 2019 23:36 — forked from chekalsky/tweets.redactor.js
Imperavi Redactor Plugin for Embedding Tweets Usage: mention "tweets" in "plugins" setting of you redactor.
/**
* Imperavi Redactor Plugin for Embedding Tweets
* for version >= 9.1
*
* @author Ilya Chekalskiy <ilya@chekalskiy.ru>
* @version 0.2.2
*/
if (typeof RedactorPlugins === 'undefined') var RedactorPlugins = {};
RedactorPlugins.tweets = {
@trevorgreenleaf
trevorgreenleaf / imagick3.4.3-PHP7.1-forge.sh
Created April 11, 2018 16:34 — forked from jacobmllr95/imagick3.4.3-PHP7.1-forge.sh
Install Imagick 3.4.3 on PHP 7.1 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.3.tgz
tar xvzf imagick-3.4.3.tgz
#!/bin/bash
# Installation script for a Wordpress 3.0 website on Ubuntu 10.04
#
# Josh Kersey
# Created: May 15, 2012
# Last Update: June 13, 2012
# get setup parameters
echo "apache vhost name (one word):"
@trevorgreenleaf
trevorgreenleaf / scripts.js
Last active September 1, 2015 02:32
jQuery: Start Project
(function($) {
// Lets Begin :)
})(jQuery);
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
/* Extra Small Devices, Phones */
@media only screen and (min-width : 480px) {
// Add Twitter, Facebook and Google+ field to contact methods, remove AIM, YIM and Jabber
add_filter( 'user_contactmethods', 'ts_add_contact_fields' );
function ts_add_contact_fields( $contactmethods ) {
$contactmethods['linkedin'] = 'LinkedIn';
$contactmethods['twitter'] = 'Twitter';
$contactmethods['facebook'] = 'Facebook';
$contactmethods['googleplus'] = 'Google+';
<?php
/**
Plugin Name: User Switching in Admin Bar
Plugin URI: http://markwilkinson.me
Description: Build upon the User Switching plugin (http://wordpress.org/extend/plugins/user-switching/) by John Blackbourn and adds a dropdown list of users in the WordPress admin bar with a link to switch to that user.
Author: Mark Wilkinson
Author URI: http://markwilkinson.me
Version: 1.0
*/
<?php
/* create a function to get the values from this page load */
function wpct_track_content() {
/* call the global post variable to gain access to post data */
global $post;
/* setup an array to store all our values */
$wpct_post_values = array();