<?php

/**
 * Plugin CIBLOC
 * @copyright 2018 MTECT
 * @author Christophe IMBERTI (cf. CPI art L121-1)
 * @license GNU/GPLv3
 */

if (!defined(
	'_ECRIRE_INC_VERSION'
)) {
	return;
}

function action_cibloc_purger_dist($arg = null) {
	if ($arg === null) {
		$securiser_action = charger_fonction('securiser_action', 'inc');
		$arg = $securiser_action();
	}

	if (autoriser('configurer')) {
		if ($arg == 'cibloc') {
			include_spip('inc/cibloc_commun');

			cibloc_purger_cache_css();
			cibloc_purger_definition_cache();
			cibloc_purger_cache_js();

			spip_log('purger cibloc');
		}
	}
}
