You are here

function features_dom_decode_options in Features 7

Same name and namespace in other branches
  1. 6 features.admin.inc \features_dom_decode_options()
  2. 7.2 features.admin.inc \features_dom_decode_options()

Decode an array of option values that have been encoded by features_dom_encode_options().

2 calls to features_dom_decode_options()
features_export_build_form_populate in ./features.admin.inc
AJAX callback for features_export_form_build().
features_export_build_form_submit in ./features.admin.inc
Form submission handler for features_export_form().

File

./features.admin.inc, line 854
@todo.

Code

function features_dom_decode_options($options, $keys_only = FALSE) {
  $replacements = array_flip(features_dom_encode_map());
  $encoded = array();
  foreach ($options as $key => $value) {
    $encoded[strtr($key, $replacements)] = $keys_only ? $value : strtr($value, $replacements);
  }
  return $encoded;
}