Skip to content

Instantly share code, notes, and snippets.

View Twanneman's full-sized avatar

Twanneman Twanneman

View GitHub Profile
@brentjett
brentjett / beaver-builder-friendly.php
Created October 26, 2015 18:51
Making a Theme Beaver Builder Friendly
<?php
// I add a simple function to my functions.php that lets me do clean page-builder checks inside my template files.
// This is safe to include regardless of if bb-plugin is active or not. Won't trigger error.
function is_builder_layout() {
if (class_exists( 'FLBuilderModel' ) && FLBuilderModel::is_builder_enabled()) return true;
return false;
}
// Inside page.php I use is_builder_layout() to determine layout
if (is_builder_layout()) {
@tjFogarty
tjFogarty / wiredep.js
Created August 8, 2015 10:52
Gulp + Wiredep + Timber + Twig
var gulp = require('gulp');
var config = require('../config');
var wiredep = require('wiredep').stream;
gulp.task('wiredep', function () {
gulp.src(config.wiredep_file)
.pipe(wiredep({
directory: 'assets/lib',
ignorePath: '..',
fileTypes: {
<?php
/*
Plugin Name: Programmatically add Gravity Forms
Plugin URI: https://daan.kortenba.ch/programmatically-add-gravity-forms/
Description: Programmatically add persistent Gravity Forms forms.
Author: Daan Kortenbach
Version: 0.1
Author URI: https://daan.kortenba.ch/
License: GPLv2 or later
*/
@spivurno
spivurno / gw-gravity-forms-change-field-id.js
Last active December 12, 2023 01:56
Gravity Wiz // Gravity Forms // Change Field ID via Browser Console
/**
* WARNING! THIS SNIPPET MAY BE OUTDATED.
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library:
* https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-change-field-id.js
*/
/**
* Gravity Wiz // Gravity Forms // Change Field ID via Browser Console
*
* Provides a simple function for changing the ID of a Gravity Forms field via the browser console from the Form Editor page.
*

New computer setup

  • a/o 2015-05-27 *

Format the drive

  1. Restart with cmd-R or cmd-D
  2. Erase drive / 3x if second-handk
  3. Reinstall MacOS
@gicolek
gicolek / gf_rp_sh_o.php
Last active February 26, 2018 19:58
Gravity Forms Recover Password Submission Hook 1
<?php
add_action( "gform_pre_submission_2", "wp_doin_pre_submission_2" );
/**
*
* @param type $form
* @return type
*/
function wp_doin_pre_submission_2($form) {
@tomazzaman
tomazzaman / acf-gravity-forms-v5.php
Created April 9, 2015 17:48
Gravity forms and Sidebar selector for Advanced Custom Fields V5
<?php
class acf_field_gravity_forms extends acf_field {
function __construct() {
$this->name = 'gravity_forms_field';
$this->label = __( 'Gravity Forms', 'acf' );
$this->category = __( "Relational", 'acf');
$this->defaults = array(
'multiple' => 0,
@renventura
renventura / gfs3.txt
Last active June 8, 2021 19:10
Send Gravity Forms file uploads to Amazon S3 (This is outdated. Here's a better method: https://elegantmodules.com/modules/gravitys3/)
This is outdated.
Here's a better, more full-featured method:
https://elegantmodules.com/modules/gravitys3/
@sc0ttkclark
sc0ttkclark / pods-examples.php
Created March 3, 2015 20:58
Example from PodsCast 1
<?php
////////////////
// User Example
////////////////
$user = pods( 'user' ); // User
$params = array(
'orderby' => 't.user_login',
'limit' => 10,
@Phoenix2k
Phoenix2k / admin.php
Last active October 25, 2024 03:59
WordPress Gists
<?php
/**
* Adds support for `admin.css` (with child-theme support)
*
* You can use this to style anything from edit buttons on the frontend
* to customizing your admin screen for logged in users
*
* @link http://codex.wordpress.org/Function_Reference/wp_enqueue_script
*/
add_action( 'admin_enqueue_scripts', 'theme_admin_styles' );