wip adding patchs conditionnaly
This commit is contained in:
@@ -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