Make WordPress Core


Ignore:
Timestamp:
07/26/2022 01:21:55 PM (4 years ago)
Author:
audrasjb
Message:

Taxonomy: Allow filtering Ajax term search results in quick edit.

This changeset introduces the ajax_term_search_results hook which can be used to filter the term search results returned by the AJAX term query.

Props grandeljay, costdev, ironprogrammer, audrasjb, SergeyBiryukov.
Fixes #55606.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r53747 r53781  
    162162        )
    163163    );
     164
     165    /**
     166     * Filters the Ajax term search results.
     167     *
     168     * @since 6.1.0
     169     *
     170     * @param string[]    $results Array of term names.
     171     * @param WP_Taxonomy $tax     The taxonomy object.
     172     * @param string      $s       The search term.
     173     */
     174    $results = apply_filters( 'ajax_term_search_results', $results, $tax, $s );
    164175
    165176    echo implode( "\n", $results );
Note: See TracChangeset for help on using the changeset viewer.