Skip to content

Instantly share code, notes, and snippets.

View jeremycaris's full-sized avatar

Jeremy Caris jeremycaris

View GitHub Profile
<?php
class Sasha_pl_uploads_url {
function __construct() {
add_filter( 'pl_uploads_url', array( $this, 'filter' ) );
}
function filter( $url ) {
return 'http://my.cdn.url/wp-content/uploads';
}
}
@xlplugins
xlplugins / gravityxl-scheduled-export-entry.php
Last active July 6, 2023 03:38
Schedule Export for Gravity Forms Entries
<?php
/**
* @package Gravity XL Scheduled Entries Export
* @version 1.0
* @name gravityxl -scheduled-entries-export
* @author Gravity XL
*/
/**
* Schedule gform Entry export
*
@spivurno
spivurno / gw-gravity-forms-display-prices-for-choice-based-product-fields.php
Last active May 19, 2023 21:48
Gravity Wiz // Gravity Forms // Display Price for Drop Down and Radio Button Product Fields
<?php
/**
* Gravity Wiz // Gravity Forms // Display Price for Drop Down and Radio Button Product Fields
* http://gravitywiz.com/
* Source: https://www.gravityhelp.com/documentation/article/gform_field_choice_markup_pre_render/#2-include-price-for-product-fields
*/
add_filter( 'gform_field_choice_markup_pre_render', function ( $choice_markup, $choice, $field, $value ) {
if ( $field->type == 'product' ) {
$new_string = sprintf( '>%s - %s<', $choice['text'], GFCommon::to_money( $choice['price'] ) );
@hereswhatidid
hereswhatidid / gforms-merge-tag.php
Last active July 24, 2024 21:34
Create a custom Gravity Forms merge tag
<?php
namespace HWID\SampleCode;
class GravityForms {
public static function init() {
add_filter( 'gform_custom_merge_tags', [ 'HWID\SampleCode\GravityForms', 'custom_merge_tags' ], 10, 4 );
add_filter( 'gform_replace_merge_tags', [ 'HWID\SampleCode\GravityForms', 'replace_merge_tags' ], 10, 3 );
}
/**
@hereswhatidid
hereswhatidid / acf-gf-dropdown.php
Last active September 10, 2021 00:07
Populate ACF drop down with Gravity Forms forms
<?php
namespace HWID\ACFGravity;
class ACF_GF_DropDown {
public static function init() {
add_filter( 'acf/load_field/key=FIELDKEY', [ 'HWID\ACFGravity\ACF_GF_DropDown', 'populate_gform_dropdown' ] );