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
// Here's a little mixin I created to style some custom SoundCloud players | |
// $size = the size of the arwork box (also size of margins for track info + waveform) | |
// $title-color = the color of the track title | |
// $waveform-color = color of the audio waveform | |
// $play-color = color of the player indicator bar (current track position in playback) | |
// | |
// Usage: @include scplayer (60px, #001825, #aaa, #777) | |
@mixin scplayer($size, $title-color, $waveform-color, $play-color) { |
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
<script type="text/javascript"> | |
jQuery(document).ready(function($){ | |
$.equalHeightColumns('destroy'); | |
$('yourselector(s)').equalHeightColumns(); | |
}); | |
</script> |
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 | |
// STOP! DO NOT MODIFY THIS FILE! | |
// If you wish to customize the output, you can safely do so by COPYING this file | |
// into a new folder called 'gigpress-templates' in your 'wp-content' directory | |
// and then making your changes there. When in place, that file will load in place of this one. | |
// This template opens a list of shows - by default it opens a table, | |
// but it could also open a list, or be blank if you so desired |
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 | |
// STOP! DO NOT MODIFY THIS FILE! | |
// If you wish to customize the output, you can safely do so by COPYING this file | |
// into a new folder called 'gigpress-templates' in your 'wp-content' directory | |
// and then making your changes there. When in place, that file will load in place of this one. | |
// This template displays all of our individual show data in the main shows listing (upcoming and past). | |
// It's marked-up in hCalendar format, so fuck-around with caution. | |
// See http://microformats.org/wiki/hcalendar for specs |
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
# After struggling with Automator and AppleScript to try to copy a target folder and its contents | |
# to the current directory, I ended up creating this simple shell script to do just that. | |
# Every time I get a new web development project I was creating the same folders and subfolders and | |
# this script does it all in one go. Just create a template (source) folder with everything you need | |
# in it and then navigate to your target directory in Terminal and run this script by typing cpfolder | |
# at the command line. | |
# To install, add this to your ~/.bash_profile and edit [your source] to your preferred source directory | |
# (remove the brackets). Do not enclose the source directory in quotes. The "." refers to the current directory. |
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 | |
add_filter( 'gform_pre_render_2', 'populate_posts' ); | |
add_filter( 'gform_pre_validation_2', 'populate_posts' ); | |
add_filter( 'gform_pre_submission_filter_2', 'populate_posts' ); | |
add_filter( 'gform_admin_pre_render_2', 'populate_posts' ); | |
function populate_posts( $form ) { | |
foreach ( $form['fields'] as &$field ) { | |
if ( strpos( $field->cssClass, 'populate-posts' ) === false ) { |
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 | |
add_action("gform_after_submission_6", "update_usar_sponsorship_amount", 10, 2); | |
function update_usar_sponsorship_amount($entry, $form) { | |
// get required GF fields | |
$team = rgar( $entry, "14"); // GF radio buttons (select Team to sponsor) | |
$amount = rgar($entry, "2"); // donation amount | |
// query through users | |
$users = get_users(); |
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 | |
// just a sample function to see what's going on | |
// not tied to a particular action yet | |
// we are on a user profile edit screen | |
add_action( 'wp', function() { | |
$form_id = 4; // GF user registration form | |
$choice_field_id = 13; // ACF 'time_slots' field | |
$choice_value = ''; // initializing the variable (otherwise PHP 7 freaks out) | |
$field_key = "field_5996299aee5a9"; // ACF 'time_slots' field |
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
<!-- Save to ~/Library/Application Support/Sublime Text 3/Packages/User/ --> | |
<!-- Example: if you have some liquid like: {{ settings.site_bg_col }}; in your .scss.liquid file, | |
select that (except for the closing ; and use the keybinding set below. --> | |
<!-- Output: #{" {{ settings.site_bg_col }} "}; --> | |
<snippet> | |
<content><![CDATA[ | |
#{" $SELECTION "} | |
]]></content> | |
<!-- this tab trigger won't really work when using $SELECTION --> |
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
<snippet> | |
<!-- Wraps selected text in JSX style comment, e.g. {/* <Component /> */} --> | |
<!-- Save this to ~/Application Support/Sublime Text 3/Packages/User/ --> | |
<!-- You'll need to add a keybinding in Sublime Text > Preferences > Key Bindings --> | |
<!-- { | |
"keys": ["alt+command+j"], | |
"command": "insert_snippet", | |
"args": { "name": "Packages/User/jsx-wrap-comment.sublime-snippet" } | |
} --> | |
<content><![CDATA[ |
OlderNewer