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(jQuery.browser.msie){ | |
var version = jQuery.browser.version; | |
switch(version){ | |
case "6.0": | |
jQuery("html").addClass("ie ie6 lte10 lte9 lte8 lte7"); | |
break; | |
case "7.0": | |
jQuery("html").addClass("ie ie7 lte10 lte9 lte8 lte7"); | |
break; | |
case "8.0": |
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
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
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
var src = "http://placekitten.com/500/500", | |
img = $("<img />"); | |
img.hide().attr("src", src); | |
img.load(function() { | |
// Image is loaded | |
}); |
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
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="> |
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 | |
/** | |
* Send WooCommerce order email(s) | |
* | |
* @param integer $order_id WooCommerce order id. | |
* @param string|array $email_id The id of the email or an array of the email ids that need to send. | |
* @return bool Type returned Will return true if the email id provided is sent successfully. | |
*/ | |
function send_wc_order_email($order_id, $email_id) { |
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 LocalValetDriver extends LaravelValetDriver { | |
/** | |
* Determine if the driver serves the request. | |
* | |
* @param string $sitePath | |
* @param string $siteName | |
* @param string $uri |
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 | |
/** | |
* @author Ahmad Karim <hello@ahmadkarim.com> | |
* | |
* DEV & PROD specific variables | |
* for WordPress when working with | |
* LOCAL & LIVE instances at the same time | |
*/ | |
$localhosts = array('127.0.0.1', '::1'); |
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 | |
/** | |
* Break a string into | |
* n number of equal | |
* parts to an array | |
*/ | |
$string = 'This-is-a-long-string-that-has-some-random-text-with-hyphens!'; | |
$string_length = strlen($string); |
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
$.ajax({ | |
url: '/URL/', | |
type: 'POST', /* POST/GET */ | |
dataType: 'json', /* xml/html/script/json/jsonp */ | |
data: form_data, | |
crossDomain: true, | |
success: function(data, textStatus, xhr) { | |
/* success */ | |
}, | |
error: function(xhr, textStatus, errorThrown) { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Simple CSS Loading Icon</title> | |
</head> | |
<style type="text/css" media="screen"> | |
body { | |
margin-top: 150px; |
OlderNewer