How to add a do_action on refreshing of WP customizer?
Got the solution: Create a PHP file “purge-bb-cache.php” Create a JS script like below in functions.php purge-bb-cache.php <?php FLBuilderModel::delete_asset_cache_for_all_posts(); ?> JS script: // Add JS to customizer function print_customizer_js() { ?> <script> // Purge BB Cache On Save Customizer jQuery(document).ready(function(){ jQuery(“input#save”).click(function(){ //var ajaxurl = “<?php echo ( get_stylesheet_directory() . ‘/wp-content/themes/bb-theme-child/script.php’ ); ?>”; jQuery.ajax({ type: ‘POST’, … Read more