Skip to content

Instantly share code, notes, and snippets.

View robertdall's full-sized avatar

Robert Dall robertdall

View GitHub Profile
@robertdall
robertdall / emailshortcode.php
Last active October 13, 2015 17:27
Email Short Code
// Hide Email from Spam Bots using antispam bot http://codex.wordpress.org/Function_Reference/antispambot
function HideMail($atts , $content = null ){
if ( ! is_email ($content) )
return;
return '<a href="mailto:'.antispambot($content).'">'.antispambot($content).'</a>';
}
add_shortcode( 'email','HideMail');
@robertdall
robertdall / hides-columns.php
Last active December 11, 2015 18:58
Hides Yoast SEO Plugin Field Columns for Author users and below
// Hides Yoast SEO Plugin Field Columns for Author users and below
// @since Jan, 2013
// @author R. Dall
if( current_user_can( 'edit_users' ) ) {
// The user can see all columns
}
else {
// The user has the SEO Columns hidden
@robertdall
robertdall / GitHub WordPress Ignore File
Last active December 16, 2015 11:19
My GitHub ignore file… Change the WordPress Ignore Files to suite your specific WordPress install needs.
# WordPress Ignore Files #
######################
.htaccess
wp-config.php
wp-content/uploads/
wp-content/themes/r2d2
wp-content/plugins/
@robertdall
robertdall / otto-mute.php
Last active December 28, 2015 11:09
Mutes update email on beta site
<?php
/**
* @package otto-mute
* @version 0.1
*/
/*
Plugin Name: Otto Mute
Description: Mute's daily email from beta site updates
Author: Robert Dall & Otto Wood
# Contract Killer 3
Revised date: 07/11/2012
Between us [company name]
and you [customer name]
## Summary:
We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.