moved all aptches from cipf plugin to fbpatch
This commit is contained in:
27
plugins/fbpatch/php/patches/calculations.php
Normal file
27
plugins/fbpatch/php/patches/calculations.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
namespace FBPATCH;
|
||||
|
||||
/*
|
||||
* 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 add_form_builder_calculations_patch() {
|
||||
$handle = 'form_builder_calculations_patch';
|
||||
$url = Fbpatch::root_url() . '/js/calculations.js';
|
||||
$dependencies = array('de_fb_calc');
|
||||
$version = null;
|
||||
$defer = true;
|
||||
wp_enqueue_script($handle, $url, $dependencies, $version, $defer);
|
||||
}
|
||||
add_action('wp_enqueue_scripts', __NAMESPACE__.'\add_form_builder_calculations_patch', 22);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
52
plugins/fbpatch/php/patches/hide_show.php
Normal file
52
plugins/fbpatch/php/patches/hide_show.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
namespace FBPATCH;
|
||||
|
||||
/*
|
||||
* it means someone outside wp is accessing the file, in this case kill it.
|
||||
*/
|
||||
if (!defined('ABSPATH')) {
|
||||
die('You can not access this file!');
|
||||
}
|
||||
|
||||
/*
|
||||
* 4674 : ../../../../wordpress_docker/volumes/wp_volume/wp-content/plugins/divi-form-builder/includes/modules/Form/Form.php
|
||||
*
|
||||
*/
|
||||
//function form_partner_before_render_CIPF() {
|
||||
// PLGNTLS_class::debug_infos();
|
||||
//
|
||||
// $cipf_form_partner = new PLGNTLS_class();
|
||||
// $cipf_form_partner->add_to_front(array(
|
||||
// 'css/hide_show_form_elements.css',
|
||||
// ));
|
||||
//}
|
||||
//add_action('de_fb_before_form_render', 'form_partner_before_render_CIPF');
|
||||
|
||||
|
||||
/*
|
||||
* 305 : ../../../../wordpress_docker/volumes/wp_volume/wp-content/plugins/divi-form-builder/includes/DiviFormBuilder.php
|
||||
*
|
||||
*/
|
||||
function form_partner_before_process($form_id, $post_array, $form_type) {
|
||||
error_log("form_id: " . json_encode($form_id));
|
||||
error_log("post_array: " . json_encode($post_array));
|
||||
error_log("form_type: " . json_encode($form_type));
|
||||
}
|
||||
add_action('df_before_process', __NAMESPACE__.'\form_partner_before_process', 10, 3);
|
||||
|
||||
/*
|
||||
* 506 : ../../../../wordpress_docker/volumes/wp_volume/wp-content/plugins/divi-form-builder/includes/DiviFormBuilder.php
|
||||
*
|
||||
*/
|
||||
function form_partner_before_insert($form_id, $post_array) {
|
||||
error_log("form_id: " . json_encode($form_id));
|
||||
error_log("post_array: " . json_encode($post_array));
|
||||
}
|
||||
add_action('df_before_insert_post', __NAMESPACE__.'\form_partner_before_insert', 10, 2);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
25
plugins/fbpatch/php/patches/modals.php
Normal file
25
plugins/fbpatch/php/patches/modals.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
namespace FBPATCH;
|
||||
|
||||
/**
|
||||
* 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() {
|
||||
$handle = 'form_builder_modals_patch';
|
||||
$url = Fbpatch::root_url() . '/js/modals.js';
|
||||
$dependencies = array();
|
||||
$version = null;
|
||||
$defer = true;
|
||||
wp_enqueue_script($handle, $url, $dependencies, $version, $defer);
|
||||
}
|
||||
add_shortcode('test_modal', __NAMESPACE__.'\test_modal');
|
||||
|
||||
|
||||
|
||||
?>
|
||||
30
plugins/fbpatch/php/patches/urls.php
Normal file
30
plugins/fbpatch/php/patches/urls.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
namespace FBPATCH;
|
||||
|
||||
/**
|
||||
* 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 = Fbpatch::root_url() . 'js/urls.js';
|
||||
$dependencies = array('de_fb_validate');
|
||||
$version = null;
|
||||
$defer = true;
|
||||
wp_enqueue_script( $handle, $url, $dependencies, $version, $defer);
|
||||
}
|
||||
add_action('wp_enqueue_scripts', __NAMESPACE__.'\add_my_jquery_patch');
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user