jetpack_search_abort, search_attempted_non_search_query, $query

jetpack_search_abort, search_attempted_non_search_query, $query

Appears in:
Hook Type: action

See hook in core

Displaying hooks found in version: jetpack.16.0.1

do_action('jetpack_search_abort, search_attempted_non_search_query, $query') is found 2 times:

  • /jetpack_vendor/automattic/jetpack-search/src/classic-search/class-classic-search.php line 502
    	 */
    	public function do_search( WP_Query $query ) {
    		if ( ! $this->should_handle_query( $query ) ) {
    			// If we make it here, either 'filter__posts_pre_query' somehow allowed it or a different entry to do_search.
    			do_action( 'jetpack_search_abort', 'search_attempted_non_search_query', $query );
    			return;
    		}
    
    		$page = ( $query->get( 'paged' ) ) ? absint( $query->get( 'paged' ) ) : 1;
    
    		// Get maximum allowed offset and posts per page values for the API.
    
  • /jetpack_vendor/automattic/jetpack-search/src/inline-search/class-inline-search.php line 154
    	 * @param \WP_Query $query The original WP_Query to use for the parameters of our search.
    	 */
    	public function do_search( \WP_Query $query ) {
    		if ( ! $this->should_handle_query( $query ) ) {
    			do_action( 'jetpack_search_abort', 'search_attempted_non_search_query', $query );
    
    			return;
    		}
    
    		$page = ( $query->get( 'paged' ) ) ? absint( $query->get( 'paged' ) ) : 1;