Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
<Something Clever>

Jeff Matson JeffMatson

💭
<Something Clever>
View GitHub Profile
@JeffMatson
JeffMatson / gfaddon-minimum-requirements.php
Last active Dec 20, 2020
Gravity Forms GFAddOn->minimum_requirements() usage.
View gfaddon-minimum-requirements.php
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',
View testgist.php
<?php
echo 'testing gist stuff';
View new_gist_file.php
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 Feb 27, 2017
Filters the Gravity Forms entry IP.
View functions.php
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 / 0_reuse_code.js
Created Jan 3, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// 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 Aug 29, 2016
Shell script to get all plugins and details matching a name in the WordPress plugins repository
View get-plugins-by-name.sh
#!/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 ,
View keybase.md

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:

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