-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeatures_plus.module
More file actions
executable file
·44 lines (38 loc) · 1002 Bytes
/
features_plus.module
File metadata and controls
executable file
·44 lines (38 loc) · 1002 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* Returns a list of keys for a given component.
*/
function features_plus_get_component($component_name, $skip_keys = array()) {
$stub = array();
foreach (features_get_components(TRUE) as $component => $info) {
if($component != $component_name) {
continue;
}
if ($options = features_invoke($component, 'features_export_options')) {
foreach ($options as $key => $value) {
if(in_array($key, $skip_keys)) {
continue;
}
$stub[$component][] = $key;
}
}
}
return $stub;
}
/**
* Returns an array of keys that shouldn't be exported for a given component.
*/
function features_plus_component_skip_keys($component_name) {
$function = 'features_plus_' . $component_name . '_skip_keys';
if(function_exists($function)) {
return $function();
}
return array();
}
function features_plus_variable_skip_keys() {
return array(
'drupal_private_key',
'css_js_query_string',
'javascript_parsed',
);
}