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
# Syntax highlights | |
# =========================== | |
# Flags for a Rule, by default R=302, L equals Last line to run & stop the file | |
[R=301,L] | |
# This is an Apache setting that is normally turned on by default at the server level | |
RewriteEngine on | |
# Single vs Plural |
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 | |
/* Short and sweet */ | |
define('WP_USE_THEMES', false); | |
require('./wp-blog-header.php'); | |
// Pull our WP Theme Header | |
get_header(); | |
// Pull our WP Theme Footer | |
get_footer(); |
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
//create a clean array of data to be posted | |
foreach($_POST as $key => $val) { | |
$user_input[$key] = htmlentities(stripslashes(trim($val)), ENT_QUOTES, 'UTF-8'); | |
} | |
// There are two unique parts to this URL. The First is the "us3" portion of the URL is specific to your account. The second is the file extension at the end is what is returned, you can set it to json, php, or xml, but json is default. | |
$post_url = 'https://us3.api.mailchimp.com/2.0/lists/subscribe.json?'; | |
// Let's put together our user data to send | |
$post_query_array = array( |
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
// Setup | |
@mixin global-sprite($x-value, $y-value){ | |
background: transparent url(../img/sprite-global-assets.png) $x-value $y-value no-repeat; | |
} | |
// Usage | |
@include global-sprite(0, -40px); |
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
$('.general-contact-form').submit(function(){ | |
var req_values = ['user_name', 'user_email_address', 'user_phone_number', 'user_interest_in'], | |
empty_fields = false; | |
for (var i = 0; i < req_values.length; i++) { | |
if($('#'+req_values[i]).val() == ''){ | |
$('#'+req_values[i]).addClass('required'); | |
empty_fields = true; | |
} | |
} | |
if(empty_fields === true || ){ |
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
if(!Modernizr.input.placeholder) { | |
$('[placeholder]').each(function(i){ $(this).val($(this).prop('placeholder')); }); | |
$('[placeholder]').on({ | |
'focus' : function(evt){ | |
if($(this).val() === $(this).prop('placeholder')) { $(this).val(''); } | |
}, | |
'blur' : function(evt){ | |
if($(this).val() !== $(this).prop('placeholder')) { $(this).val($(this).prop('placeholder')); } | |
} | |
}); |
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
@import "compass"; | |
body.login { | |
// background: transparent url(../img/bg-footer.png) 0 0 repeat; | |
h1 { | |
text-align: center; | |
a { | |
width: 320px; | |
height: 92px; | |
// background: url(../img/logo-login.png) 0 0 no-repeat; |
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 // Let's go get some flickr photos. Key and Set are defined in the uploader. | |
$query = 'http://api.flickr.com/services/rest/?&method=flickr.photosets.getPhotos&api_key='.$apiKey.'&photoset_id='.$photoset_id.'&extras=url_o,url_c&format=php_serial'; | |
$ch = curl_init(); // open curl session | |
// set curl options | |
curl_setopt($ch, CURLOPT_URL, $query); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
$data = curl_exec($ch); // execute curl session |
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
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !^/m/.*$ | |
RewriteCond %{HTTP_ACCEPT} "text/vnd.wap.wml|application/vnd.wap.xhtml+xml" [NC,OR] | |
RewriteCond %{HTTP_USER_AGENT} "acs|alav|alca|amoi|audi|aste|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-" [NC,OR] | |
RewriteCond %{HTTP_USER_AGENT} "dang|doco|eric|hipt|inno|ipaq|java|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-" [NC,OR] | |
RewriteCond %{HTTP_USER_AGENT} "maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|opwv" [NC,OR] | |
RewriteCond %{HTTP_USER_AGENT} "palm|pana|pant|pdxg|phil|play|pluc|port|prox|qtek|qwap|sage|sams|sany" [NC,OR] | |
RewriteCond %{HTTP_USER_AGENT} "sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo" [NC,OR] | |
RewriteCond %{HTTP_USER_AGENT} "teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|w3cs|wap-|wapa|wapi" [NC,OR] | |
RewriteCond %{HTTP_USER_AGENT} "wapp|wapr|webc|winw|winw|xda|xda-" [NC,OR] |
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
if(!empty($_FILES['resume']['name'])){ // check to see if we have a photo and a user clicks submit | |
$accept_file_formats = array( | |
'image/jpg', | |
'image/jpeg', | |
'image/png', | |
'image/gif', | |
'text/rtf', //.rtf file | |
'text/plain', //.txt file | |
'application/msword', //.doc file | |
'application/vnd.openxmlformats-officedocument.wordprocessingml.document', //.docx file |
NewerOlder