This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 ) : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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' => '', |