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 | |
/* These are the variable that tell the subject of the email and where the email will be sent.*/ | |
$emailSubject = 'Customer Has a Question!'; | |
$mailto = '[email protected]'; | |
/* These will gather what the user has typed into the fieled. */ | |
$nameField = $_POST['name']; |
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
function get_bitly_link($post_id){ | |
$post = get_page($post_id); | |
if($post->post_status == "published" || 1 == 1){ | |
if(false === ($short_link = get_post_meta($post_id,'bitly_link',true))){ | |
$http = _wp_http_get_object(); | |
$args['login'] = self::BITLY_USERNAME; | |
$args['apikey'] = self::BITLY_APIKEY; | |
$args['longUrl'] = get_permalink($post_id); | |
if(is_wp_error($response = $http->request('https://api-ssl.bitly.com/v3/shorten?'.http_build_query($args),array('method'=>'GET')))){ | |
return $response; |
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/bash | |
# copy this file to /usr/sbin | |
# if you have other hosts entries that you would not like to lose, make sure they get added to the hosts.mamp.bak file | |
cat /etc/hosts.mamp.bak > /etc/hosts | |
echo 'clean!' |
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 foreach ( $recipe_vars['instructions'] as $instruction ) { ?> | |
<p itemprop="recipeInstructions" > | |
<?php | |
if ($instruction['image_id'] != ""){ | |
$inst_image = wp_get_attachment_image_src( $instruction['image_id'], "medium", false ); | |
echo "<img src='{$inst_image[0]}' style='float:left;' /> "; | |
} | |
if (count($instruction['text']) > 1 ) { | |
echo '<ol>'; | |
foreach ($instruction['text'] as $numbered_inst ){ |
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 | |
/** | |
* Display a list of the 10 most commented posts (WordPress) | |
* @author Corey Brown https://github.com/coreyweb | |
* @author Aaron Collegeman: https://github.com/collegeman | |
* @author Joey Blake: https://github.com/joeyblake | |
* | |
* Rules: | |
* - show a list of 10 posts | |
* - published any time |
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('sp_auto_flush_fb', '__return_false'); |
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
server.get('/*', function(req, res, next) { | |
var fullURL = req.protocol + "://" + req.get('host') + req.url; | |
//your 301 redirects | |
var redirects_301 = { | |
'http://thinkingandmaking.com/working/92/72-questions-to-ask-on-your-first-day': '/view/72-questions-to-ask-on-your-first-day', | |
'http://thinkingandmaking.com/working/92/someother': '/view/someother' | |
} | |
//check and see if there is a redirect, if so, redirect to it! | |
if (redirects_301[fullURL]) { | |
res.redirect(301, redirects_301[fullURL]); |
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 this to the functions.php file in your theme to disable fb comments open graph metadata | |
*/ | |
add_filter('fbc_og_tags', '__return_false'); |
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
.fb-comments, .fb-comments iframe[style] { | |
width: 100% !important; | |
} |