Skip to content

Instantly share code, notes, and snippets.

@pcaWeb
pcaWeb / plugin.php
Created October 3, 2015 17:05 — forked from logoscreative/plugin.php
Friendlier, Safer WordPress Admin Areas
<?php
/**
* "Friendlier, Safer WordPress Admin Areas"
* Presented by Cliff Seal at WordCamp Atlanta 2015
* Slides: http://www.slideshare.net/cliffseal/wp-admin
*
* Plugin Name: A Better Admin Experience
* Plugin URI: http://evermo.re
* Description: Cleans up and sanitizes the WordPress admin area
* Version: 1.0
<?php
//* Do NOT include the opening php tag shown above. Only modified code shown below.
function metro_homepage_widgets() {
// get the transient
$metro_homepage_content = get_transient( 'metro_homepage_content' );
// check if homepage content exists
if ( false === $metro_homepage_content ) :
@pcaWeb
pcaWeb / login_link_menu.php
Last active August 29, 2015 14:07
WooCommerce: Login/Logout to Top Menu (redirect logout to home page)
@pcaWeb
pcaWeb / 0_reuse_code.js
Created June 16, 2014 13:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@pcaWeb
pcaWeb / wp-antispambot.php
Last active August 29, 2015 14:02 — forked from aldolat/wp-antispambot.php
WordPress: Obfuscates email addresses from spam bot.
/**
* Hides email addresses from spam bot.
*
* @param array $atts The various options. The only required option is "address".
* @example [email address="[email protected]"]
*/
function ubnsc_email( $atts ) {
extract( shortcode_atts( array(
'type' => 'email',
'address' => '',