Last active
March 1, 2016 13:51
-
-
Save phenix-factory/f6264f0d15fa85a92508 to your computer and use it in GitHub Desktop.
SPIP: vider le cache de l'objet associer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* On passe par le pipeline post_edition_lien | |
* afin de vider le cache des objet associer | |
* Pratique lorsqu'une structure dépend d'un mot-clé SPIP | |
* | |
* @param mixed $flux | |
* @access public | |
* @return mixed | |
*/ | |
function prefix_post_edition_lien($flux) { | |
$objet = $flux['data']['objet']; | |
$id_objet = $flux['data']['id_objet']; | |
// Vider le cache de l'objet quand un mot clé lui est associer | |
include_spip('inc/invalideur'); | |
suivre_invalideur("id='$objet/$id_objet'"); | |
return $flux; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment