Skip to content

Instantly share code, notes, and snippets.

@adczk
adczk / forminator-hidden-field-usermeta.php
Created February 23, 2023 10:54
Forminator - autofill hidden fields with custom usermeta from DB
<?php
/**
* Plugin Name: [Forminator] autofill hidden fields with custom usermeta from DB
* Plugin URI: https://premium.wpmudev.org/
* Description: Autmatically fills in hidden fields with usermeta from DB
* Author: adczk
* Author URI: https://premium.wpmudev.org/
* License: GPLv2 or later
*
<?php
/**
* Plugin Name: [Forminator] redirect knowledge quiz based on score
* Plugin URI: https://premium.wpmudev.org/
* Description: redirect knowledge quiz based on score; a bit "tricky" setup but seems to wrok fine
* Author: adczk (with adjustments of Prashant Singh)
* Author URI: https://premium.wpmudev.org/
* License: GPLv2 or later
*
@adczk
adczk / very-simple-object-cache-flusher.php
Created April 21, 2023 09:05
Very Simple Object Cache Flusher through custom URL
<?php
/**
* Plugin Name: Very Simple Object Cache Flusher
* Plugin URI: https://premium.wpmudev.org/
* Description: Flush object cache by calling custom URL with query var;
* Note: only works if Object Cache is integrated with WP via object-cache.php drop-in
* Author: adczk
* Author URI: https://premium.wpmudev.org/
* License: GPLv2 or later
*
@adczk
adczk / forminator-individual-repeater-fields-in-mails.php
Last active October 9, 2024 07:15
Forminator - repeater fields in e-mail notifications used with individual macro tags
<?php
/**
* Plugin Name: [Forminator] repeater fields in e-mail notifications used with individual macro tags
* Plugin URI: https://premium.wpmudev.org/
* Description: Use macros like e.g. {text-1-*} in e-mail notification to show all copies of {text-1} repeater field
* wrap these macros between [REPEATER_START] and [REPEATER_END] in your message content, for example:
* [REPEATER_START] {name-1-*} {phone-1-* } [REPEATER_END]
* no matter how many copies are submitted
* Author: adczk (with adjustments of Prashant Singh)
@adczk
adczk / wpmu-wpdie-override-redirect.php
Created May 1, 2023 10:01
wp_die() function override to redirect to custom error page based on error message
<?php
// WP_DIE() override - redirect to custom page on specific error
// Note: this is for standard non-Ajax, non-JSON, non-XML requests;
// for other requests you will need to adjust filters/code
// https://developer.wordpress.org/reference/functions/wp_die/#hooks
add_filter( 'wp_die_handler', 'wpmu_custom_user_wpdie_handler', 11, 1 );
@adczk
adczk / forminator-datepicker-disable-ranges-acf-repater-options.php
Last active May 8, 2023 10:34
Forminator - datepicker: disable date ranges via ACF repeater (options page field)
<?php
/**
* Plugin Name: Forminator - datepicker: disable date ranges via ACF repeater (options page field)
* Plugin URI: https://premium.wpmudev.org/
* Description: Forminator - datepicker: disable date ranges via ACF repeater (options page field)
* Note: ACF date fields in repeater (options page) must have "return date format" set the same as Forminator datepicker date format
* Make sure to adjust ACF fields names too
*
* Author: adczk
@adczk
adczk / forminator-guten-block-stop-scroll.php
Created May 17, 2023 10:17
Forminator - fix scroll issue for Guten Modal Block
<?php
/**
* Plugin Name: [Forminator Pro] - Fix Scroll Issue for forms inside Guten Modal Block plugin modal
* Description: [Forminator Pro] - Fix Scroll Issue
* Author: adczk based on Prashant Singh's solution for mobiles
* Author URI: https://premium.wpmudev.org
* License: GPLv2 or later
*
* USE A MU PLUGIN
*
@adczk
adczk / forminator-acf-gallery-postdata-upload-map.php
Created May 26, 2023 10:34
Forminator - map upload to ACF gallery via postdata
@adczk
adczk / forminator-show-entry-front-url-params.php
Last active July 24, 2023 10:13
Forminator - show specific form entry on front, based on URL params
<?php
/**
* Plugin Name: Forminator - show specific form entry on front, based onURL params
* Description: Forminator - show specific form entry on front, based onURL params
* Author: adczk
* Author URI: https://premium.wpmudev.org
* License: GPLv2 or later
*
* USE A MU PLUGIN
@adczk
adczk / smartcrawl-remove-onpage-seo-by-post-type.php
Created June 16, 2023 08:43
SmartCrawl - remove SmartCrawl SEO "onpage seo" metabox from post editor by selected post types
<?php
/**
* Plugin Name: SmartCrawl - remove "onpage seo" by post type
* Description: SmartCrawl - remove SmartCrawl SEO "onpage seo" metabox from post editor by selected post types
* Author: adczk
* Author URI: https://premium.wpmudev.org
* License: GPLv2 or later
*
* USE A MU PLUGIN