Import HAL : match des auteurs sur toutes les formes d'idHAL (résolution en fond via cron)
This commit is contained in:
@@ -46,6 +46,7 @@ class Thalim_HAL_Importer {
|
||||
|
||||
private function load_dependencies() {
|
||||
require_once THALIM_HAL_PLUGIN_DIR . 'includes/class-hal-api.php';
|
||||
require_once THALIM_HAL_PLUGIN_DIR . 'includes/class-hal-forms-cache.php';
|
||||
// Traits must be loaded before the class that `use`s them.
|
||||
require_once THALIM_HAL_PLUGIN_DIR . 'includes/trait-admin-page-config.php';
|
||||
require_once THALIM_HAL_PLUGIN_DIR . 'includes/trait-admin-page-csv-legacy.php';
|
||||
@@ -56,6 +57,8 @@ class Thalim_HAL_Importer {
|
||||
|
||||
private function init_hooks() {
|
||||
add_action('admin_menu', [$this, 'add_admin_menu']);
|
||||
// Background resolver of alternate idHAL forms (WP-Cron; no UI cost).
|
||||
Thalim_HAL_Forms_Cache::init();
|
||||
}
|
||||
|
||||
public function add_admin_menu() {
|
||||
@@ -100,6 +103,8 @@ register_activation_hook(__FILE__, function() {
|
||||
// Deactivation hook
|
||||
register_deactivation_hook(__FILE__, function() {
|
||||
delete_transient('thalim_hal_preview_data');
|
||||
require_once THALIM_HAL_PLUGIN_DIR . 'includes/class-hal-forms-cache.php';
|
||||
Thalim_HAL_Forms_Cache::clear_schedule();
|
||||
});
|
||||
|
||||
// Initialize plugin
|
||||
|
||||
Reference in New Issue
Block a user