Manual:Hooks/SpecialSearchCreateLink

Details
Called on Special:Search when making the message to create a page or go to the existing page. Parameters for the message can be added by adding values to the $params array.
 * $t is the Title object of the search term
 * $params is an array containing
 * the message name, by default one of 'searchmenu-exists', 'searchmenu-new', 'searchmenu-new-nocreate'
 * the search term as escaped parameter

No message will be displayed if the message name is false or null.