adding patchs files according to form in menu
This commit is contained in:
@@ -108,8 +108,17 @@ class Fbpatch {
|
||||
update_option(self::$_patches['_name'], $serialize_patches_option);
|
||||
}
|
||||
|
||||
/*
|
||||
* this function will include the files of the different patches if they are set in the options
|
||||
*
|
||||
*/
|
||||
public static function init_hook() {
|
||||
add_action('wp_enqueue_scripts', __NAMESPACE__.'\add_form_builder_calculations_patch', 22);
|
||||
$patches = Fbpatch::get_patches();
|
||||
foreach($patches as $patch => $data) {
|
||||
if ($data['checked'] === true) {
|
||||
include_once(plugin_dir_path(__DIR__) . '/php/'.$patch.'.php');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user