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( 'plugins_loaded', function(){ | |
if ( ! defined( 'DEFENDER_VERSION' ) ) { | |
return; // Defender is not installed/enabled. | |
} | |
if ( ! class_exists( 'Defender_Legacy_IP_Detection' ) ) { | |
class Defender_Legacy_IP_Detection { | |
use WP_Defender\Traits\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 | |
/** | |
** Script to assign post to new user when Post Data field and user registration are used together. | |
**/ | |
if (!defined('ABSPATH')) | |
{ | |
exit; |
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 | |
// Use [pmu_mail_render] shortcode | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
add_action( | |
'wp_ajax_forminator_save_builder', |
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('wp_footer','custom_js_form_validation'); | |
function custom_js_form_validation(){ | |
?> | |
<script> | |
jQuery( document ).ready(function($) { |
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 | |
// JS doc https://github.com/fancyapps/ui | |
// Handle the shortcode | |
function custom_gallery_forminator_html_function( $atts = [] ){ | |
// get the IDs from shorcode | |
$gallery = ( isset( $atts['ids'] ) ) ? explode( ',', $atts['ids'] ) : null; |
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 | |
defined('ABSPATH') or die('What are you looking for?'); | |
/** Handle the HTML */ | |
function my_custom_header_branda_shortcode_function( ){ | |
ob_start(); ?> |
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 | |
if ( ! defined( 'ABSPATH' ) ) { exit; } elseif ( defined( 'WP_CLI' ) && WP_CLI ) { return; } | |
add_action( 'plugins_loaded', 'wpmudev_forminator_fix_redirect_blank_space', 100 ); | |
function wpmudev_forminator_fix_redirect_blank_space() { | |
if ( class_exists( 'Forminator' ) ) { | |
class WPMUDEV_FIX_redirect_blank_space{ | |
private $form_id = 41393; //enter form_id here |
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', function( $submit_errors, $form_id, $field_data_array ) { | |
if( $form_id != 361 ) { | |
return $submit_errors; | |
} | |
$last_entry = ''; | |
// Change this to the message that you want to show. | |
$message = 'Booking has been done for the day. Please book for another day.'; | |
foreach( $field_data_array as $key => $value ){ |
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( 'wp_footer', function(){ ?> | |
<script> | |
(function ($) { | |
$(function () { | |
$(document).on("after.load.forminator", function (e, id) { | |
function getQueryParams(qs) { |
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( 'wp_footer', function(){ | |
?> | |
<script> | |
function getParam(p) { | |
var match = RegExp('[?&]' + p + '=([^&]*)').exec(window.location.search); | |
return match && decodeURIComponent(match[1].replace(/\+/g, ' ')); | |
} |
NewerOlder