- a/o 2015-05-27 *
—
- Restart with cmd-R or cmd-D
- Erase drive / 3x if second-handk
- Reinstall MacOS
<?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()) { |
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 | |
*/ |
/** | |
* 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. | |
* |
<?php | |
add_action( "gform_pre_submission_2", "wp_doin_pre_submission_2" ); | |
/** | |
* | |
* @param type $form | |
* @return type | |
*/ | |
function wp_doin_pre_submission_2($form) { |
<?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, |
This is outdated. | |
Here's a better, more full-featured method: | |
https://elegantmodules.com/modules/gravitys3/ |
<?php | |
//////////////// | |
// User Example | |
//////////////// | |
$user = pods( 'user' ); // User | |
$params = array( | |
'orderby' => 't.user_login', | |
'limit' => 10, |
<?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' ); |