Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hawkidoki/81cb5a81bb51116cdca86adf3c298db0 to your computer and use it in GitHub Desktop.
Save hawkidoki/81cb5a81bb51116cdca86adf3c298db0 to your computer and use it in GitHub Desktop.
<?php
add_filter('hwk_ajax_configs', 'hwk_ajax_declare_config');
function hwk_ajax_declare_config($config){
$config[] = array(
'id' => 'hwk_ajax_heavy_query', // L'ID de référence de la configuration
'template' => 'templates/modules/module-heavy', // Path d'affichage du fichier qui effectue le traitement lourd
'cache' => 'templates/modules/cache/module-heavy', // path du fichier du cache HTML
'interval' => 900, // Intervalle de mise à jour du module
'flush' => get_the_ID(), // Flush du cache global à chaque intervalle? true|false|post_id
);
return $config;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment