/** * Listen to the upgrade event * * @param string $event the name of the event * @param string $type the type of the event * @param mixed $object supplied params */ function haarlem_tangram_upgrade($event, $type, $object) { // register correct class for future use if (get_subtype_id('object', TangramVacancy::SUBTYPE)) { update_subtype('object', TangramVacancy::SUBTYPE, 'TangramVacancy'); } else { add_subtype('object', TangramVacancy::SUBTYPE, 'TangramVacancy'); } // reset xml cache haarlem_tangram_clear_cached_xml(); }
/** * Listen to the action admin/site/flush_cache * * @param string $hook the name of the hook * @param string $type the type of the hook * @param mixed $return_value current return value * @param array $params supplied params * * @return void */ function haarlem_tangram_flush_cache_handler($hook, $type, $return_value, $params) { // reset xml cache haarlem_tangram_clear_cached_xml(); }