mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 04:04:35 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@42614 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -726,6 +726,17 @@ function wp_default_scripts( &$scripts ) {
|
||||
'termSelected' => __( 'Term selected.' ),
|
||||
'termAdded' => __( 'Term added.' ),
|
||||
'termRemoved' => __( 'Term removed.' ),
|
||||
'restURL' => rest_url( '/wp/v2/tags' ),
|
||||
|
||||
/**
|
||||
* Filters the minimum number of characters required to fire a tag search via Ajax.
|
||||
*
|
||||
* Previous to 4.8.0, this filter passed taxonomy and search context parameters.
|
||||
* @since 4.0.0
|
||||
*
|
||||
* @param int $characters The minimum number of characters required. Default 2.
|
||||
*/
|
||||
'minChars' => (int) apply_filters( 'term_search_min_chars', 2 ),
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user