Plugin SPIP. Compresseur de code avec tout plein d’options d’optimisations.

htmlminifier_appliquer_options.php 587B

1234567891011121314151617181920212223
  1. <?php
  2. if (!defined('_ECRIRE_INC_VERSION')) return;
  3. function action_htmlminifier_appliquer_options_dist() {
  4. $securiser_action = charger_fonction('securiser_action', 'inc');
  5. $arg = $securiser_action();
  6. if(empty($arg) || !is_string($arg)) {
  7. $arg = 'super_safe';
  8. }
  9. $options = HTMLMinifier::get_presets($arg);
  10. ecrire_config('htmlminifier', $options);
  11. if ($redirect = _request('redirect')) {
  12. include_spip('inc/headers');
  13. $redirect = parametre_url($redirect, 'message_ok_config', 'oui');
  14. redirige_par_entete($redirect);
  15. }
  16. }

Powered by TurnKey Linux.