You are here

function search_api_page_reset_original_options in Search API Pages 7

Resets the page's options, if they were overridden, to their original values.

Used as a "#post_render" callback for the search page results in search_api_page_view().

Parameters

string $children: The rendered output of the element.

array $element: The rendered element.

Return value

array The processed rendered output of the element.

1 string reference to 'search_api_page_reset_original_options'
search_api_page_view in ./search_api_page.pages.inc
Displays a search page.

File

./search_api_page.pages.inc, line 249
User page callbacks for the Search pages module.

Code

function search_api_page_reset_original_options($children, array $element) {
  $page = $element['#page'];
  if (!empty($page->original_options)) {
    $page->options = $page->original_options;
    unset($page->original_options);
  }
  return $children;
}