This file contains hidden or 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 | |
/* Add the color CSS to the header */ | |
add_action('wp_head', 'region_head_css'); | |
function region_head_css() { | |
echo '<style type="text/css">#selector { rule: value; }</style>'; | |
} |
This file contains hidden or 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 | |
// Load JS for this page, with dependencies | |
add_action('wp_enqueue_scripts', 'region_enqueue_scripts'); | |
function region_enqueue_scripts() { | |
wp_enqueue_script('region-template-name', get_template_directory_uri() . '/_/js/regions/template-name.js', array('jquery'), null, true); | |
} |
This file contains hidden or 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
<!-- | |
Tweak styles here | |
--> | |
<style> | |
#home-hero { | |
background: url('{{media url="wysiwyg/infortis/ultimo/slideshow/backer5.jpg"}}') no-repeat; | |
background-size:cover; | |
height:460px; | |
} | |
#home-hero-products { |
This file contains hidden or 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
/** | |
* Bind GA event to tel: links | |
*/ | |
jQuery(document).ready(function($) { | |
$("a[href^='tel:']").on('click', function(e) { | |
ga('send', 'event', 'phone', 'call', document.title + ' called ' + decodeURIComponent(this.href), 25); | |
}); | |
}); |
This file contains hidden or 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
jQuery(document).on('gform_confirmation_loaded', function(event, formId){ | |
ga('send', 'event', 'Form Name', 'Submit', 'Button Name', 25); | |
}); |
This file contains hidden or 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 | |
export BUCKET=filament-sp-backup | |
date_daily=`date +"%Y-%m-%d"` | |
tmp_dir=/tmp/sp-backup-$date_daily | |
# Get current month and week day number | |
month_day=`date +"%d"` | |
week_day=`date +"%u"` |
This file contains hidden or 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 | |
// add a custom body class to a Wordpress template | |
// place this at the top of the template file before output | |
add_filter('body_class', 'region_body_class'); | |
function region_body_class($classes) { | |
$classes[] = 'template-body-class'; | |
return $classes; |
This file contains hidden or 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 | |
$Directory = new RecursiveDirectoryIterator('../legacy/wp-content/uploads/'); | |
$Iterator = new RecursiveIteratorIterator($Directory); | |
$i = 0; | |
foreach($Iterator as $name => $object){ | |
if (!preg_match('/[\_\-]\d+x\d+\./i', $name)) continue; | |
//if ($i > 20) break; |
This file contains hidden or 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
-- | |
-- MySQL Workbench Doctrine Export Plugin | |
-- Version: 0.4.1 | |
-- Authors: Johannes Mueller, Karsten Wutzke | |
-- Copyright (c) 2008-2009 | |
-- | |
-- http://code.google.com/p/mysql-workbench-doctrine-plugin/ | |
-- | |
-- * The export plugin allows you to export a catalog as Doctrine YAML schema. | |
-- * This plugin was tested with MySQL Workbench 5.1.18a (JM) and 5.2.4a (KW) |