You are here

function _fe_block_get_global_settings in Features Extra 7

Retrieve the global (non-theme-specific) part of a block definition.

Parameters

array $block: A block definition.

Return value

array The block definition filtered on non-theme-specific settings.

3 calls to _fe_block_get_global_settings()
fe_block_settings_features_export_render in fe_block/fe_block.module
Implements hook_features_export_render().
_fe_block_settings_convert in fe_block/fe_block.module
Helper function to convert an older export into the new format.
_fe_block_settings_update_global_settings in fe_block/fe_block.module
Helper to update global block settings for a specific block.

File

fe_block/fe_block.module, line 194
Provide features components for exporting core blocks and settings.

Code

function _fe_block_get_global_settings($block) {
  $theme_specific_defaults = _fe_block_theme_specific_defaults();

  // Filter on any keys other than the theme specific ones.
  $return = array_diff_key($block, $theme_specific_defaults);

  // Remove the serial.
  if (isset($return['bid'])) {
    unset($return['bid']);
  }

  // Remove the info from hook_block_info().
  if (isset($return['info'])) {
    unset($return['info']);
  }
  return $return;
}