asp_search_data

This hook filters the search data object before the live search starts.

WPD.Hooks.applyFilters('asp_search_data', data, searchId, searchInstanceId);

Example

window.addEventListener("load", () => {
	WPD.Hooks.addFilter('asp_search_data', function(data){
		/**
		 * data.aspp -> search phrase
		 * data.asid -> search ID
		 * data.asp_inst_id -> search instance ID
		 * data.options -> serialized string of search form options
		**/
		return data;
	}, 10);
});

Last updated