Skip to content

Instantly share code, notes, and snippets.

View New0's full-sized avatar

Nico Figueira Mahe New0

View GitHub Profile
@New0
New0 / nf-custom-code.php
Last active January 2, 2023 13:59
Remove random timestamp of the name of files loaded to Dropbox or Google Drive via Ninja Forms Uploads
<?php
/*
* Plugin Name: NF custom code
* Author: New0
* Description: Insert hooks to modify Ninja Forms defaults.
*/
//Way to remove the random timestamp from filenames loaded toservices listed in the variable array
$services = ["dropbox", "google"];
@New0
New0 / nf-clean-processing-data.php
Created November 14, 2023 17:52
Reset the wp cron job to cleanup expired Ninja Forms nf_processing_data session entries from the options table
<?php
/**
* Plugin Name: Ninja Forms - Clean nf_processing_data
* Description: Clean the expired nf_processing_data entries from options table twice a day
* Version: 0.0.1
* Author: New0
*/
/**
* The function `delete_nf_processing_data` deletes rows from the WordPress options table where the
{
"keys": [
{
"e": "AQAB",
"n": "oyny1BGtSVHw_J-FbuUB-Whk5arDFm6-fa_-HdaDP8fTFOmcLRyYdtYJXw7XvtCrupNlzDgi7QGS
D17THns2Euc88PiZsC-zKkfzhNEFiSfxickjHBWXRGWNVy8YaCzXBn1oGV63Ug8NJjCm7Enm1XXW
RZ7gMZpXMa-igI9FijOjJIOznegD3b-mtNrLlUEm07p9jaRsjDryqeRK7IQnQnVA-bPS6_VKKEq5
RHz2SilohPr2qyd3UVxhxeGsBHBy59tNfiFNW9YVXjf3cclqgnCtF1Cq_WTIt7osQPmXOn2CU-H-
2vLMpC41vptsAYRR-d-ntNZcI1x4dcoEJ004eQ",
"kid": "T_x41~crg.zmB%Kp/>~cNUml/Vs)z9WKB*ZfG7.Qj_0YK7IBs6J{0i{|IQR-GI*E",

Keybase proof

I hereby claim:

  • I am new0 on github.
  • I am new0 (https://keybase.io/new0) on keybase.
  • I have a public key ASAOrcT-6pfoC2MhrYic5RVI4gVS-szT5aF2Jw1mrZLI3Qo

To claim this, I am signing this object:

@New0
New0 / nf-custom-zapier.php
Last active April 22, 2024 16:32
Example usage of a Ninja Forms Zapier add-on filter hook for field data sent to Zapier. This can be installed as a plugin using the Download ZIP feature of this Gist interface and the Upload ZIP method in WP. This requires a precise version of the Zapier add-on. Contact Ninja Forms support if you are not sure to have the correct version.
<?php
/*
Plugin Name: Ninja Forms Custom Zapier Data
Description: Testing Ninja Forms hook
Version: 1.0.0
*/
/**
* Filter a value recorded for Zapier data. To be used with Ninja Forms Zapier >= 3.1.0
*
@New0
New0 / nf-filter-email-bcc.php
Last active December 31, 2024 17:02
Intercept Ninja Forms email to remove the BCC option from email headers and send theme separately.
<?php
/*
Plugin Name: Ninja Forms Custom email send
Description: Testing Ninja Forms email hook to catch bcc and send them separately
Version: 1.0.0
*/
add_filter( 'ninja_forms_action_email_send', 'nf_custom_email_send', 10, 5 );
function nf_custom_email_send( $return, $action_settings, $message, $headers, $attachments ) {