You are here

function panelizer_features_export_alter in Panelizer 7

Same name and namespace in other branches
  1. 7.2 panelizer.module \panelizer_features_export_alter()

Implements hook_features_export_alter().

File

./panelizer.module, line 762
panelize.module

Code

function panelizer_features_export_alter(&$export, $module_name) {
  if (!empty($export['features']['panelizer_defaults'])) {
    foreach ($export['features']['panelizer_defaults'] as $machine_name) {
      list($entity, $bundle) = explode(':', $machine_name);
      $variables = array(
        'panelizer_defaults_' . $entity . '_' . $bundle,
        'panelizer_' . $entity . ':' . $bundle . '_allowed_layouts',
        'panelizer_' . $entity . ':' . $bundle . '_allowed_types',
        'panelizer_' . $entity . ':' . $bundle . '_default',
      );
      foreach ($variables as $variable) {
        $export['features']['variable'][$variable] = $variable;
      }
    }
  }
  return array();
}