renamed formbuilder patch files
This commit is contained in:
@@ -45,7 +45,8 @@ include_once(PLGNTLS_class::get_path() . 'php/redirections.php');
|
||||
include_once(PLGNTLS_class::get_path() . 'php/author_restriction.php');
|
||||
include_once(PLGNTLS_class::get_path() . 'php/reinit_acf_fields.php');
|
||||
|
||||
include_once(PLGNTLS_class::get_path() . 'php/form_builder_patch/form_builder.php');
|
||||
//include_once(PLGNTLS_class::get_path() . 'php/form_builder_patch/url_validation.php');
|
||||
include_once(PLGNTLS_class::get_path() . 'php/form_builder_patch/multiple_modals.php');
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// https://stackoverflow.com/questions/12741517/how-to-make-url-validation-without-http-or-add-it-after-validation-passed/44848476#44848476
|
||||
|
||||
let old_url = jQuery.validator.methods.url;
|
||||
jQuery.validator.addMethod( 'url', function(value, element) {
|
||||
let url = old_url.bind(this);
|
||||
return url(value, element) || url('http://' + value, element);
|
||||
}, 'Please enter a valid URL'
|
||||
);
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
function test_modal_PLGNTLS() {
|
||||
$fipf_modal = new PLGNTLS_class();
|
||||
$fipf_modal->add_to_front(
|
||||
array(
|
||||
'js/form_builder_patch/form_builder.js',
|
||||
));
|
||||
}
|
||||
add_shortcode('test_modal', 'test_modal_PLGNTLS');
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* it means someone outside wp is accessing the file, in this case kill it.
|
||||
*/
|
||||
if (!defined('ABSPATH')) {
|
||||
die('You can not access this file!');
|
||||
}
|
||||
|
||||
|
||||
|
||||
function test_modal_PLGNTLS() {
|
||||
$fipf_modal = new PLGNTLS_class();
|
||||
$fipf_modal->add_to_front(
|
||||
array(
|
||||
'js/form_builder_patch/multiple_modals.js',
|
||||
));
|
||||
}
|
||||
add_shortcode('test_modal', 'test_modal_PLGNTLS');
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* it means someone outside wp is accessing the file, in this case kill it.
|
||||
*/
|
||||
if (!defined('ABSPATH')) {
|
||||
die('You can not access this file!');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* in `wp-content/plugins/divi-form-builder/includes/DiviFormBuilder.php`
|
||||
* also :
|
||||
* - Undefined variable: min_length in /var/www/html/wp-content/plugins/divi-form-builder/includes/modules/FormField/FormField.php on line 5933
|
||||
* - Undefined variable: use_icon in /var/www/html/wp-content/plugins/divi-form-builder/includes/modules/FormField/FormField.php on line 5984
|
||||
*/
|
||||
function add_my_jquery_patch()
|
||||
{
|
||||
$handle = 'jquery_validator_url_patch';
|
||||
$url = PLGNTLS_class::get_url() . 'js/form_builder_patch/url_validation.js';
|
||||
$dependencies = array('de_fb_validate');
|
||||
$version = '';
|
||||
$defer = true;
|
||||
wp_enqueue_script( $handle, $url, $dependencies, $version, $defer);
|
||||
}
|
||||
add_action('wp_enqueue_scripts', 'add_my_jquery_patch');
|
||||
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user