- httsp://bigdawggi.com/
This file contains 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
<script type="application/ld+json"> | |
{ | |
"@context": "http://schema.org", | |
"@type": "SportingGoodsStore", | |
"openingHours": "Mo,Tu,We,Th,Fr,Sa,Su 08:00-18:00", | |
"url": "https://www.example.com/", | |
"logo": "https://www.example.com/logo.png", | |
"address": { | |
"@type": "PostalAddress", | |
"addressLocality": "Example City", |
This file contains 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
<!-- REQUIREMENTS: | |
A link with | |
- a rel of "lightbox" | |
- an href that points to the the ID of the target div | |
- a data-lightbox-type="inline" attribute | |
--> | |
<a href="#popup-links" rel="lightbox" data-lightbox-type="inline">Load Inline HTML</a> | |
<!-- A div with a class of "hide", and an ID that matches the href of the originating link --> | |
<div id="popup-links" class="hide"> |
This file contains 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
<link href="//fonts.googleapis.com/css?family=Josefin+Sans+Std+Light:regular&subset=latin" rel="stylesheet" type="text/css" > | |
<style type="text/css"> | |
body { | |
font-family: 'Josefin Sans Std Light', serif; | |
font-size: 18px; | |
letter-spacing: 1px; | |
} | |
</style> |
This file contains 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
# Switch to Post README | |
## Overview | |
switch_to_post() stack implementation (similar to switch_to_blog()) for WordPress | |
## Questions | |
1. Do we want to still switch to post if the get_post fails? | |
2. Have a (bool) return value based on get_post? | |
## Test Steps |
This file contains 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 | |
class Friendly_Exception extends Exception { | |
public function __construct($friendly_message, $technical_message = '', $code = 0) { | |
$this->friendly_message = $friendly_message; | |
$this->technical_message = $technical_message; | |
parent::__construct($friendly_message, $code); | |
} | |
This file contains 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
--- | |
ip: "192.168.10.10" | |
memory: 2048 | |
cpus: 1 | |
provider: virtualbox | |
authorize: ~/.ssh/id_rsa.pub | |
keys: | |
- ~/.ssh/id_rsa |
This file contains 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
add_filter( | |
'get_post_metadata', | |
array($this, 'maybe_grab_simpleview_photo_for_featured_image'), | |
10, | |
4 | |
); | |
/** | |
* On the request for a post's featured image, it goes and retrieves it from the 3rd party site, | |
* attaches it to the current post, then sets it as a featured image. This only happens once per post. |
This file contains 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
#!/bin/sh | |
echo "********************" | |
echo "Post receive hook: Deploying Website" | |
echo "********************" | |
# Set up some vars | |
export GIT_REPO=/home/git/production/example.git | |
export GIT_WORK_TREE=/var/www/vhosts/example.com/staging | |
echo "*** Clearing out any staging dir ***" |
This file contains 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 | |
// Add this to your functions.php file | |
function mgr_og_image_fallback() { | |
if (!has_post_thumbnail()) { | |
// Replace the image URL unless you want my mug as your image for Open Graph Image ;) | |
?> | |
<meta property="og:image" content="http://i1.wp.com/matthewgrichmond.com/files/2012/03/matt.jpg?resize=310%2C180" /> | |
<?php | |
} |
This file contains 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 | |
if (isset($_GET['matt'])) { | |
$cur_time = time(); | |
$cache = wp_cache_get('matt-time', 'matt'); | |
if ($cache !== false) { | |
echo '<pre>Found'.print_r($cache, 1).'</pre>'; | |
} | |
else { | |
wp_cache_set('matt-time', $cur_time, 'matt', 10); |