Skip to content

Instantly share code, notes, and snippets.

@adczk
adczk / hustle-alert-popup.php
Created September 24, 2021 13:21
Dynamic popup alerts with Hustle based on CTP and cookies
<?php
########################################
#
# dynamic popup alerts with Hustle
#
# create an informational popup in Hustle
# put shortocde [hustle-alert-content] in popup content body
#
# set visibility condition to show popup
@adczk
adczk / forminator-remaining-select-submissions-show.php
Last active October 3, 2022 08:35
Forminator 1.18.2 - show number of remaining submissions for limited "select" fields
<?php
#################################
#
# Show number of submissions remaining for SELECT type fields
#
# use as MU plugin
#
# tested with Forminator 1.18.2 only
#
#################################
@adczk
adczk / wp-multisite-sitewide-user-remove.php
Last active October 14, 2021 14:09
WP Multisite: Remove user from all blogs and delete account if removed from one blog
<?php
########################################
#
# Sitewide user removal if removed from one blog on WP Multisite
#
# use as MU plugin
#
# Note: this is basic code with no additional security checks
# and error prevention
# and it doesn't reassign user content (it's left "free floating")
@adczk
adczk / forminator-autoincreased-value-in-submission.php
Last active January 13, 2025 10:37
Forminator 1.15.2 - set autoincremented value in a field, per form, consecutive, upon submission
<?php
/**
* Plugin Name: [Forminator] - Auto-increase field value (with prefix/suffix)
* Description: [Forminator] - Auto-increase field value (with prefix/suffix)
* Author: Adam @ WPMUDEV
* Author URI: https://wpmudev.com
* Based on: https://gist.github.com/wpmudev-sls/b607c860225b0b6bde502bcdec0184fa
* License: GPLv2 or later
*
* Tested with Forminator 1.15.2 - 1.29.0 (backwards/future compatibility unknown)
@adczk
adczk / forminator-id-ip-csv.php
Last active September 30, 2021 13:34
Forminator 1.15.3 - include entry_id and user IP in CSV export
<?php
/**
* Plugin Name: [Forminator] - include entry ID and user IP in CSV export
* Description: [Forminator] - automatically includes entry ID and user IP in CSV export
* Author: Adam @ WPMUDEV
* Author URI: https://wpmudev.com
* License: GPLv2 or later
*
* Tested with Forminator 1.15.3 (backwards/future compatibility unknown)
*/
@adczk
adczk / forminator-stopwords-form-filter.php
Created October 18, 2021 16:44
Forminator 1.15.3 - very basic "stop-words" type spam filter for forms
<?php
/**
* Plugin Name: [Forminator] - very simple "stop words" type spam protection for forms
* Description: prevents submission if defined fields contain defined strings
* Author: Adam @ WPMUDEV
* Author URI: https://wpmudev.com
* License: GPLv2 or later
*
* Tested with Forminator 1.15.3 (backwards/future compatibility unknown)
@adczk
adczk / forminator-poll-scroll-to-results.php
Created October 27, 2021 14:57
Forminator 1.15.3 - scroll to poll results from link
<?php
/**
* Plugin Name: [Forminator] - scroll to poll results via link
* Description: scrolls page to poll results if results are displayed via "view results" link
* Author: Adam @ WPMUDEV
* Author URI: https://wpmudev.com
* License: GPLv2 or later
*
* Tested with Forminator 1.15.3 and 1.15.4 (backwards/future compatibility unknown)
@adczk
adczk / hustle-fix-automated-mail-placeholder-not-saving.php
Created December 5, 2021 14:59
Fix for specific/rare issue of {email} variable not saving in "automated mail" settings in some cases in Hustle
<?php
/************************************
*
* HUSTLE - fix for {email-1} placeholder not being saved in "automated e-mail" settings
*
* This is a fix for a very specific issue only
*
* author: Prashant Singh/WPMU DEV
*
@adczk
adczk / hummingbird-allow-bigger-css-inline.php
Created January 20, 2022 10:44
Allow inline of CSS files bigger than 4kb
<?php
/**************************
*
* Hummingibrd - allow "inline" of CSS larger than default 4kb
*
* Tested with Hummingbird 3.3.0 only
*
* use as MU plugin
***************************/
add_filter( 'wphb_inline_limit_kb', 'wphb_custom_inline_limit_kb' );
@adczk
adczk / forminator-thank-you-iframe.php
Created January 28, 2022 14:51
Forminator 1.15.10 - include iframe in thank you message
<?php
/**
*
* Includes specified iframe in inline thank you message;
* note that it's quite "rough" and disables some sanitization
*
* by Adam/Panos/WPMU DEV
*
* use as MU plugin
*