function popupformat_features_export in Popup 7
Same name and namespace in other branches
- 8 modules/popup_ui/includes/popup_ui.features.inc \popupformat_features_export()
- 7.x modules/popup_ui/includes/popup_ui.features.inc \popupformat_features_export()
- 6.x modules/popup_ui/includes/popup_ui.features.inc \popupformat_features_export()
Implementation of [component]_features_export()
File
- modules/
popup_ui/ includes/ popup_ui.features.inc, line 27
Code
function popupformat_features_export($data, &$export, $module_name = '') {
module_load_include('inc', 'popup_ui', 'includes/popup_ui.admin');
module_load_include('inc', 'popup', 'includes/popup.util');
$formats = _popup_ui_formatter_settings();
$styles = _popup_styles();
$effects = _popup_effects();
$export['dependencies']['popup_ui'] = 'popup_ui';
foreach ($data as $instance) {
if ($formats[$instance]['style']) {
foreach (module_implements('popup_styles') as $module) {
$provided = module_invoke($module, 'popup_styles');
if (is_array($provided) && array_key_exists($formats[$instance]['style'], $provided)) {
$export['dependencies'][$module] = $module;
break;
}
}
}
if ($formats[$instance]['effect']) {
foreach (module_implements('popup_effects') as $module) {
$provided = module_invoke($module, 'popup_effects');
$module_effects = array_shift($provided);
if (isset($module_effects[$formats[$instance]['effect']])) {
$export['dependencies'][$module] = $module;
break;
}
}
}
$export['features']['popupformat'][$instance] = $instance;
}
return array();
}