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 | |
$myvalue = [string] | |
$arr = explode(' ',trim($myvalue)); | |
$arr = array_reverse($arr); | |
$callout = array_pop($arr); | |
$arr = array_reverse($arr); | |
echo '<span style="[style]">' . $callout . "</span> " . implode(" ", $arr); | |
?> |
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
$(document).ready(function(){ | |
if($('#mc-embedded-subscribe-form')) { | |
$('#mc-embedded-subscribe-form').bind("submit", function(e){ | |
// Form Errors Stack, push a required field to this array | |
var errors = []; | |
// Error Validations (Basic) | |
// -- First Name -- | |
if($('input[name="FNAME"]').val() == '') { |
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
read -p "Continue? ( y ): " cont | |
if [ "$cont" != "y" ] ; then | |
exit 1; | |
fi |
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 | |
$environments = array("env1", "env2", "env3"); | |
if (!in_array($_SERVER['HTTP_HOST'], $environments)) { ?> | |
<!-- Something To Hide --> | |
<?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
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) { | |
// some code.. | |
} | |
//Credits go to "sweets-BlingBling" | |
//http://stackoverflow.com/questions/3514784/best-way-to-detect-handheld-device-in-jquery |
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
global $offline_mode; | |
global $prod_mode; | |
$prod_mode = "local"; | |
//$prod_mode = "staging"; | |
//$prod_mode = "production"; | |
//$prod_mode = "content"; | |
switch ($prod_mode) { | |
case "production": | |
define('DB_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
var viewOnly = { | |
init: function(){ | |
$(document).ready(function() { | |
var pathname = window.location.pathname; | |
var menu_options = $('#header ul.header-nav li'); | |
// If you are in the state of "signed in" |
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
$(document).ready(function() { | |
// If user is on a product page and on a mobile device | |
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) { | |
// Hide widgets tab from this specific page | |
if(window.location.href.indexOf("/product/") > -1) { | |
$('.widgets').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
<!--[if lt IE 9]> | |
<script> | |
document.createElement('header'); | |
document.createElement('nav'); | |
document.createElement('section'); | |
document.createElement('article'); | |
document.createElement('aside'); | |
document.createElement('footer'); | |
</script> | |
<![endif]--> |