Skip to content

Instantly share code, notes, and snippets.

View alfredo-wpmudev's full-sized avatar
🏠
Working from home

Alfredo Galano Loyola alfredo-wpmudev

🏠
Working from home
View GitHub Profile
@alfredo-wpmudev
alfredo-wpmudev / redirect_guest_visitor.php
Last active May 23, 2024 04:58
Custom redirect for guest visitors and in logout.
<?php
/**
* Plugin Name: Custom Guess Redirector
* Description: Redirect guess visitor to the Home Page or custom page, same after user logout will be redirected to a custom page.
* Version: 1.0.0
* Author: Alfredo Galano Loyola
* Author URI: https://wpmudev.com
* License: GPL v2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*/
@alfredo-wpmudev
alfredo-wpmudev / forminator_show_entries_ip.php
Created May 15, 2024 18:38
Show entry IP in the Forminator Submission without the need to add any extra fiekd
<?php
/**
* Plugin Name: [Forminator Pro] - Show IPs on the submission list
* Plugin URI: https://premium.wpmudev.org/
* Description: Show IPs on the submission list
* Author: Alfredo Galano Loyola | @WPMUDEV
* Author URI: https://premium.wpmudev.org/
* License: GPLv2 or later
*/
<?php
/**
* Plugin Name: [Forminator] - Pagination skip empty pages
* Plugin URI: https://premium.wpmudev.org
* Description: A custom snippet that allows skipping empty pages when Pagination is used.
* Task: SLS-2198
* Author: Panos Lyrakis @ WPMUDEV
* Author URI: https://premium.wpmudev.org
* License: GPLv2 or later
*/
@alfredo-wpmudev
alfredo-wpmudev / forminator_order_number.php
Last active May 13, 2024 03:17
Custom submission id as order number, available to display it with the tag {order}
<?php
/**
* Plugin Name: [Forminator] - Custom submission id as order number
* Description: [Forminator] - Custom submission id as order number, available to display it with the tag {order}
* Jira: SLS-224
* Author: Thobk | Alfredo Galano Loyola @ WPMUDEV
* Author URI: https://premium.wpmudev.org
* License: GPLv2 or later
*/
if (!defined('ABSPATH')) {
@alfredo-wpmudev
alfredo-wpmudev / forminator_webhook_submission_id_fix.php
Created April 30, 2024 17:18
A way to modify the values of data that will be send in Webhook, in this specific case the submission ID field is not sending the Entry ID, it's sending a default text
<?php
/**
* Plugin Name: [Forminator Pro] - Replace Submission ID before send Webook request
* Plugin URI: https://wpmudev.com/
* Description: Replace Submission ID before send Webook request
* Author: Alfredo Galano Loyola @ WPMUDEV
* Author URI: https://wpmudev.com/
* License: GPLv2 or later
*/
if (!defined('ABSPATH')) {
@alfredo-wpmudev
alfredo-wpmudev / Form_1_JSON.txt
Created April 29, 2024 20:42
Company Attendee Management with two forms
{"type":"form","data":{"fields":[{"id":"select-1","element_id":"select-1","form_id":"wrapper-4657-4128","parent_group":"","type":"select","options":[{"key":"9625-4626","label":"3M","value":"3M Thailand Limited.","default":"","error":""},{"key":"2770-6830","label":"AAA","value":"AAPICO Amata Co.,Ltd.","default":"","error":""},{"key":"8283-5587","label":"AAP","value":"AAPICO Plastics Public Company Limited","default":"","error":""},{"key":"6101-5467","label":"AAPICO","value":"AAPICO Hitech Public Co.,Ltd.","default":"","error":""},{"key":"5367-7931","label":"AATH","value":"AGC Automotive (Thailand) Co.,Ltd.","default":"","error":""},{"key":"7511-3969","label":"ACT1","value":"ATA Casting Technology Co.,Ltd.","default":"","error":""},{"key":"5294-7867","label":"ADVICS","value":"ADVICS Asia Pacific Co.,Ltd.","default":"","error":""},{"key":"8713-1275","label":"AIAP","value":"Aisin Asia Pacific Co.,Ltd.","default":"","error":""},{"key":"9833-3429","label":"AIC","value":"Asian Inoac Co.,Ltd.","default":"","error":""
@alfredo-wpmudev
alfredo-wpmudev / Form JSON
Created April 28, 2024 05:12
Form 2 Company Attendee List and Delete
{"type":"form","data":{"fields":[{"id":"select-1","element_id":"select-1","form_id":"wrapper-1015-7110","parent_group":"","type":"select","options":[{"label":"3M Thailand Limited.","value":597,"limit":"","key":"8606-4941"}],"cols":"12","conditions":[],"wrapper_id":"wrapper-1015-7110","hidden_behavior":"zero","value_type":"single","field_label":"Companies","options_bulk_editor":""}],"settings":{"pagination-header":"nav","paginationData":{"pagination-header-design":"show","pagination-header":"nav"},"formName":"Company Attendee List","version":"1.30.1","form-border-style":"none","form-padding":"","form-border":"","fields-style":"open","field-image-size":"custom","validation":"on_submit","akismet-protection":"0","form-style":"default","enable-ajax":"false","autoclose":"true","submission-indicator":"show","indicator-label":"Submitting...","form-type":"default","submission-behaviour":"behaviour-thankyou","thankyou-message":"Thank you for contacting us, we will be in touch shortly.","submitData":{"custom-submit-text
@alfredo-wpmudev
alfredo-wpmudev / Form JSON
Created April 28, 2024 05:09
Form 1 Registed Company Attendee
{"type":"form","data":{"fields":[{"id":"select-1","element_id":"select-1","form_id":"wrapper-4657-4128","parent_group":"","type":"select","options":[{"key":"9625-4626","label":"3M","value":"3M Thailand Limited.","default":"","error":""},{"key":"2770-6830","label":"AAA","value":"AAPICO Amata Co.,Ltd.","default":"","error":""},{"key":"8283-5587","label":"AAP","value":"AAPICO Plastics Public Company Limited","default":"","error":""},{"key":"6101-5467","label":"AAPICO","value":"AAPICO Hitech Public Co.,Ltd.","default":"","error":""},{"key":"5367-7931","label":"AATH","value":"AGC Automotive (Thailand) Co.,Ltd.","default":"","error":""},{"key":"7511-3969","label":"ACT1","value":"ATA Casting Technology Co.,Ltd.","default":"","error":""},{"key":"5294-7867","label":"ADVICS","value":"ADVICS Asia Pacific Co.,Ltd.","default":"","error":""},{"key":"8713-1275","label":"AIAP","value":"Aisin Asia Pacific Co.,Ltd.","default":"","error":""},{"key":"9833-3429","label":"AIC","value":"Asian Inoac Co.,Ltd.","default":"","error":""
@alfredo-wpmudev
alfredo-wpmudev / forminator_compare_fields.php
Created April 25, 2024 00:06
Forminator Compare Fist Name and Last Name, if both are the same hide the Submit button
<?php
/**
* Plugin Name: [Forminator Pro] -Compare first name and last name and if equals hide the submit button.
* Plugin URI: https://wpmudev.com/
* Description:Compare first name and last name and if equals hide the submit button.
* Author: Alfredo Galano Loyola @ WPMUDEV
* Author URI: https://wpmudev.com/
* License: GPLv2 or later
*/
if (!defined('ABSPATH')) {
@alfredo-wpmudev
alfredo-wpmudev / forminator_hidden_embed_url_last_path.php
Last active April 24, 2024 20:43
Customizing Embed URL in hidden field using Javascript
<?php
/**
* Plugin Name: [Forminator Pro] - Hidden Field -> Embed URL replace with last URL path.
* Plugin URI: https://wpmudev.com/
* Description: Hidden Field -> Embed URL replace with last URL path.
* Author: Alfredo Galano Loyola @ WPMUDEV
* Author URI: https://wpmudev.com/
* License: GPLv2 or later
*/
if (!defined('ABSPATH')) {