Projet

Général

Profil

Paste
Télécharger (734 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / i18n / i18n_node / i18n_node.features.inc @ 76df55b7

1
<?php
2
/**
3
 * @file
4
 * Feature integration
5
 */
6

    
7
/**
8
 * Implements hook_features_pipe_node_alter().
9
 */
10
function i18n_node_features_pipe_node_alter(&$pipe, $data, $export) {
11
  if (!empty($data) && module_exists('variable')) {
12
    variable_include();
13
    foreach (variable_list_module('i18n_node') as $variable) {
14
      if (isset($variable['multiple']) && $variable['multiple'] === 'node_type') {
15
        $children = variable_build($variable['name']);
16
        if (!empty($children['children'])) {
17
          foreach ($children['children'] as $child_variable) {
18
            if (in_array($child_variable['index'], $data)) {
19
              $pipe['variable'][] = $child_variable['name'];
20
            }
21
          }
22
        }
23
      }
24
    }
25
  }
26
}