Skip to content

Instantly share code, notes, and snippets.

View schutzsmith's full-sized avatar

Daniel Schutzsmith schutzsmith

View GitHub Profile
@schutzsmith
schutzsmith / new_gist_file.css
Last active August 29, 2015 14:02 — forked from spigists/new_gist_file.css
Gravity Forms Bootstrap CSS
.gform_wrapper ul {
padding-left: 0;
list-style: none; }
.gform_wrapper li {
margin-bottom: 15px; }
.gform_wrapper form {
margin-bottom: 0; }
@schutzsmith
schutzsmith / DragTransform
Last active August 29, 2015 14:10 — forked from fta2012/DragTransform
Drag Transform JQuery Script
var selector = 'img' // Replace this with the selector for the element you want to make transformable
jQuery.getScript('//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', function() {
jQuery.getScript('//cdnjs.cloudflare.com/ajax/libs/numeric/1.2.6/numeric.min.js', function() {
(function() {
var $, applyTransform, getTransform, makeTransformable;
$ = jQuery;
@schutzsmith
schutzsmith / 0_reuse_code.js
Last active August 29, 2015 14:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
We couldn’t find that file to show.
<?php
// PageLines references
// https://github.com/pagelines/DMS/blob/Dev/includes/library.wordpress.php#L54
// 'aspect-thumb' not in use -- https://github.com/pagelines/DMS/search?q=aspect-thumb&type=Code
// 'basic-thumb' might be used by PopThumbs -- https://github.com/pagelines/DMS/blob/Dev/sections/popthumbs/section.php#L143
// 'landscape-thumb' used when PL settings have featured image on top of posts -- https://github.com/pagelines/DMS/blob/Dev/includes/class.posts.php#L396
// WordPress references
// http://codex.wordpress.org/Function_Reference/add_image_size
// http://codex.wordpress.org/Plugin_API/Filter_Reference/image_size_names_choose
@schutzsmith
schutzsmith / gulpfile.js
Created April 16, 2016 15:42 — forked from geelen/gulpfile.js
Harp with BrowserSync! Woo!
var gulp = require('gulp');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
var harp = require('harp');
/**
* Serve the Harp Site from the src directory
*/
gulp.task('serve', function () {
harp.server(__dirname + '/src', {
@schutzsmith
schutzsmith / custom-provision.sh
Created April 24, 2016 00:50 — forked from neilgee/custom-provision.sh
Custom VVV Variable Provisioning for WordPress sites
# #!/bin/bash
# #
# # provision.sh
# #
# # This file is specified in Vagrantfile and is loaded by Vagrant as the primary
# # provisioning script whenever the commands `vagrant up`, `vagrant provision`,
# # or `vagrant reload` are used. It provides all of the default packages and
# # configurations included with Varying Vagrant Vagrants.
# # By storing the date now, we can calculate the duration of provisioning at the
<?php
add_filter( 'acf/settings/load_json', function ( $paths ) {
$paths[] = get_template_directory() . '/some/custom/dir';
return $paths;
} );
@schutzsmith
schutzsmith / acf-field-group-php-to-json.php
Created June 3, 2022 19:32 — forked from mishterk/acf-field-group-php-to-json.php
Convert an ACF Field Group from PHP to ACF-JSON
<?php
// Get all the local field groups and loop through them for processing.
$field_groups = acf_get_local_field_groups();
foreach ( $field_groups as $group ) {
// If the field group has fields, load them into the 'fields' key.
if ( acf_have_local_fields( $group['key'] ) ) {
$group['fields'] = acf_get_local_fields( $group['key'] );
}
@schutzsmith
schutzsmith / acf-php-license-config.php
Created June 3, 2022 19:33 — forked from mishterk/acf-php-license-config.php
How to define the ACF PRO license key in code rather than storing it in the WordPress database. This Gist accompanies the article: https://www.awesomeacf.com/snippets/store-acf-pro-license-key-in-wordpress-php-configuration/
<?php
// Add this in your wp-config.php file
define('ACF_PRO_LICENSE', '{YOUR LICENSE KEY HERE}' );