Skip to content

Instantly share code, notes, and snippets.

View ahaywood's full-sized avatar

Amy Haywood Dutton ahaywood

View GitHub Profile
<snippet>
<content><![CDATA[
@include breakpoint(${1}) { ${2} }
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>breakp</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
<snippet>
<content><![CDATA[
<span data-picture>
<span data-src="images/${1}.${2}"></span>
<span data-src="images/${1}@2x.${2}" data-media="(min-device-pixel-ratio: 2.0)"></span>
</span>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>pfret</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<snippet>
<content><![CDATA[
z-index: map-get(\$zindex, ${1});
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>z-</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.scss</scope> -->
</snippet>
<snippet>
<content><![CDATA[
<img src="http://placehold.it/${1:width}x${2:height}/${3:bg color (no #)}/${4:text color (no #)}" alt="${5}"/>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>ph</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>index.html</scope> -->
</snippet>
<snippet>
<content><![CDATA[
<?php include (TEMPLATEPATH . '/${1:folder}/${2:file}.php' ); ?>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>include</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
<snippet>
<content><![CDATA[
<?php get_template_part('${1}', '${2}'); ?>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>wppart</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
{
"exclude_folders": [
"*.git",
".sass-cache",
"*bower_components*",
"*node_modules*"
],
"exclude_files": [
"*jquery.js",
"*modernizr.js",
@ahaywood
ahaywood / .gitignore
Created February 16, 2015 06:08
.gitignore for a Wordpress Project
# As Yeoman assumes the usage of Bower and Grunt, ignore the below:
bower_components
node_modules
# Ignore automatically generated cruft
*.log
.sass-cache
# Ignore config
local-config.php
<?php
//This is a filter to change the default validation message that Gravity Forms generates
add_filter('gform_validation_message', 'change_validation_message', 10, 2);
function change_validation_message($message, $form)
{
return "<div class='validation_error'><strong>Oops!</strong> Looks like there’s something wrong. Please review the form above.</div>";
}
// Often forms in Gravity Forms to need to start with default values and we need to check the form in case the user hasn't entered new data and give them a validation message back
@ahaywood
ahaywood / acf-options-functions.php
Created March 12, 2015 03:39
PHP: WP - Add an ACF Options Page
/*------------------------------------*\
Create an ACF Options Page
http://www.advancedcustomfields.com/resources/options-page/
\*------------------------------------*/
/*
if( function_exists('acf_add_options_page') ) {
acf_add_options_page();
}
*/