menu_node_edit_filter_sections

Versions
menu_node_edit
menu_node_edit_filter_sections($item)

Given a menu_node_edit user submission, process our data.

Parameters

$item The menu_node_edit form values.

Return value

An array of selected sections.

Code

./menu_node_edit.module, line 708

<?php
function menu_node_edit_filter_sections($item) {
  $sections = array();
  // The data we want is nested very deep in the form.
  foreach ($item as $key => $value) {
    foreach ($value as $title => $element) {
      foreach ($element as $parent => $array) {
        foreach ($array as $mlid => $check) {
          if ($mlid == $check) {
            $sections[] = $mlid;
          }
        }
      }
    }
  }
  return $sections;
}
?>

Contact

  • agentrickard [at] gmail [dot] com

Donations

My Amazon.com Wish List