1 |
85ad3d82
|
Assos Assos
|
<?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 |
|
|
} |