'', 'type' => ''); foreach ($options['fields'] as $data) { if ($data['field_id'] == $id) { $result['title'] = $data['title']; $result['type'] = $data['type']; break; } } return $result; } function essb_search_format_value($id) { $value = essb_option_value($id); return $value; } $search = isset ( $_REQUEST ['search'] ) ? $_REQUEST ['search'] : ''; $search = strtolower($search); $result = array(); foreach ($essb_navigation_tabs as $current_tab => $tab_name) { $options = $essb_section_options[$current_tab]; if ($current_tab == 'shortcode' || $current_tab == 'analytics' || $current_tab == 'import' || $current_tab == 'update' || $current_tab == 'quick' || $current_tab == 'readymade' || $current_tab == 'status') { continue; } //print $current_tab.'|'; foreach($options as $section => $fields) { $section_options = $fields; $section_data = essb_find_section_name($current_tab, $section); $section_name = $section_data['title']; $section_type = $section_data['type']; $section_id = $section; $subsection_id = ''; if ($section_type == 'sub_menu_item') { $subsection_id = $section_id; $section_split = explode('-', $section_id); $section_id = $section_split[0]; } foreach ($section_options as $option) { $type = $option['type']; $id = isset($option['id']) ? $option['id'] : ''; $title = isset($option['title']) ? $option['title'] : ''; $description = isset($option['description']) ? $option['description'] : ''; $s_title = strtolower($title); $s_description = strtolower($description); if (strpos($s_title, $search) !== false || strpos($s_description, $search) !== false) { $result[] = array('id' => $id, 'type' => $type, 'title' => $title, 'description' => $description, 'tab_id' => $current_tab, 'tab_name' => $tab_name, 'section_id' => $section_id, 'section_name' => $section_name, 'subsection_id' => $subsection_id); } } } } if (count($result) == 0) { echo '