Skip to content

Commit

Permalink
feat(search): trigger new event for small search field form
Browse files Browse the repository at this point in the history
This also renames the event for the search form on the search page.

The scheme for naming events that provide the new Form-class as $data is
FORM_<formname>_OUTPUT
  • Loading branch information
micgro42 committed Mar 27, 2018
1 parent 1265b19 commit 16ece95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion inc/Ui/Search.php
Expand Up @@ -86,7 +86,7 @@ protected function getSearchFormHTML($query)

$searchForm->addFieldsetClose();

trigger_event('SEARCH_FORM_DISPLAY', $searchForm);
trigger_event('FORM_SEARCH_OUTPUT', $searchForm);

return $searchForm->toHTML();
}
Expand Down
1 change: 1 addition & 0 deletions inc/template.php
Expand Up @@ -692,6 +692,7 @@ function tpl_searchform($ajax = true, $autocomplete = true) {
$searchForm->addTagClose('div');
}
$searchForm->addTagClose('div');
trigger_event('FORM_QUICKSEARCH_OUTPUT', $searchForm);

echo $searchForm->toHTML();

Expand Down

0 comments on commit 16ece95

Please sign in to comment.