Skip to content

Instantly share code, notes, and snippets.

View thinkstylestudio's full-sized avatar

Theron Smith thinkstylestudio

View GitHub Profile
<?php
// add the following to your functions file or similar
define( 'FUBLO_GF_PROFILE', 1 ); // define the ID number of your profile form.
// ============================================================= PROFILE EDITING
/**
* These are the user metadata fields, with their names and the data about them.
// filter the Gravity Forms button type
add_filter("gform_submit_button", "form_submit_button", 10, 2);
function form_submit_button($button, $form){
return "<input type='submit' class='button gform_button btn btn-flat' id='gform_submit_button_{$form["id"]}' />";
}
<?php
/* If the gravity form is below the fold the user can get confused if there isn't an anchor on the form */
add_filter("gform_confirmation_anchor", create_function("","return true;"));
?>
// Check dependencies
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
if (!is_plugin_active('gravityforms/gravityforms.php')) {
add_action('admin_notices', function() {
echo '<div class="error"><p>This plugin requires the Gravity Forms plugin to be enabled, and is not currently running.</p></div>';
});
if (class_exists('Burst')) {
Burst::log("Gravity Forms dependency unmet.", BURST_CRITICAL);
}
<?php
// No trailing slash
define('BURST_LOG_PATH', ABSPATH . 'wp-content');
// Define which get logged in Burst::$_burst_log_levels
define('BURST_INFO', 1);
define('BURST_DEBUG', 2);
define('BURST_CRITICAL', 3);
// Gravity Forms anchor - disable auto scrolling of forms
add_filter("gform_confirmation_anchor", create_function("","return false;"));
/**
* Add a Gravity forms form to product upon database save.
*
* Requires Gravity Forms and WooCommerce - Gravity Forms Product Add-Ons.
*
* Search for '_gravity_form_data' in wp_postmeta and set $raw_form_data to the serialized string.
*
* @return void
**/
function mb_woo_product_insert_form($product_ID) {
# Gravity Forms
add_action('admin_init','add_grav_forms');
function add_grav_forms(){
$role = get_role('editor');
$role->add_cap('gform_full_access');
}
add_filter("gform_validation_message", "change_message", 10, 2);
<?php
/**
* Conditional Confirmations (with Merge Tag Support)
* http://gravitywiz.com/2012/08/18/conditional-confirmations/
*
* Provides the ability to register conditional confirmations. To register a new conditional confirmation
* use the GWConditionalConfirmations::add_conditional_confirmation() function.
*
* GWConditionalConfirmations::add_conditional_confirmation($form_id, $field_id, $operator, $value, $confirmation);

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?