Projet

Général

Profil

Paste
Télécharger (2,68 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / bootstrap / includes / deprecated.inc @ 7547bb19

1
<?php
2
/**
3
 * @file
4
 * deprecated.inc
5
 *
6
 * This contains all the currently deprecated functions that will be removed
7
 * in the next minor or major release.
8
 */
9

    
10
/**
11
 * Pre-render input elements.
12
 *
13
 * @deprecated Use proper hooks instead. Will be removed in 7.x-3.2.
14
 *
15
 * @see hook_pre_render()
16
 *
17
 * @todo Remove in 7.x-3.2.
18
 */
19
function _bootstrap_pre_render_input($element) {
20
  return bootstrap_pre_render($element);
21
}
22

    
23
/**
24
 * Pre-render fieldset element.
25
 *
26
 * @deprecated Use proper hooks instead. Will be removed in 7.x-3.2.
27
 *
28
 * @see hook_pre_render_HOOK()
29
 *
30
 * @todo Remove in 7.x-3.2.
31
 */
32
function _bootstrap_pre_render_fieldset($element) {
33
  return bootstrap_pre_render_fieldset($element);
34
}
35

    
36
/**
37
 * Internal function used to process all elements.
38
 *
39
 * @deprecated Use proper hooks instead. Will be removed in 7.x-3.2.
40
 *
41
 * @see hook_form_process()
42
 *
43
 * @todo Remove in 7.x-3.2.
44
 */
45
function _bootstrap_process_element($element, &$form_state, &$form) {
46
  $element = bootstrap_form_process($element, $form_state, $form);
47

    
48
  // Process form actions.
49
  if (!empty($element['#type']) && $element['#type'] === 'actions') {
50
    $element = bootstrap_form_process_actions($element, $form_state, $form);
51
  }
52

    
53
  // Process text_format elements.
54
  if (isset($element['#type']) && $element['#type'] === 'text_format') {
55
    $element = bootstrap_form_process_text_format($element, $form_state, $form);
56
  }
57

    
58
  return $element;
59
}
60

    
61
/**
62
 * Internal function used to process the fieldset element.
63
 *
64
 * @deprecated Use proper hooks instead. Will be removed in 7.x-3.2.
65
 *
66
 * @see hook_form_process_HOOK()
67
 *
68
 * @todo Remove in 7.x-3.2.
69
 */
70
function _bootstrap_process_fieldset($element, &$form_state, &$form) {
71
  // Purposefully left empty, there's nothing to process (just pre-render now).
72
}
73

    
74
/**
75
 * Helper function for determining if a tooltip can be used for a description.
76
 *
77
 * @param string $description
78
 *   The string of text to process.
79
 *
80
 * @deprecated Will be removed in 7.x-3.2.
81
 *
82
 * @see _bootstrap_simple_string()
83
 * @see bootstrap_element_smart_description()
84
 *
85
 * @todo Remove in 7.x-3.2.
86
 */
87
function _bootstrap_tooltip_description($description) {
88
  // Determine if tooltips are enabled.
89
  static $enabled;
90
  if (!isset($enabled)) {
91
    $enabled = bootstrap_setting('tooltip_enabled') && bootstrap_setting('forms_smart_descriptions');
92
  }
93
  // Immediately return if "simple" tooltip descriptions are not enabled.
94
  if (!$enabled) {
95
    return FALSE;
96
  }
97
  $allowed_tags = array('b', 'code', 'em', 'i', 'kbd', 'span', 'strong');
98
  $length = (int) bootstrap_setting('forms_smart_descriptions_length');
99
  if (empty($length)) {
100
    $length = FALSE;
101
  }
102
  return _bootstrap_is_simple_string($description, $length, $allowed_tags);
103
}