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/f6aa04c71ee9407d0b4873e722fa9acb to your computer and use it in GitHub Desktop.
Save hawkidoki/f6aa04c71ee9407d0b4873e722fa9acb to your computer and use it in GitHub Desktop.
<?php
add_filter('hwk_ajax_configs', 'hwk_ajax_declare_config_advanced');
function hwk_ajax_declare_config_advanced($config){
$config[] = array(
'id' => 'hwk_ajax_heavy_query_post',
'template' => 'templates/modules/module-heavy-post',
'cache' => 'templates/modules/cache/module-heavy-post-%param%', // %param% sera remplacé par la valeur indiqué dans le paramètre 'param'
'param' => get_the_ID(),
'flush' => get_the_ID(),
);
return $config;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment