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( 'wc_add_to_cart_message', 'dfh_change_cart_message', 10, 2 ); | |
function dfh_change_cart_message( $cart_message, $product_id ) { | |
if(strpos($cart_message, "Continue Shopping") !== false) | |
{ | |
$cart_message = str_replace("Continue Shopping","Shop More",$cart_message); | |
} | |
return$cart_message; | |
} |
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 (defined('PANTHEON_ENVIRONMENT')) { | |
if (PANTHEON_ENVIRONMENT == 'dev') { | |
// Google Analytics. | |
$conf['googleanalytics_account'] = 'UA-83305450-1'; | |
// SalesForce Middleware | |
$conf['asu_rfi_form_auth_key'] = 'G8SbroXqxteS6BAjJcjKkic7dUahiWyN'; | |
} | |
else if (PANTHEON_ENVIRONMENT == 'test') { | |
// Google Analytics. | |
$conf['googleanalytics_account'] = 'UA-78103002-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
cd /Users/david/Sites | |
# Git branch in prompt. | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
#lazygit "My commit msg" http://stackoverflow.com/questions/19595067/git-add-commit-and-push-commands-in-one | |
function lg() { |
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
<div class="<?php print $classes; ?>"<?php print $attributes; ?>> | |
<style> | |
.usnewscontainer { | |
min-height: 200px; | |
} | |
.usnewscontainer h1 { | |
display: inline-block; | |
padding: 15px 0 0 30px; | |
} | |
.usnewsbannerbadge { |
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 | |
/** | |
* @file | |
* Primary pre/preprocess functions and alterations. | |
*/ | |
function innovationchild_preprocess_page(&$variables) { | |
if (isset($variables['node']->type)) { | |
// If the content type's machine name is "my_machine_name" the file | |
// name will be "page--my-machine-name.tpl.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
/** | |
* Track clicks to a link. If new_window is true the google analytics request | |
* will be made synchronously, because browsers block new windows from opening unless | |
* it is done DURING an on click event. If new_window is false, the request will | |
* be made asynchronously, and the current window url will be changed. | |
*/ | |
var trackOutboundLink = function(url, new_window) { | |
ga('send', 'event', 'outbound', 'click', url, {'hitCallback': | |
function () { | |
if (!new_window) { |
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
// Redirect all traffic to non-www. For example yoursite.com | |
if (isset($_SERVER['PANTHEON_ENVIRONMENT']) && | |
($_SERVER['PANTHEON_ENVIRONMENT'] === 'live') && | |
// Check if Drupal or WordPress is running via command line | |
(php_sapi_name() != 'cli')) { | |
if ($_SERVER['HTTP_HOST'] == 'www.cast.asu.edu') { | |
header('HTTP/1.0 301 Moved Permanently'); | |
header('Location: http://cast.asu.edu'.$_SERVER['REQUEST_URI']); | |
exit(); | |
} |
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 | |
/** | |
* Template Name: Home Page | |
* | |
* @package asu-wordpress-web-standards-theme | |
*/ | |
get_header(); | |
$custom_fields = get_post_custom(); |
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 | |
/** | |
* @file | |
* Main view template. | |
* | |
* Variables available: | |
* - $classes_array: An array of classes determined in | |
* template_preprocess_views_view(). Default classes are: | |
* .view |
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 | |
/** | |
* @file | |
* Bartik's theme implementation to display a single Drupal page. | |
* | |
* The doctype, html, head, and body tags are not in this template. Instead | |
* they can be found in the html.tpl.php template normally located in the | |
* core/modules/system directory. | |
* |