wip adding patchs conditionnaly
This commit is contained in:
@@ -18,12 +18,14 @@ if (!defined('ABSPATH')) {
|
||||
|
||||
|
||||
include_once(plugin_dir_path(__FILE__) . '/php/fbpatch_class.php');
|
||||
include_once(plugin_dir_path(__FILE__) . '/php/calculations.php');
|
||||
|
||||
include_once(plugin_dir_path(__FILE__) . '/menu/admin_menu.php');
|
||||
include_once(plugin_dir_path(__FILE__) . '/menu/admin_menu_toggle.php');
|
||||
include_once(plugin_dir_path(__FILE__) . '/menu/menu_content.php');
|
||||
|
||||
include_once(plugin_dir_path(__FILE__) . '/php/calculations.php');
|
||||
|
||||
\FBPATCH\Fbpatch::init_hook();
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ function add_form_builder_calculations_patch() {
|
||||
$defer = true;
|
||||
wp_enqueue_script($handle, $url, $dependencies, $version, $defer);
|
||||
}
|
||||
add_action('wp_enqueue_scripts', __NAMESPACE__.'\add_form_builder_calculations_patch', 22);
|
||||
//add_action('wp_enqueue_scripts', __NAMESPACE__.'\add_form_builder_calculations_patch', 22);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class Fbpatch {
|
||||
private static $_patches = [
|
||||
'_name'=>'fbpatch_list_of_patches',
|
||||
'calculations'=>['checked'=>false, 'title'=>'calculations title', 'description'=>'calculation description'],
|
||||
'hide_show'=>['checked'=>false, 'title'=>'hide/show title', 'description'=>'hide/show description'],
|
||||
'hide_show' =>['checked'=>false, 'title'=>'hide/show title', 'description'=>'hide/show description'],
|
||||
];
|
||||
//private static $_patches = ['_name'=>'fbpatch_list_of_patches', 'hide_show'];
|
||||
//private static $_patches = ['_name'=>'fbpatch_list_of_patches'];
|
||||
@@ -107,6 +107,11 @@ class Fbpatch {
|
||||
$serialize_patches_option = serialize($patches_option);
|
||||
update_option(self::$_patches['_name'], $serialize_patches_option);
|
||||
}
|
||||
|
||||
public static function init_hook() {
|
||||
add_action('wp_enqueue_scripts', __NAMESPACE__.'\add_form_builder_calculations_patch', 22);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user