You are here

function mediafront_playlist_node_merge in MediaFront 6

Same name and namespace in other branches
  1. 6.2 mediafront.module \mediafront_playlist_node_merge()
  2. 7 mediafront.module \mediafront_playlist_node_merge()

Merge the node additions.

1 call to mediafront_playlist_node_merge()
mediafront_invoke_node in ./mediafront.module
Invoke a hook_playlist_node() operation in all modules.

File

./mediafront.module, line 442

Code

function mediafront_playlist_node_merge($original, $additions) {
  $merged = $original;
  if (count($additions) > 0) {
    foreach ($additions as $field => $value) {
      $merged[$field] = isset($original[$field]) ? mediafront_array_replace_recursive($original[$field], $value) : $value;
    }
  }
  return $merged;
}