Skip to content

Instantly share code, notes, and snippets.

View JeffMatson's full-sized avatar
💭
<Something Clever>

Jeff Matson JeffMatson

💭
<Something Clever>
View GitHub Profile
<?php
echo 'testing gist stuff';
public function feed_settings_fields() {
return array(
array(
'title' => 'PDF Settings',
'fields' => array(
array(
'label' => 'Enable PDF Download',
'type' => 'checkbox',
'name' => 'enabled',
'tooltip' => 'Check this if you want a download link to the PDF to be displayed.',
@JeffMatson
JeffMatson / functions.php
Last active February 27, 2017 17:24
Filters the Gravity Forms entry IP.
add_filter( 'gform_ip_address', 'filter_gform_ip_address' );
function filter_gform_ip_address( $ip ) {
// Return the IP address set by the proxy.
// E.g. $_SERVER['HTTP_X_FORWARDED_FOR'] or $_SERVER['HTTP_CLIENT_IP']
return $_SERVER['HTTP_X_FORWARDED_FOR'];
}
@JeffMatson
JeffMatson / gfaddon-minimum-requirements.php
Last active December 20, 2020 21:35
Gravity Forms GFAddOn->minimum_requirements() usage.
array(
// Require WordPress version 4.6.2 or higher.
'wordpress' => array(
'version' => '4.6.2'
),
// Require PHP version 5.3 or higher.
'php' => array(
'version' => '5.3',
@JeffMatson
JeffMatson / 0_reuse_code.js
Created January 3, 2017 20:16
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
@JeffMatson
JeffMatson / get-plugins-by-name.sh
Created August 29, 2016 03:13
Shell script to get all plugins and details matching a name in the WordPress plugins repository
#!/bin/bash
echo "Name, URL, Slug"
IFS=$'\n' # make newlines the only separator
for j in `curl https://wordpress.org/plugins/search.php?page=[1-12]\&q=gravity+forms | grep '<h4>.*</h4>'`
do
echo -n "$j" | awk 'BEGIN { FS = ">" } ; { print $3 }' | awk 'BEGIN { FS = "<" } ; { print $1 }' | sed 's/\&amp\;/\&/g' | tr -d "\n"
echo -n ,
echo -n "$j" | awk 'BEGIN { FS = "\"" } ; { print $2 }' | tr -d "\n"
echo -n ,

Keybase proof

I hereby claim:

  • I am JeffMatson on github.
  • I am jeffmatson (https://keybase.io/jeffmatson) on keybase.
  • I have a public key whose fingerprint is 0815 B9B2 8DEA 5A85 3A61 0725 AA41 7FC1 3399 25AE

To claim this, I am signing this object:

$search_criteria = array(
'status' => 'active',
'field_filters' => array(
array(
'key' => 'my_entry_value',
'operator' => 'IN', // or 'NOT IN'
'value' => array( 'Second Choice', 'Third Choice' ),
),
)
);
$field_map = array(
array(
'name' => 'email',
'label' => ‘Email Address’,
'required' => true,
'field_type' => array( 'email' )
),
array(
'name' => ‘name’,
'label' => ‘Your Name',
$list_array = array(
array(
'Column 1' => 'row1col1',
'Column 2' => 'row1col2',
),
array(
'Column 1' => 'row2col1',
'Column 2' => 'row2col2',
),
);