Projet

Général

Profil

Révision 560c3060

Ajouté par Julien Enselme il y a plus de 8 ans

Update ctools 1.7 -> 1.9

Voir les différences:

drupal7/sites/all/modules/ctools/ctools.module
23 23
 *   ; Requires CTools v7.x-1.4 or newer.
24 24
 *   dependencies[] = ctools (>=1.4)
25 25
 */
26
define('CTOOLS_MODULE_VERSION', '7.x-1.7');
26
define('CTOOLS_MODULE_VERSION', '7.x-1.9');
27 27

  
28 28
/**
29 29
 * Test the CTools API version.
......
617 617
  return _ctools_registry_files_alter($files, $indexed_modules);
618 618
}
619 619

  
620
// -----------------------------------------------------------------------
621
// FAPI hooks that must be in the .module file.
622

  
623
/**
624
 * Alter the comment form to get a little more control over it.
625
 */
626
function ctools_form_comment_form_alter(&$form, &$form_state) {
627
  if (!empty($form_state['ctools comment alter'])) {
628
    // Force the form to post back to wherever we are.
629
    $form['#action'] = url($_GET['q'], array('fragment' => 'comment-form'));
630
    if (empty($form['#submit'])) {
631
      $form['#submit'] = array('comment_form_submit');
632
    }
633
    $form['#submit'][] = 'ctools_node_comment_form_submit';
634
  }
635
}
636

  
637
function ctools_node_comment_form_submit(&$form, &$form_state) {
638
  $form_state['redirect'][0] = $_GET['q'];
639
}
640

  
620 641
// -----------------------------------------------------------------------
621 642
// CTools hook implementations.
622 643

  
......
1018 1039
    }
1019 1040
  }
1020 1041
}
1042

  
1043
/**
1044
 * Implements hook_field_create_field().
1045
 */
1046
function ctools_field_create_field($field) {
1047
  ctools_flush_field_caches();
1048
}
1049

  
1050
/**
1051
 * Implements hook_field_create_instance().
1052
 */
1053
function ctools_field_create_instance($instance) {
1054
  ctools_flush_field_caches();
1055
}
1056
/**
1057
 * Implements hook_field_delete_field().
1058
 */
1059
function ctools_field_delete_field($field) {
1060
  ctools_flush_field_caches();
1061
}
1062
/**
1063
 * Implements hook_field_delete_instance().
1064
 */
1065
function ctools_field_delete_instance($instance) {
1066
  ctools_flush_field_caches();
1067
}
1068
/**
1069
 * Implements hook_field_update_field().
1070
 */
1071
function ctools_field_update_field($field, $prior_field, $has_data) {
1072
  ctools_flush_field_caches();
1073
}
1074

  
1075
/**
1076
 * Implements hook_field_update_instance().
1077
 */
1078
function ctools_field_update_instance($instance, $prior_instance) {
1079
  ctools_flush_field_caches();
1080
}
1081

  
1082
/**
1083
 * Clear field related caches.
1084
 */
1085
function ctools_flush_field_caches() {
1086
  // Clear caches of 'Entity field' content type plugin.
1087
  cache_clear_all('ctools_entity_field_content_type_content_types', 'cache');
1088
}

Formats disponibles : Unified diff