WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/30/2018 12:16:37 AM (3 years ago)
Author:
adamsilverstein
Message:

Taxonomy: Use REST API for ajax tag search.

Deprecate wp_ajax_ajax_tag_search and switch to using the REST API when searching tags in the tags meta box.

Props nacin, chriscct7, afercia, swissspidy, jnylen0, rmccue, ryelle.
Fixes #38922.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r42547 r42614  
    727727                'termAdded'    => __( 'Term added.' ),
    728728                'termRemoved'  => __( 'Term removed.' ),
     729                'restURL'      => rest_url( '/wp/v2/tags' ),
     730
     731                /**
     732                 * Filters the minimum number of characters required to fire a tag search via Ajax.
     733                 *
     734                 * Previous to 4.8.0, this filter passed taxonomy and search context parameters.
     735                 * @since 4.0.0
     736                 *
     737                 * @param int         $characters The minimum number of characters required. Default 2.
     738                 */
     739                'minChars'     => (int) apply_filters( 'term_search_min_chars', 2 ),
    729740            )
    730741        );
Note: See TracChangeset for help on using the changeset viewer.