This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'forminator_quizzes_submit_before_set_fields', function($entry){ | |
$entry->set_fields( | |
array( | |
array( | |
'name' => '_forminator_user_ip', | |
'value' => Forminator_Geo::get_user_ip(), | |
) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'init', function (){ | |
if( current_user_can('editor') ){ | |
add_filter( 'map_meta_cap', function ( $caps, $cap, $user_id, $args ) { | |
$to_filter = [ 'edit_post', 'delete_post', 'edit_page', 'delete_page' ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Show Forminator payment data on the front end using Forminator API | |
* Make sure to create an hidden filed to collect the user ID | |
* | |
*/ | |
//Using this to protect the plugin | |
defined('ABSPATH') or die('What are you looking for?'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Print muse video ai using shortcode [muse-video-embed] | |
* use id to define the video and width for size, e.g: [muse-video-embed id="c41FczZ" width="800"] | |
*/ | |
//Using this to protect the plugin | |
defined( 'ABSPATH' ) or die( 'What are you looking for?' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'forminator_addon_googlesheet_form_submitted_data', function( $submitted_data ) { | |
global $wpdb; | |
$entry_id = $wpdb->get_var( "SELECT `AUTO_INCREMENT` FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = '{$wpdb->dbname}' AND TABLE_NAME = '{$wpdb->prefix}frmt_form_entry';" ); | |
if( $entry_id ){ | |
$submitted_data['hidden-1'] = ( $entry_id - 1 ); | |
} | |
return $submitted_data; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: [Forminator Pro] - Google Analytics | |
* Plugin URI: https://premium.wpmudev.org/ | |
* Description: Send custom events to Google Analytics Only (as of 1.12.1.1) | |
* Author: Alessandro Kaounas @ WPMUDEV | |
* Author URI: https://premium.wpmudev.org/ | |
* Task: 0/11289012348292/1175295834728851 | |
* License: GPLv2 or later | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('forminator_custom_form_submit_errors', 'my_custom_form_validation', 10, 3); | |
function my_custom_form_validation($submit_errors, $form_id, $field_data_array) { | |
// Skip if is not the correct form | |
if( (int) $form_id !== 49 ){ | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Adding [Urgent] to email subject if free shipping method woocommerce | |
*/ | |
add_filter('woocommerce_email_subject_new_order', 'change_admin_email_subject', 1, 2); | |
function change_admin_email_subject( $subject, $order ) { | |
global $woocommerce; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Using this to protect the plugin | |
defined('ABSPATH') or die('What are you looking for?'); | |
function wpmu_order_status_876(){ | |
ob_start(); | |
// Using this form to collect the data |
OlderNewer